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:

committed by
Sven Neumann

parent
42a215195d
commit
05e390692b
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
Reference in New Issue
Block a user