Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
styles.c File Reference
#include "common/darktable.h"
#include "gui/actions/menu.h"
#include "gui/gtk.h"
#include "gui/styles.h"
#include "common/act_on.h"
#include "common/history.h"
#include "common/history_merge.h"
#include "common/history_merge_gui.h"
#include "common/styles.h"
#include "common/undo.h"
#include "gui/accelerators.h"
#include "control/conf.h"
#include "control/control.h"
#include "control/signal.h"
#include "libs/lib.h"
#include <glib.h>
+ Include dependency graph for src/gui/actions/styles.c:

Go to the source code of this file.

Functions

static gboolean _styles_menu_disabled (GtkWidget *widget)
 
static gboolean _styles_apply_callback (GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
 
static gboolean _styles_create_sensitive_callback (GtkWidget *widget)
 
static gboolean _styles_create_callback (GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
 
static void _close_styles_popup (GtkWidget *dialog, gint response_id, gpointer data)
 
static gboolean _styles_open_popup_callback (GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
 
static gchar * _styles_build_tooltip (const dt_style_t *style)
 
static GtkWidget_styles_get_submenu (GtkWidget **menus, GList **lists, GHashTable *submenus, GtkWidget *parent, const gchar *path, const gchar *label, const dt_menus_t index)
 
static void _styles_add_menu_entry (GtkWidget **menus, GList **lists, GtkWidget *parent, const dt_menus_t index, const gchar *label, const gchar *tooltip, const gchar *style_name)
 
static gboolean _styles_history_prepend_callback (GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
 
static gboolean _styles_history_prepend_checked_callback (GtkWidget *widget)
 
static gboolean _styles_history_append_callback (GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
 
static gboolean _styles_history_append_checked_callback (GtkWidget *widget)
 
static gboolean _styles_history_replace_callback (GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
 
static gboolean _styles_history_replace_checked_callback (GtkWidget *widget)
 
static gboolean _styles_copy_iop_order_callback (GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
 
static gboolean _styles_copy_iop_order_checked_callback (GtkWidget *widget)
 
static gboolean _styles_ask_callback (GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType mods, gpointer user_data)
 
static gboolean _styles_ask_checked_callback (GtkWidget *widget)
 
static void _styles_menu_clear (void)
 
static gboolean _styles_menu_rebuild_idle (gpointer user_data)
 
static void _styles_menu_rebuild_callback (gpointer instance, gpointer user_data)
 
void append_styles (GtkWidget **menus, GList **lists, const dt_menus_t index)
 

Variables

static GtkWidget ** _styles_menus = NULL
 
static GList ** _styles_lists = NULL
 
static dt_menus_t _styles_index = DT_MENU_STYLES
 
static gboolean _styles_signal_connected = FALSE
 
static guint _styles_menu_rebuild_source = 0
 

Function Documentation

◆ _close_styles_popup()

static void _close_styles_popup ( GtkWidget dialog,
gint  response_id,
gpointer  data 
)
static

◆ _styles_add_menu_entry()

static void _styles_add_menu_entry ( GtkWidget **  menus,
GList **  lists,
GtkWidget parent,
const dt_menus_t  index,
const gchar *  label,
const gchar *  tooltip,
const gchar *  style_name 
)
static

◆ _styles_apply_callback()

◆ _styles_ask_callback()

static gboolean _styles_ask_callback ( GtkAccelGroup *  group,
GObject *  acceleratable,
guint  keyval,
GdkModifierType  mods,
gpointer  user_data 
)
static

Definition at line 279 of file src/gui/actions/styles.c.

References dt_conf_get_bool(), dt_conf_set_bool(), and TRUE.

Referenced by append_styles().

◆ _styles_ask_checked_callback()

static gboolean _styles_ask_checked_callback ( GtkWidget widget)
static

Definition at line 286 of file src/gui/actions/styles.c.

References dt_conf_get_bool().

Referenced by append_styles().

◆ _styles_build_tooltip()

static gchar * _styles_build_tooltip ( const dt_style_t style)
static

◆ _styles_copy_iop_order_callback()

static gboolean _styles_copy_iop_order_callback ( GtkAccelGroup *  group,
GObject *  acceleratable,
guint  keyval,
GdkModifierType  mods,
gpointer  user_data 
)
static

Definition at line 267 of file src/gui/actions/styles.c.

References dt_conf_get_bool(), dt_conf_set_bool(), and TRUE.

Referenced by append_styles().

◆ _styles_copy_iop_order_checked_callback()

static gboolean _styles_copy_iop_order_checked_callback ( GtkWidget widget)
static

Definition at line 274 of file src/gui/actions/styles.c.

References dt_conf_get_bool().

Referenced by append_styles().

◆ _styles_create_callback()

static gboolean _styles_create_callback ( GtkAccelGroup *  group,
GObject *  acceleratable,
guint  keyval,
GdkModifierType  mods,
gpointer  user_data 
)
static

Definition at line 93 of file src/gui/actions/styles.c.

References dt_act_on_get_first_image(), dt_gui_styles_dialog_new(), FALSE, and TRUE.

Referenced by append_styles().

◆ _styles_create_sensitive_callback()

static gboolean _styles_create_sensitive_callback ( GtkWidget widget)
static

Definition at line 88 of file src/gui/actions/styles.c.

References dt_act_on_get_images_nb(), and FALSE.

Referenced by append_styles().

◆ _styles_get_submenu()

static GtkWidget * _styles_get_submenu ( GtkWidget **  menus,
GList **  lists,
GHashTable *  submenus,
GtkWidget parent,
const gchar *  path,
const gchar *  label,
const dt_menus_t  index 
)
static

◆ _styles_history_append_callback()

static gboolean _styles_history_append_callback ( GtkAccelGroup *  group,
GObject *  acceleratable,
guint  keyval,
GdkModifierType  mods,
gpointer  user_data 
)
static

Definition at line 243 of file src/gui/actions/styles.c.

References dt_conf_set_int(), DT_HISTORY_MERGE_APPEND, and TRUE.

Referenced by append_styles().

◆ _styles_history_append_checked_callback()

static gboolean _styles_history_append_checked_callback ( GtkWidget widget)
static

Definition at line 250 of file src/gui/actions/styles.c.

References dt_conf_get_int(), and DT_HISTORY_MERGE_APPEND.

Referenced by append_styles().

◆ _styles_history_prepend_callback()

static gboolean _styles_history_prepend_callback ( GtkAccelGroup *  group,
GObject *  acceleratable,
guint  keyval,
GdkModifierType  mods,
gpointer  user_data 
)
static

Definition at line 231 of file src/gui/actions/styles.c.

References dt_conf_set_int(), DT_HISTORY_MERGE_PREPEND, and TRUE.

Referenced by append_styles().

◆ _styles_history_prepend_checked_callback()

static gboolean _styles_history_prepend_checked_callback ( GtkWidget widget)
static

Definition at line 238 of file src/gui/actions/styles.c.

References dt_conf_get_int(), and DT_HISTORY_MERGE_PREPEND.

Referenced by append_styles().

◆ _styles_history_replace_callback()

static gboolean _styles_history_replace_callback ( GtkAccelGroup *  group,
GObject *  acceleratable,
guint  keyval,
GdkModifierType  mods,
gpointer  user_data 
)
static

Definition at line 255 of file src/gui/actions/styles.c.

References dt_conf_set_int(), DT_HISTORY_MERGE_REPLACE, and TRUE.

Referenced by append_styles().

◆ _styles_history_replace_checked_callback()

static gboolean _styles_history_replace_checked_callback ( GtkWidget widget)
static

Definition at line 262 of file src/gui/actions/styles.c.

References dt_conf_get_int(), and DT_HISTORY_MERGE_REPLACE.

Referenced by append_styles().

◆ _styles_menu_clear()

static void _styles_menu_clear ( void  )
static

Definition at line 291 of file src/gui/actions/styles.c.

References _styles_index, _styles_lists, _styles_menus, and IS_NULL_PTR.

Referenced by _styles_menu_rebuild_idle().

◆ _styles_menu_disabled()

static gboolean _styles_menu_disabled ( GtkWidget widget)
static

Definition at line 43 of file src/gui/actions/styles.c.

References FALSE.

Referenced by append_styles().

◆ _styles_menu_rebuild_callback()

static void _styles_menu_rebuild_callback ( gpointer  instance,
gpointer  user_data 
)
static

Definition at line 329 of file src/gui/actions/styles.c.

References _styles_menu_rebuild_idle(), and _styles_menu_rebuild_source.

Referenced by append_styles().

◆ _styles_menu_rebuild_idle()

static gboolean _styles_menu_rebuild_idle ( gpointer  user_data)
static

◆ _styles_open_popup_callback()

static gboolean _styles_open_popup_callback ( GtkAccelGroup *  group,
GObject *  acceleratable,
guint  keyval,
GdkModifierType  mods,
gpointer  user_data 
)
static

◆ append_styles()

Variable Documentation

◆ _styles_index

dt_menus_t _styles_index = DT_MENU_STYLES
static

◆ _styles_lists

GList** _styles_lists = NULL
static

◆ _styles_menu_rebuild_source

guint _styles_menu_rebuild_source = 0
static

◆ _styles_menus

GtkWidget** _styles_menus = NULL
static

◆ _styles_signal_connected

gboolean _styles_signal_connected = FALSE
static

Definition at line 40 of file src/gui/actions/styles.c.

Referenced by append_styles().