reset the tool-options before loading the user settings. Don't warn if

2003-03-26  Sven Neumann  <sven@gimp.org>

	* app/gui/tool-options-dialog.c (tool_options_dialog_restore_callback):
	reset the tool-options before loading the user settings. Don't warn if
	loading fails.
This commit is contained in:
Sven Neumann
2003-03-26 13:24:40 +00:00
committed by Sven Neumann
parent 42a215195d
commit 05e390692b
3 changed files with 16 additions and 12 deletions

View File

@ -1,3 +1,9 @@
2003-03-26 Sven Neumann <sven@gimp.org>
* app/gui/tool-options-dialog.c (tool_options_dialog_restore_callback):
reset the tool-options before loading the user settings. Don't warn if
loading fails.
2003-03-26 Sven Neumann <sven@gimp.org> 2003-03-26 Sven Neumann <sven@gimp.org>
* app/widgets/gimpfontselection-dialog.c * app/widgets/gimpfontselection-dialog.c

View File

@ -261,18 +261,17 @@ tool_options_dialog_restore_callback (GtkWidget *widget,
GimpContext *context) GimpContext *context)
{ {
GimpToolInfo *tool_info; GimpToolInfo *tool_info;
GError *error = NULL;
tool_info = gimp_context_get_tool (context); tool_info = gimp_context_get_tool (context);
if (! tool_info) if (! tool_info)
return; return;
if (! gimp_tool_options_deserialize (tool_info->tool_options, "user", &error)) /* Need to reset the tool-options since only the changes
{ * from the default values are written to disk.
g_message ("EEK: %s\n", error->message); */
g_clear_error (&error); gimp_tool_options_reset (tool_info->tool_options);
} gimp_tool_options_deserialize (tool_info->tool_options, "user", NULL);
} }
static void static void

View File

@ -261,18 +261,17 @@ tool_options_dialog_restore_callback (GtkWidget *widget,
GimpContext *context) GimpContext *context)
{ {
GimpToolInfo *tool_info; GimpToolInfo *tool_info;
GError *error = NULL;
tool_info = gimp_context_get_tool (context); tool_info = gimp_context_get_tool (context);
if (! tool_info) if (! tool_info)
return; return;
if (! gimp_tool_options_deserialize (tool_info->tool_options, "user", &error)) /* Need to reset the tool-options since only the changes
{ * from the default values are written to disk.
g_message ("EEK: %s\n", error->message); */
g_clear_error (&error); gimp_tool_options_reset (tool_info->tool_options);
} gimp_tool_options_deserialize (tool_info->tool_options, "user", NULL);
} }
static void static void