From 05e390692b34f05662d5d30d782dd237f0c3ff7c Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Wed, 26 Mar 2003 13:24:40 +0000 Subject: [PATCH] reset the tool-options before loading the user settings. Don't warn if 2003-03-26 Sven Neumann * 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. --- ChangeLog | 6 ++++++ app/gui/tool-options-dialog.c | 11 +++++------ app/widgets/gimptooloptionseditor.c | 11 +++++------ 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index b33aab2b46..6cd74b678a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-03-26 Sven Neumann + + * 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 * app/widgets/gimpfontselection-dialog.c diff --git a/app/gui/tool-options-dialog.c b/app/gui/tool-options-dialog.c index 5ba0b16ad2..64c0a3d550 100644 --- a/app/gui/tool-options-dialog.c +++ b/app/gui/tool-options-dialog.c @@ -261,18 +261,17 @@ tool_options_dialog_restore_callback (GtkWidget *widget, GimpContext *context) { GimpToolInfo *tool_info; - GError *error = NULL; tool_info = gimp_context_get_tool (context); if (! tool_info) return; - if (! gimp_tool_options_deserialize (tool_info->tool_options, "user", &error)) - { - g_message ("EEK: %s\n", error->message); - g_clear_error (&error); - } + /* Need to reset the tool-options since only the changes + * from the default values are written to disk. + */ + gimp_tool_options_reset (tool_info->tool_options); + gimp_tool_options_deserialize (tool_info->tool_options, "user", NULL); } static void diff --git a/app/widgets/gimptooloptionseditor.c b/app/widgets/gimptooloptionseditor.c index 5ba0b16ad2..64c0a3d550 100644 --- a/app/widgets/gimptooloptionseditor.c +++ b/app/widgets/gimptooloptionseditor.c @@ -261,18 +261,17 @@ tool_options_dialog_restore_callback (GtkWidget *widget, GimpContext *context) { GimpToolInfo *tool_info; - GError *error = NULL; tool_info = gimp_context_get_tool (context); if (! tool_info) return; - if (! gimp_tool_options_deserialize (tool_info->tool_options, "user", &error)) - { - g_message ("EEK: %s\n", error->message); - g_clear_error (&error); - } + /* Need to reset the tool-options since only the changes + * from the default values are written to disk. + */ + gimp_tool_options_reset (tool_info->tool_options); + gimp_tool_options_deserialize (tool_info->tool_options, "user", NULL); } static void