Commit efed2bf6 authored by Michael Natterer's avatar Michael Natterer 😴

app: some cleanup and fixes in the tool preset infrastructure

parent bcf64e05
......@@ -163,8 +163,8 @@ libappactions_a_SOURCES = \
tool-options-commands.h \
tool-preset-actions.c \
tool-preset-actions.h \
tool-preset-editor-actions.c \
tool-preset-editor-actions.h \
tool-preset-editor-actions.c \
tool-preset-editor-actions.h \
tools-actions.c \
tools-actions.h \
tools-commands.c \
......
......@@ -171,7 +171,7 @@ static const GimpActionFactoryEntry action_groups[] =
{ "gradients", N_("Gradients"), GIMP_STOCK_GRADIENT,
gradients_actions_setup,
gradients_actions_update },
{ "tool-preset", N_("Tool Presets"), GIMP_STOCK_DYNAMICS,
{ "tool-preset", N_("Tool Presets"), GIMP_STOCK_TOOL_PRESET,
tool_preset_actions_setup,
tool_preset_actions_update },
{ "help", N_("Help"), GTK_STOCK_HELP,
......
......@@ -142,12 +142,6 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
"gimp-dynamics-list",
GIMP_HELP_DYNAMICS_DIALOG },
{ "dialogs-tool-presets", GIMP_STOCK_TOOL_PRESET,
NC_("dialogs-action", "Tool presets"), NULL,
NC_("dialogs-action", "Open tool presets dialog"),
"gimp-tool-preset-list",
GIMP_HELP_TOOL_PRESET_DIALOG },
{ "dialogs-dynamics-editor", GIMP_STOCK_DYNAMICS,
NC_("dialogs-action", "Paint Dynamics Editor"), NULL,
NC_("dialogs-action", "Open the paint dynamics editor"),
......@@ -184,6 +178,12 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
"gimp-palette-editor",
GIMP_HELP_PALETTE_EDIT },
{ "dialogs-tool-presets", GIMP_STOCK_TOOL_PRESET,
NC_("dialogs-action", "Tool presets"), NULL,
NC_("dialogs-action", "Open tool presets dialog"),
"gimp-tool-preset-list",
GIMP_HELP_TOOL_PRESET_DIALOG },
{ "dialogs-fonts", GIMP_STOCK_FONT,
NC_("dialogs-action", "_Fonts"), NULL,
NC_("dialogs-action", "Open the fonts dialog"),
......
......@@ -37,14 +37,14 @@
#include "gimp-intl.h"
#define DEFAULT_BRUSH "Round Fuzzy"
#define DEFAULT_DYNAMICS "Basic Dynamics"
#define DEFAULT_PATTERN "Pine"
#define DEFAULT_PALETTE "Default"
#define DEFAULT_GRADIENT "FG to BG (RGB)"
#define DEFAULT_TOOL_PRESET "Current Options"
#define DEFAULT_FONT "Sans"
#define DEFAULT_COMMENT "Created with GIMP"
#define DEFAULT_BRUSH "Round Fuzzy"
#define DEFAULT_DYNAMICS "Basic Dynamics"
#define DEFAULT_PATTERN "Pine"
#define DEFAULT_PALETTE "Default"
#define DEFAULT_GRADIENT "FG to BG (RGB)"
#define DEFAULT_TOOL_PRESET "Current Options"
#define DEFAULT_FONT "Sans"
#define DEFAULT_COMMENT "Created with GIMP"
enum
......@@ -149,6 +149,7 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_TYPE_INTERPOLATION_TYPE,
GIMP_INTERPOLATION_CUBIC,
GIMP_PARAM_STATIC_STRINGS);
path = gimp_config_build_plug_in_path ("plug-ins");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PLUG_IN_PATH,
"plug-in-path", PLUG_IN_PATH_BLURB,
......@@ -156,6 +157,7 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_plug_in_path ("modules");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_MODULE_PATH,
"module-path", MODULE_PATH_BLURB,
......@@ -163,6 +165,7 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_plug_in_path ("interpreters");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_INTERPRETER_PATH,
"interpreter-path", INTERPRETER_PATH_BLURB,
......@@ -170,6 +173,7 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_plug_in_path ("environ");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_ENVIRON_PATH,
"environ-path", ENVIRON_PATH_BLURB,
......@@ -177,6 +181,7 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_data_path ("brushes");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_BRUSH_PATH,
"brush-path", BRUSH_PATH_BLURB,
......@@ -184,6 +189,7 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_writable_path ("brushes");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_BRUSH_PATH_WRITABLE,
"brush-path-writable",
......@@ -192,6 +198,7 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_data_path ("dynamics");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_DYNAMICS_PATH,
"dynamics-path", DYNAMICS_PATH_BLURB,
......@@ -199,6 +206,7 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_writable_path ("dynamics");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_DYNAMICS_PATH_WRITABLE,
"dynamics-path-writable",
......@@ -207,6 +215,7 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_data_path ("patterns");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PATTERN_PATH,
"pattern-path", PATTERN_PATH_BLURB,
......@@ -214,6 +223,7 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_writable_path ("patterns");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PATTERN_PATH_WRITABLE,
"pattern-path-writable",
......@@ -222,6 +232,7 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_data_path ("palettes");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PALETTE_PATH,
"palette-path", PALETTE_PATH_BLURB,
......@@ -229,6 +240,7 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_writable_path ("palettes");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PALETTE_PATH_WRITABLE,
"palette-path-writable",
......@@ -237,6 +249,7 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_data_path ("gradients");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_GRADIENT_PATH,
"gradient-path", GRADIENT_PATH_BLURB,
......@@ -244,6 +257,7 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_writable_path ("gradients");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_GRADIENT_PATH_WRITABLE,
"gradient-path-writable",
......@@ -252,13 +266,6 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_data_path ("fonts");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_FONT_PATH,
"font-path", FONT_PATH_BLURB,
GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_CONFIRM);
g_free (path);
path = gimp_config_build_data_path ("tool-presets");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_TOOL_PRESET_PATH,
......@@ -267,6 +274,7 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_writable_path ("tool-presets");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_TOOL_PRESET_PATH_WRITABLE,
"tool-preset-path-writable",
......@@ -276,6 +284,14 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
path = gimp_config_build_data_path ("fonts");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_FONT_PATH,
"font-path", FONT_PATH_BLURB,
GIMP_CONFIG_PATH_DIR_LIST, path,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_CONFIRM);
g_free (path);
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_FONT_PATH_WRITABLE,
"font-path-writable", NULL,
GIMP_CONFIG_PATH_DIR_LIST, NULL,
......@@ -466,18 +482,18 @@ gimp_core_config_finalize (GObject *object)
g_free (core_config->pattern_path_writable);
g_free (core_config->palette_path);
g_free (core_config->palette_path_writable);
g_free (core_config->tool_preset_path);
g_free (core_config->tool_preset_path_writable);
g_free (core_config->gradient_path);
g_free (core_config->gradient_path_writable);
g_free (core_config->tool_preset_path);
g_free (core_config->tool_preset_path_writable);
g_free (core_config->font_path);
g_free (core_config->font_path_writable);
g_free (core_config->default_brush);
g_free (core_config->default_dynamics);
g_free (core_config->default_pattern);
g_free (core_config->default_palette);
g_free (core_config->default_tool_preset);
g_free (core_config->default_gradient);
g_free (core_config->default_tool_preset);
g_free (core_config->default_font);
g_free (core_config->plug_in_rc_path);
......@@ -542,14 +558,6 @@ gimp_core_config_set_property (GObject *object,
g_free (core_config->dynamics_path_writable);
core_config->dynamics_path_writable = g_value_dup_string (value);
break;
case PROP_TOOL_PRESET_PATH:
g_free (core_config->tool_preset_path);
core_config->tool_preset_path = g_value_dup_string (value);
break;
case PROP_TOOL_PRESET_PATH_WRITABLE:
g_free (core_config->tool_preset_path_writable);
core_config->tool_preset_path_writable = g_value_dup_string (value);
break;
case PROP_PATTERN_PATH:
g_free (core_config->pattern_path);
core_config->pattern_path = g_value_dup_string (value);
......@@ -574,6 +582,14 @@ gimp_core_config_set_property (GObject *object,
g_free (core_config->gradient_path_writable);
core_config->gradient_path_writable = g_value_dup_string (value);
break;
case PROP_TOOL_PRESET_PATH:
g_free (core_config->tool_preset_path);
core_config->tool_preset_path = g_value_dup_string (value);
break;
case PROP_TOOL_PRESET_PATH_WRITABLE:
g_free (core_config->tool_preset_path_writable);
core_config->tool_preset_path_writable = g_value_dup_string (value);
break;
case PROP_FONT_PATH:
g_free (core_config->font_path);
core_config->font_path = g_value_dup_string (value);
......@@ -733,12 +749,6 @@ gimp_core_config_get_property (GObject *object,
case PROP_DYNAMICS_PATH_WRITABLE:
g_value_set_string (value, core_config->dynamics_path_writable);
break;
case PROP_TOOL_PRESET_PATH:
g_value_set_string (value, core_config->tool_preset_path);
break;
case PROP_TOOL_PRESET_PATH_WRITABLE:
g_value_set_string (value, core_config->tool_preset_path_writable);
break;
case PROP_PATTERN_PATH:
g_value_set_string (value, core_config->pattern_path);
break;
......@@ -757,6 +767,12 @@ gimp_core_config_get_property (GObject *object,
case PROP_GRADIENT_PATH_WRITABLE:
g_value_set_string (value, core_config->gradient_path_writable);
break;
case PROP_TOOL_PRESET_PATH:
g_value_set_string (value, core_config->tool_preset_path);
break;
case PROP_TOOL_PRESET_PATH_WRITABLE:
g_value_set_string (value, core_config->tool_preset_path_writable);
break;
case PROP_FONT_PATH:
g_value_set_string (value, core_config->font_path);
break;
......
......@@ -55,10 +55,10 @@ struct _GimpCoreConfig
gchar *palette_path_writable;
gchar *gradient_path;
gchar *gradient_path_writable;
gchar *font_path;
gchar *font_path_writable; /* unused */
gchar *tool_preset_path;
gchar *tool_preset_path_writable;
gchar *font_path;
gchar *font_path_writable; /* unused */
gchar *default_brush;
gchar *default_dynamics;
gchar *default_pattern;
......
......@@ -610,50 +610,51 @@ typedef enum /*< pdb-skip >*/
typedef enum /*< pdb-skip, skip >*/
{
GIMP_CONTEXT_FIRST_PROP = 2,
GIMP_CONTEXT_PROP_IMAGE = GIMP_CONTEXT_FIRST_PROP,
GIMP_CONTEXT_PROP_DISPLAY = 3,
GIMP_CONTEXT_PROP_TOOL = 4,
GIMP_CONTEXT_PROP_PAINT_INFO = 5,
GIMP_CONTEXT_PROP_FOREGROUND = 6,
GIMP_CONTEXT_PROP_BACKGROUND = 7,
GIMP_CONTEXT_PROP_OPACITY = 8,
GIMP_CONTEXT_PROP_PAINT_MODE = 9,
GIMP_CONTEXT_PROP_BRUSH = 10,
GIMP_CONTEXT_PROP_DYNAMICS = 11,
GIMP_CONTEXT_PROP_PATTERN = 12,
GIMP_CONTEXT_PROP_GRADIENT = 13,
GIMP_CONTEXT_PROP_PALETTE = 14,
GIMP_CONTEXT_PROP_TOOL_PRESET= 15,
GIMP_CONTEXT_PROP_FONT = 16,
GIMP_CONTEXT_PROP_BUFFER = 17,
GIMP_CONTEXT_PROP_IMAGEFILE = 18,
GIMP_CONTEXT_PROP_TEMPLATE = 19,
GIMP_CONTEXT_LAST_PROP = GIMP_CONTEXT_PROP_TEMPLATE
GIMP_CONTEXT_FIRST_PROP = 2,
GIMP_CONTEXT_PROP_IMAGE = GIMP_CONTEXT_FIRST_PROP,
GIMP_CONTEXT_PROP_DISPLAY = 3,
GIMP_CONTEXT_PROP_TOOL = 4,
GIMP_CONTEXT_PROP_PAINT_INFO = 5,
GIMP_CONTEXT_PROP_FOREGROUND = 6,
GIMP_CONTEXT_PROP_BACKGROUND = 7,
GIMP_CONTEXT_PROP_OPACITY = 8,
GIMP_CONTEXT_PROP_PAINT_MODE = 9,
GIMP_CONTEXT_PROP_BRUSH = 10,
GIMP_CONTEXT_PROP_DYNAMICS = 11,
GIMP_CONTEXT_PROP_PATTERN = 12,
GIMP_CONTEXT_PROP_GRADIENT = 13,
GIMP_CONTEXT_PROP_PALETTE = 14,
GIMP_CONTEXT_PROP_TOOL_PRESET = 15,
GIMP_CONTEXT_PROP_FONT = 16,
GIMP_CONTEXT_PROP_BUFFER = 17,
GIMP_CONTEXT_PROP_IMAGEFILE = 18,
GIMP_CONTEXT_PROP_TEMPLATE = 19,
GIMP_CONTEXT_LAST_PROP = GIMP_CONTEXT_PROP_TEMPLATE
} GimpContextPropType;
typedef enum /*< pdb-skip, skip >*/
{
GIMP_CONTEXT_IMAGE_MASK = 1 << 2,
GIMP_CONTEXT_DISPLAY_MASK = 1 << 3,
GIMP_CONTEXT_TOOL_MASK = 1 << 4,
GIMP_CONTEXT_PAINT_INFO_MASK = 1 << 5,
GIMP_CONTEXT_FOREGROUND_MASK = 1 << 6,
GIMP_CONTEXT_BACKGROUND_MASK = 1 << 7,
GIMP_CONTEXT_OPACITY_MASK = 1 << 8,
GIMP_CONTEXT_PAINT_MODE_MASK = 1 << 9,
GIMP_CONTEXT_BRUSH_MASK = 1 << 10,
GIMP_CONTEXT_DYNAMICS_MASK = 1 << 11,
GIMP_CONTEXT_PATTERN_MASK = 1 << 12,
GIMP_CONTEXT_GRADIENT_MASK = 1 << 13,
GIMP_CONTEXT_PALETTE_MASK = 1 << 14,
GIMP_CONTEXT_FONT_MASK = 1 << 15,
GIMP_CONTEXT_BUFFER_MASK = 1 << 16,
GIMP_CONTEXT_IMAGEFILE_MASK = 1 << 17,
GIMP_CONTEXT_TEMPLATE_MASK = 1 << 18,
GIMP_CONTEXT_IMAGE_MASK = 1 << 2,
GIMP_CONTEXT_DISPLAY_MASK = 1 << 3,
GIMP_CONTEXT_TOOL_MASK = 1 << 4,
GIMP_CONTEXT_PAINT_INFO_MASK = 1 << 5,
GIMP_CONTEXT_FOREGROUND_MASK = 1 << 6,
GIMP_CONTEXT_BACKGROUND_MASK = 1 << 7,
GIMP_CONTEXT_OPACITY_MASK = 1 << 8,
GIMP_CONTEXT_PAINT_MODE_MASK = 1 << 9,
GIMP_CONTEXT_BRUSH_MASK = 1 << 10,
GIMP_CONTEXT_DYNAMICS_MASK = 1 << 11,
GIMP_CONTEXT_PATTERN_MASK = 1 << 12,
GIMP_CONTEXT_GRADIENT_MASK = 1 << 13,
GIMP_CONTEXT_PALETTE_MASK = 1 << 14,
GIMP_CONTEXT_TOOL_PRESET_MASK = 1 << 15,
GIMP_CONTEXT_FONT_MASK = 1 << 16,
GIMP_CONTEXT_BUFFER_MASK = 1 << 17,
GIMP_CONTEXT_IMAGEFILE_MASK = 1 << 18,
GIMP_CONTEXT_TEMPLATE_MASK = 1 << 19,
/* aliases */
GIMP_CONTEXT_PAINT_PROPS_MASK = (GIMP_CONTEXT_FOREGROUND_MASK |
......
......@@ -249,7 +249,6 @@ gimp_init (Gimp *gimp)
gimp->pattern_factory = NULL;
gimp->gradient_factory = NULL;
gimp->palette_factory = NULL;
gimp->tool_preset_factory = NULL;
gimp->tag_cache = NULL;
......@@ -584,7 +583,7 @@ gimp_real_initialize (Gimp *gimp,
static const GimpDataFactoryLoaderEntry tool_preset_loader_entries[] =
{
{ gimp_tool_preset_load, GIMP_TOOL_PRESET_FILE_EXTENSION, TRUE }
{ gimp_tool_preset_load, GIMP_TOOL_PRESET_FILE_EXTENSION, TRUE }
};
GimpData *clipboard_brush;
......@@ -733,7 +732,6 @@ gimp_real_exit (Gimp *gimp,
gimp_data_factory_data_save (gimp->pattern_factory);
gimp_data_factory_data_save (gimp->gradient_factory);
gimp_data_factory_data_save (gimp->palette_factory);
gimp_data_factory_data_save (gimp->tool_preset_factory);
gimp_fonts_reset (gimp);
......
......@@ -45,9 +45,9 @@
#include "gimppaintinfo.h"
#include "gimppalette.h"
#include "gimppattern.h"
#include "gimptoolpreset.h"
#include "gimptemplate.h"
#include "gimptoolinfo.h"
#include "gimptoolpreset.h"
#include "text/gimpfont.h"
......@@ -207,15 +207,15 @@ static void gimp_context_real_set_palette (GimpContext *context,
GimpPalette *palatte);
/* tool preset */
static void gimp_context_tool_preset_dirty (GimpToolPreset *tool_preset,
GimpContext *context);
static void gimp_context_tool_preset_removed (GimpContainer *container,
GimpToolPreset *tool_preset,
GimpContext *context);
static void gimp_context_tool_preset_list_thaw (GimpContainer *container,
GimpContext *context);
static void gimp_context_real_set_tool_preset (GimpContext *context,
GimpToolPreset *tool_preset);
static void gimp_context_tool_preset_dirty (GimpToolPreset *tool_preset,
GimpContext *context);
static void gimp_context_tool_preset_removed (GimpContainer *container,
GimpToolPreset *tool_preset,
GimpContext *context);
static void gimp_context_tool_preset_list_thaw (GimpContainer *container,
GimpContext *context);
static void gimp_context_real_set_tool_preset (GimpContext *context,
GimpToolPreset *tool_preset);
/* font */
static void gimp_context_font_dirty (GimpFont *font,
......@@ -1664,7 +1664,6 @@ gimp_context_copy_property (GimpContext *src,
dest_name_loc = &dest->palette_name;
break;
case GIMP_CONTEXT_PROP_TOOL_PRESET:
gimp_context_real_set_tool_preset (dest, src->tool_preset);
object = src->tool_preset;
......@@ -3050,6 +3049,7 @@ gimp_context_real_set_palette (GimpContext *context,
gimp_context_palette_changed (context);
}
/********************************************************************************/
/* tool preset *****************************************************************/
......@@ -3084,16 +3084,16 @@ gimp_context_tool_preset_changed (GimpContext *context)
static void
gimp_context_tool_preset_dirty (GimpToolPreset *tool_preset,
GimpContext *context)
GimpContext *context)
{
g_free (context->tool_preset_name);
context->tool_preset_name = g_strdup (gimp_object_get_name (tool_preset));
}
static void
gimp_context_tool_preset_removed (GimpContainer *container,
GimpToolPreset *tool_preset,
GimpContext *context)
gimp_context_tool_preset_removed (GimpContainer *container,
GimpToolPreset *tool_preset,
GimpContext *context)
{
if (tool_preset == context->tool_preset)
{
......@@ -3111,7 +3111,7 @@ gimp_context_tool_preset_removed (GimpContainer *container,
static void
gimp_context_tool_preset_list_thaw (GimpContainer *container,
GimpContext *context)
GimpContext *context)
{
GimpToolPreset *tool_preset;
......@@ -3126,8 +3126,8 @@ gimp_context_tool_preset_list_thaw (GimpContainer *container,
}
static void
gimp_context_real_set_tool_preset (GimpContext *context,
GimpToolPreset *tool_preset)
gimp_context_real_set_tool_preset (GimpContext *context,
GimpToolPreset *tool_preset)
{
if (! standard_tool_preset)
{
......
......@@ -197,112 +197,112 @@ GimpContextPropType gimp_context_type_to_property (GType type);
const gchar * gimp_context_type_to_prop_name (GType type);
const gchar * gimp_context_type_to_signal_name (GType type);
GimpObject * gimp_context_get_by_type (GimpContext *context,
GType type);
void gimp_context_set_by_type (GimpContext *context,
GType type,
GimpObject *object);
void gimp_context_changed_by_type (GimpContext *context,
GType type);
GimpObject * gimp_context_get_by_type (GimpContext *context,
GType type);
void gimp_context_set_by_type (GimpContext *context,
GType type,
GimpObject *object);
void gimp_context_changed_by_type (GimpContext *context,
GType type);
/* image */
GimpImage * gimp_context_get_image (GimpContext *context);
void gimp_context_set_image (GimpContext *context,
GimpImage *image);
void gimp_context_image_changed (GimpContext *context);
GimpImage * gimp_context_get_image (GimpContext *context);
void gimp_context_set_image (GimpContext *context,
GimpImage *image);
void gimp_context_image_changed (GimpContext *context);
/* display */
gpointer gimp_context_get_display (GimpContext *context);
void gimp_context_set_display (GimpContext *context,
gpointer display);
void gimp_context_display_changed (GimpContext *context);
gpointer gimp_context_get_display (GimpContext *context);
void gimp_context_set_display (GimpContext *context,
gpointer display);
void gimp_context_display_changed (GimpContext *context);
/* tool */
GimpToolInfo * gimp_context_get_tool (GimpContext *context);
void gimp_context_set_tool (GimpContext *context,
GimpToolInfo *tool_info);
void gimp_context_tool_changed (GimpContext *context);
GimpToolInfo * gimp_context_get_tool (GimpContext *context);
void gimp_context_set_tool (GimpContext *context,
GimpToolInfo *tool_info);
void gimp_context_tool_changed (GimpContext *context);
/* paint info */
GimpPaintInfo * gimp_context_get_paint_info (GimpContext *context);
void gimp_context_set_paint_info (GimpContext *context,
GimpPaintInfo *paint_info);
void gimp_context_paint_info_changed (GimpContext *context);
GimpPaintInfo * gimp_context_get_paint_info (GimpContext *context);
void gimp_context_set_paint_info (GimpContext *context,
GimpPaintInfo *paint_info);
void gimp_context_paint_info_changed (GimpContext *context);
/* foreground color */
void gimp_context_get_foreground (GimpContext *context,
GimpRGB *color);
void gimp_context_set_foreground (GimpContext *context,
const GimpRGB *color);
void gimp_context_foreground_changed (GimpContext *context);
void gimp_context_get_foreground (GimpContext *context,
GimpRGB *color);
void gimp_context_set_foreground (GimpContext *context,
const GimpRGB *color);
void gimp_context_foreground_changed (GimpContext *context);
/* background color */
void gimp_context_get_background (GimpContext *context,
GimpRGB *color);
void gimp_context_set_background (GimpContext *context,
const GimpRGB *color);
void gimp_context_background_changed (GimpContext *context);
void gimp_context_get_background (GimpContext *context,
GimpRGB *color);
void gimp_context_set_background (GimpContext *context,
const GimpRGB *color);
void gimp_context_background_changed (GimpContext *context);
/* color utility functions */
void gimp_context_set_default_colors (GimpContext *context);
void gimp_context_swap_colors (GimpContext *context);
void gimp_context_set_default_colors (GimpContext *context);
void gimp_context_swap_colors (GimpContext *context);
/* opacity */
gdouble gimp_context_get_opacity (GimpContext *context);
void gimp_context_set_opacity (GimpContext *context,
gdouble opacity);
void gimp_context_opacity_changed (GimpContext *context);
gdouble gimp_context_get_opacity (GimpContext *context);
void gimp_context_set_opacity (GimpContext *context,
gdouble opacity);
void gimp_context_opacity_changed (GimpContext *context);
/* paint mode */
GimpLayerModeEffects
gimp_context_get_paint_mode (GimpContext *context);
void gimp_context_set_paint_mode (GimpContext *context,
GimpLayerModeEffects paint_mode);
void gimp_context_paint_mode_changed (GimpContext *context);
gimp_context_get_paint_mode (GimpContext *context);
void gimp_context_set_paint_mode (GimpContext *context,
GimpLayerModeEffects paint_mode);
void gimp_context_paint_mode_changed (GimpContext *context);
/* brush */
GimpBrush * gimp_context_get_brush (GimpContext *context);
void gimp_context_set_brush (GimpContext *context,
GimpBrush *brush);
void gimp_context_brush_changed (GimpContext *context);
GimpBrush * gimp_context_get_brush (GimpContext *context);
void gimp_context_set_brush (GimpContext *context,
GimpBrush *brush);
void gimp_context_brush_changed (GimpContext *context);
/* dynamics */
GimpDynamics * gimp_context_get_dynamics (GimpContext *context);
void gimp_context_set_dynamics (GimpContext *context,
GimpDynamics *dynamics);
void gimp_context_dynamics_changed (GimpContext *context);
GimpDynamics * gimp_context_get_dynamics (GimpContext *context);
void gimp_context_set_dynamics (GimpContext *context,