80 return _(
"Auto style");
85 static const char *
v[] = {
"studio_capture",
NULL };
147 gboolean found =
FALSE;
192 if(match)
return TRUE;
295 if(index <= 0)
return;
298 gpointer
tmp = previous->data;
299 previous->data = current->data;
302 else if(
column ==
d->pool_down_col)
307 gpointer
tmp = current->data;
308 current->data = next->data;
311 else if(
column ==
d->pool_remove_col)
345 ||
column ==
d->pool_remove_col;
362 const char *text =
NULL;
363 if(
column ==
d->pool_up_col) text =
_(
"Apply this style earlier");
364 else if(
column ==
d->pool_down_col) text =
_(
"Apply this style later");
365 else if(
column ==
d->pool_remove_col) text =
_(
"Remove this style from the pool");
453 const char *
pool_name = (
const char *)l->data;
566 self->
data = (
void *)
d;
586 dt_ui_scroll_wrap(
d->pool_treeview, 100,
"plugins/darkroom/studio_style/poolwindowheight",
struct _GtkWidget GtkWidget
GtkWidget, opaque, spelled exactly as GTK spells it.
gchar * dt_conf_get_string(const char *name)
Read the stored string for name as a private copy.
void dt_conf_set_string(const char *name, const char *val)
void dt_image_history_changed(const int32_t imgid, const gboolean refresh_filmstrip)
void dt_control_log(const char *msg,...)
GHashTable * names
GtkWidget* -> the name the application knows it by.
GtkTreeStore * store
its model, owned by the view
#define DT_FOLDER_SURVEY_STYLES_SEPARATOR
#define DT_FOLDER_SURVEY_STYLES_CONF_KEY
void dt_hm_batch_state_cleanup(dt_hm_batch_state_t *batch)
Release resources held by a batch state (the cached order). Safe to call on a zeroed state.
@ DT_HISTORY_MERGE_APPEND
float *const restrict const size_t k
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
static void dt_free_gpointer(gpointer ptr)
g_free() one pointer, with the signature GDestroyNotify wants.
#define dt_free(ptr)
g_free() ptr and set it to NULL, skipping both if it is already NULL.
#define DT_MODULE(MODVER)
Instantiate the version handshake every module must export. Use once, at file scope,...
#define DT_DEBUG_CONTROL_SIGNAL_DISCONNECT(ctlsig, cb, user_data)
#define DT_DEBUG_CONTROL_SIGNAL_RAISE(ctlsig, signal,...)
struct dt_control_signal_t * dt_control_signal_get_global(void)
@ DT_SIGNAL_DEVELOP_HISTORY_CHANGE
This signal is raised when develop history is changed no param, no returned value.
@ DT_SIGNAL_STYLE_CHANGED
This signal is raised when a style is added/deleted/changed
#define DT_DEBUG_CONTROL_SIGNAL_CONNECT(ctlsig, signal, cb, user_data)
int dt_styles_apply_to_image_merge(const char *name, const int style_id, const int32_t newimgid, const dt_history_merge_strategy_t mode, dt_hm_batch_state_t *batch)
void dt_style_free(gpointer data)
int32_t dt_styles_get_id_by_name(const char *name)
GList * dt_styles_get_list(const char *filter)
GtkTreeViewColumn * pool_down_col
GtkWidget * pool_treeview
GtkWidget * styles_treeview
GdkPixbuf * add_icon_disabled
GtkTreeViewColumn * pool_up_col
GdkPixbuf * add_icon_enabled
GtkTreeViewColumn * styles_add_col
GtkTreeViewColumn * pool_remove_col
static gboolean _studio_style_styles_button_pressed(GtkWidget *treeview, GdkEventButton *event, gpointer user_data)
static GtkTreeViewColumn * _studio_style_add_name_column(GtkWidget *treeview, const int name_model_col, GtkCellRenderer **out_renderer)
Append the text column carrying the row's display name. Packed with expand=TRUE so any later-appended...
static gboolean _studio_style_pool_query_tooltip(GtkWidget *treeview, gint x, gint y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer user_data)
static void _studio_style_populate_styles_tree(dt_lib_studio_style_t *d)
Rebuild the styles tree from every available style, grouping category segments split on "|" in the st...
static GtkTreeViewColumn * _studio_style_add_icon_column(GtkWidget *treeview, const char *icon_name, GtkCellRenderer **out_renderer)
Append one fixed-width icon column, for per-row action clicks handled by column identity (see the *_b...
static gboolean _studio_style_pool_contains(dt_lib_studio_style_t *d, const char *name)
static gboolean _studio_style_add_click(dt_lib_studio_style_t *d, GtkWidget *treeview, GtkTreePath *path)
Add the style leaf under a click to the end of the pool.
static gboolean _studio_style_get_node_for_name(GtkTreeModel *model, const gboolean root, GtkTreeIter *iter, const gchar *segment_name)
Find, or create as a child of the last found/created sibling, the tree node for one "|"-separated pat...
static void _studio_style_save(dt_lib_studio_style_t *d)
Persist the pool, in order, to conf.
void gui_cleanup(dt_lib_module_t *self)
static void _studio_style_changed_callback(gpointer instance, gpointer user_data)
static gboolean _studio_style_pool_button_pressed(GtkWidget *treeview, GdkEventButton *event, gpointer user_data)
Left click on a pool row's up/down/remove icon column.
static gboolean _studio_style_styles_query_tooltip(GtkWidget *treeview, gint x, gint y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer user_data)
static void _studio_style_name_cell_data_func(GtkTreeViewColumn *column, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data)
Gray a leaf's name when its style is already in the pool. Computed live at render time (not stored in...
uint32_t container(dt_lib_module_t *self)
static void _studio_style_pool_action_click(dt_lib_studio_style_t *d, GtkTreePath *path, GtkTreeViewColumn *column)
Apply the up/down/remove action for the pool row under a click, identified by which icon column was h...
static GdkPixbuf * _studio_style_load_icon(const char *icon_name, const double alpha)
Load a themed icon at the menu icon size, optionally pre-blended to a lower alpha....
static void _studio_style_apply_callback(GtkWidget *widget, gpointer user_data)
Re-apply the pool, in order, to the displayed image.
void gui_init(dt_lib_module_t *self)
const char ** views(dt_lib_module_t *self)
static void _studio_style_load_pool(dt_lib_studio_style_t *d)
Load the persisted, ordered pool from conf, once at startup.
static void _studio_style_rebuild_pool_ui(dt_lib_studio_style_t *d)
Rebuild the pool treeview, in order, from d->pool.
static void _studio_style_prune_pool(dt_lib_studio_style_t *d, GList *all_styles)
Drop pool entries whose style no longer exists.
static void _studio_style_add_cell_data_func(GtkTreeViewColumn *column, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data)
Show the add icon only on leaves, swapping in a pre-dimmed pixbuf when the leaf's style is already in...
Telling the user something happened.
int32_t dt_view_active_images_get_first()
@ DT_UI_CONTAINER_PANEL_LEFT_CENTER