mirror of https://github.com/GNOME/gimp.git
Bug 794826 - Do not default to last used filter settings
Add GimpGuiConfig::filter-tool-use-last-settings wchich defaults to FALSE. Honor the new option in gimp_gegl_procedure_execute_async() and add it to prefs -> dialog defaults.
This commit is contained in:
parent
14a054e980
commit
fe932fe7ad
|
@ -30,6 +30,8 @@
|
|||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "config/gimpguiconfig.h"
|
||||
|
||||
#include "operations/gimp-operation-config.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
|
@ -276,7 +278,9 @@ gimp_gegl_procedure_execute_async (GimpProcedure *procedure,
|
|||
run_mode = g_value_get_int (gimp_value_array_index (args, 0));
|
||||
settings = g_value_get_object (gimp_value_array_index (args, 3));
|
||||
|
||||
if (! settings)
|
||||
if (! settings &&
|
||||
(run_mode != GIMP_RUN_INTERACTIVE ||
|
||||
GIMP_GUI_CONFIG (gimp->config)->filter_tool_use_last_settings))
|
||||
{
|
||||
/* if we didn't get settings passed, get the last used settings */
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@ enum
|
|||
PROP_0,
|
||||
PROP_MOVE_TOOL_CHANGES_ACTIVE,
|
||||
PROP_FILTER_TOOL_MAX_RECENT,
|
||||
PROP_FILTER_TOOL_USE_LAST_SETTINGS,
|
||||
PROP_FILTER_TOOL_SHOW_COLOR_OPTIONS,
|
||||
PROP_TRUST_DIRTY_FLAG,
|
||||
PROP_SAVE_DEVICE_STATUS,
|
||||
|
@ -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_USE_LAST_SETTINGS,
|
||||
"filter-tool-use-last-settings",
|
||||
"Use last used settings in filters",
|
||||
FILTER_TOOL_USE_LAST_SETTINGS_BLURB,
|
||||
FALSE,
|
||||
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",
|
||||
|
@ -569,6 +577,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_USE_LAST_SETTINGS:
|
||||
gui_config->filter_tool_use_last_settings = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_FILTER_TOOL_SHOW_COLOR_OPTIONS:
|
||||
gui_config->filter_tool_show_color_options = g_value_get_boolean (value);
|
||||
break;
|
||||
|
@ -751,6 +762,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_USE_LAST_SETTINGS:
|
||||
g_value_set_boolean (value, gui_config->filter_tool_use_last_settings);
|
||||
break;
|
||||
case PROP_FILTER_TOOL_SHOW_COLOR_OPTIONS:
|
||||
g_value_set_boolean (value, gui_config->filter_tool_show_color_options);
|
||||
break;
|
||||
|
|
|
@ -43,6 +43,7 @@ struct _GimpGuiConfig
|
|||
|
||||
gboolean move_tool_changes_active;
|
||||
gint filter_tool_max_recent;
|
||||
gboolean filter_tool_use_last_settings;
|
||||
gboolean filter_tool_show_color_options;
|
||||
gboolean trust_dirty_flag;
|
||||
gboolean save_device_status;
|
||||
|
|
|
@ -178,6 +178,9 @@ _("Sets the browser used by the help system.")
|
|||
#define FILTER_TOOL_MAX_RECENT_BLURB \
|
||||
_("How many recent settings to keep around in filter tools.")
|
||||
|
||||
#define FILTER_TOOL_USE_LAST_SETTINGS_BLURB \
|
||||
_("Default to the last used settings in filter tools.")
|
||||
|
||||
#define FILTER_TOOL_SHOW_COLOR_OPTIONS_BLURB \
|
||||
_("Show advanced color options in filter tools.")
|
||||
|
||||
|
|
|
@ -477,6 +477,7 @@ prefs_dialog_defaults_reset (GtkWidget *widget,
|
|||
}
|
||||
|
||||
gimp_config_reset_property (config, "filter-tool-max-recent");
|
||||
gimp_config_reset_property (config, "filter-tool-use-last-settings");
|
||||
gimp_config_reset_property (config, "filter-tool-show-color-options");
|
||||
|
||||
g_object_thaw_notify (config);
|
||||
|
@ -2175,6 +2176,9 @@ prefs_dialog_new (Gimp *gimp,
|
|||
_("Keep recent settings:"),
|
||||
GTK_TABLE (table), 1, size_group);
|
||||
|
||||
button = prefs_check_button_add (object, "filter-tool-use-last-settings",
|
||||
_("Default to the last used settings"),
|
||||
GTK_BOX (vbox2));
|
||||
button = prefs_check_button_add (object, "filter-tool-show-color-options",
|
||||
_("Show advanced color options"),
|
||||
GTK_BOX (vbox2));
|
||||
|
|
Loading…
Reference in New Issue