Mercurial > pidgin.yaz
changeset 11019:86725cfe0550
[gaim-migrate @ 12890]
sf patch #1223530, from Richard Laager
When saving an image from a GtkImHtml, a couple
different errors can occur. The existing code creates a
dialog for these situations, but never shows it. This patch
fixes that and also improves the formatting of the dialogs.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 22 Jun 2005 22:46:18 +0000 |
parents | 04f280376f06 |
children | 407e47f580e4 |
files | src/gtkimhtml.c |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkimhtml.c Wed Jun 22 22:41:59 2005 +0000 +++ b/src/gtkimhtml.c Wed Jun 22 22:46:18 2005 +0000 @@ -3118,16 +3118,20 @@ /* If I can't find a valid type, I will just tell the user about it and then assume it's a png */ if (!type){ - gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, - _("Unable to guess the image type based on the file extension supplied. Defaulting to PNG.")); + GtkWidget *dialog = gtk_message_dialog_new_with_markup(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, + _("<span size='larger' weight='bold'>Unrecognized file type</span>\n\nDefaulting to PNG.")); + g_signal_connect_swapped(dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog); + gtk_widget_show(dialog); type = g_strdup("png"); } gdk_pixbuf_save(image->pixbuf, filename, type, &error, NULL); if (error){ - gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, - _("Error saving image: %s"), error->message); + GtkWidget *dialog = gtk_message_dialog_new_with_markup(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, + _("<span size='larger' weight='bold'>Error saving image</span>\n\n%s"), error->message); + g_signal_connect_swapped(dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog); + gtk_widget_show(dialog); g_error_free(error); }