use a GtkMessageDialog to display errors.
2006-12-30 Sven Neumann <sven@gimp.org> * plug-ins/print/print.c: use a GtkMessageDialog to display errors. * plug-ins/print/print-settings.c: use g_warning() for problems that shouldn't ever happen. svn path=/trunk/; revision=21608
This commit is contained in:

committed by
Sven Neumann

parent
52058ce9e7
commit
8354d1f543
@ -1,3 +1,10 @@
|
||||
2006-12-30 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/print/print.c: use a GtkMessageDialog to display errors.
|
||||
|
||||
* plug-ins/print/print-settings.c: use g_warning() for problems
|
||||
that shouldn't ever happen.
|
||||
|
||||
2006-12-29 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/tools/gimpscaletool.c (gimp_scale_tool_size_notify): take
|
||||
|
@ -157,7 +157,7 @@ save_print_settings_resource_file (GKeyFile *settings_key_file)
|
||||
contents = g_key_file_to_data (settings_key_file, &length, &error);
|
||||
if (error)
|
||||
{
|
||||
g_message ("Unable to get contents of settings key file: %s",
|
||||
g_warning ("Unable to get contents of settings key file: %s",
|
||||
error->message);
|
||||
g_error_free (error);
|
||||
return;
|
||||
@ -167,7 +167,7 @@ save_print_settings_resource_file (GKeyFile *settings_key_file)
|
||||
|
||||
if (! g_file_set_contents (filename, contents, length, &error))
|
||||
{
|
||||
g_message ("Unable to write print settings to '%s': %s",
|
||||
g_warning ("Unable to write print settings to '%s': %s",
|
||||
gimp_filename_to_utf8 (filename), error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
@ -191,7 +191,7 @@ save_print_settings_as_parasite (GKeyFile *settings_key_file,
|
||||
contents = g_key_file_to_data (settings_key_file, &length, &error);
|
||||
if (! contents)
|
||||
{
|
||||
g_message ("Unable to get contents of settings key file: %s",
|
||||
g_warning ("Unable to get contents of settings key file: %s",
|
||||
error->message);
|
||||
g_error_free (error);
|
||||
return;
|
||||
|
@ -219,8 +219,21 @@ print_image (gint32 image_ID,
|
||||
|
||||
if (error)
|
||||
{
|
||||
g_message (error->message);
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = gtk_message_dialog_new (NULL, 0,
|
||||
GTK_MESSAGE_ERROR,
|
||||
GTK_BUTTONS_OK,
|
||||
_("An error occurred while trying to print:"));
|
||||
|
||||
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
|
||||
error->message);
|
||||
g_error_free (error);
|
||||
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
gtk_dialog_run (GTK_DIALOG (dialog));
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
Reference in New Issue
Block a user