diff --git a/app/config/gimpguiconfig.c b/app/config/gimpguiconfig.c index eaac76b8a6..8a2fe5a261 100644 --- a/app/config/gimpguiconfig.c +++ b/app/config/gimpguiconfig.c @@ -54,6 +54,7 @@ enum PROP_0, PROP_MOVE_TOOL_CHANGES_ACTIVE, PROP_FILTER_TOOL_MAX_RECENT, + PROP_FILTER_TOOL_SHOW_COLOR_OPTIONS, PROP_TRUST_DIRTY_FLAG, PROP_SAVE_DEVICE_STATUS, PROP_DEVICES_SHARE_TOOL, @@ -163,6 +164,13 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass) 0, 255, 10, GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_FILTER_TOOL_SHOW_COLOR_OPTIONS, + "filter-tool-show-color-options", + "Show avanced color options in filters", + FILTER_TOOL_SHOW_COLOR_OPTIONS_BLURB, + FALSE, + GIMP_PARAM_STATIC_STRINGS); + GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_TRUST_DIRTY_FLAG, "trust-dirty-flag", "Trust dirty flag", @@ -567,6 +575,9 @@ gimp_gui_config_set_property (GObject *object, case PROP_IMAGE_MAP_TOOL_MAX_RECENT: gui_config->filter_tool_max_recent = g_value_get_int (value); break; + case PROP_FILTER_TOOL_SHOW_COLOR_OPTIONS: + gui_config->filter_tool_show_color_options = g_value_get_boolean (value); + break; case PROP_TRUST_DIRTY_FLAG: gui_config->trust_dirty_flag = g_value_get_boolean (value); break; @@ -749,6 +760,9 @@ gimp_gui_config_get_property (GObject *object, case PROP_IMAGE_MAP_TOOL_MAX_RECENT: g_value_set_int (value, gui_config->filter_tool_max_recent); break; + case PROP_FILTER_TOOL_SHOW_COLOR_OPTIONS: + g_value_set_boolean (value, gui_config->filter_tool_show_color_options); + break; case PROP_TRUST_DIRTY_FLAG: g_value_set_boolean (value, gui_config->trust_dirty_flag); break; diff --git a/app/config/gimpguiconfig.h b/app/config/gimpguiconfig.h index d4c6c6cad6..7fbe4363ac 100644 --- a/app/config/gimpguiconfig.h +++ b/app/config/gimpguiconfig.h @@ -43,6 +43,7 @@ struct _GimpGuiConfig gboolean move_tool_changes_active; gint filter_tool_max_recent; + gboolean filter_tool_show_color_options; gboolean trust_dirty_flag; gboolean save_device_status; gboolean devices_share_tool; diff --git a/app/config/gimprc-blurbs.h b/app/config/gimprc-blurbs.h index c14243fa9d..84e59f90e5 100644 --- a/app/config/gimprc-blurbs.h +++ b/app/config/gimprc-blurbs.h @@ -173,7 +173,10 @@ _("Sets the browser used by the help system.") "If empty, the language is taken from the user's locale setting." #define FILTER_TOOL_MAX_RECENT_BLURB \ -"How many recent settings to keep around in filter tools" +_("How many recent settings to keep around in filter tools.") + +#define FILTER_TOOL_SHOW_COLOR_OPTIONS_BLURB \ +_("Show advanced color options in filter tools.") #define IMAGE_STATUS_FORMAT_BLURB \ _("Sets the text to appear in image window status bars.") diff --git a/app/dialogs/preferences-dialog.c b/app/dialogs/preferences-dialog.c index 55770f667f..01e9ac0a6a 100644 --- a/app/dialogs/preferences-dialog.c +++ b/app/dialogs/preferences-dialog.c @@ -441,6 +441,7 @@ prefs_color_management_reset (GtkWidget *widget, gimp_config_reset (GIMP_CONFIG (core_config->color_management)); gimp_config_reset_property (config, "color-profile-policy"); + gimp_config_reset_property (config, "filter-tool-show-color-options"); } static void @@ -1272,6 +1273,14 @@ prefs_dialog_new (Gimp *gimp, _("File Open behaviour:"), GTK_TABLE (table), 0, size_group); + /* Filter Dialogs */ + vbox2 = prefs_frame_new (_("Filter Dialogs"), GTK_CONTAINER (vbox), + FALSE); + + button = prefs_check_button_add (object, "filter-tool-show-color-options", + _("Show advanced color options"), + GTK_BOX (vbox2)); + g_object_unref (size_group); g_object_unref (store); diff --git a/app/tools/gimpfiltertool.c b/app/tools/gimpfiltertool.c index 88a94a9f98..b200d2db0b 100644 --- a/app/tools/gimpfiltertool.c +++ b/app/tools/gimpfiltertool.c @@ -426,7 +426,11 @@ gimp_filter_tool_initialize (GimpTool *tool, /* The Color Options expander */ expander = gtk_expander_new (_("Advanced Color Options")); gtk_box_pack_end (GTK_BOX (vbox), expander, FALSE, FALSE, 0); - gtk_widget_show (expander); + + g_object_bind_property (G_OBJECT (image->gimp->config), + "filter-tool-show-color-options", + G_OBJECT (expander), "visible", + G_BINDING_SYNC_CREATE); frame = gimp_frame_new (NULL); gtk_container_add (GTK_CONTAINER (expander), frame);