30#include <glib/gi18n.h>
43 fprintf(
stderr,
"[dt_bauhaus_combobox_from_conf] `%s` is not declared as an <enum> config entry\n",
confkey);
57 int pos = 0, active = 0;
60 char *item = (
char *)
opt->data;
62 if(item[0] ==
'[') item++;
63 else if(item[
strlen(item) - 1] ==
']') item[
strlen(item) - 1] =
'\0';
68 if(!
g_strcmp0(current, item)) active = pos;
void dt_bauhaus_combobox_add_full(GtkWidget *widget, const char *text, dt_bauhaus_combobox_alignment_t align, gpointer data, void(free_func)(void *data), gboolean sensitive)
gpointer dt_bauhaus_combobox_get_data(GtkWidget *widget)
void dt_bauhaus_combobox_set(GtkWidget *widget, const int pos)
void dt_bauhaus_widget_set_label(GtkWidget *widget, const char *label)
GtkWidget * dt_bauhaus_combobox_new(dt_bauhaus_t *bh, dt_gui_module_t *self)
@ DT_BAUHAUS_COMBOBOX_ALIGN_RIGHT
GtkWidget * dt_bauhaus_combobox_from_conf(dt_bauhaus_t *bh, dt_gui_module_t *self, const char *confkey)
static void _combobox_conf_value_changed(GtkWidget *widget, gpointer user_data)
struct _GtkWidget GtkWidget
GtkWidget, opaque, spelled exactly as GTK spells it.
const char * dt_confgen_get_tooltip(const char *name)
gchar * dt_conf_get_string(const char *name)
gboolean dt_confgen_value_exists(const char *name, dt_confgen_value_kind_t kind)
void dt_conf_set_string(const char *name, const char *val)
const char * dt_confgen_get(const char *name, dt_confgen_value_kind_t kind)
dt_confgen_type_t dt_confgen_type(const char *name)
const char * dt_confgen_get_label(const char *name)
static void dt_free_gpointer(gpointer ptr)
static const dt_aligned_pixel_simd_t value
The dt_gui_module_t type is the intersection between a dt_lib_module_t and a dt_iop_module_t structur...
GList * dt_util_str_to_glist(const gchar *separator, const gchar *text)