Mercurial > pidgin.yaz
comparison src/gtkimhtml.c @ 11069:65db26d0bc90
[gaim-migrate @ 13065]
Stu committed this to oldstatus:
"gtk_message_dialog_new_with_markup() is new to Gtk 2.4, so Gaim wouldn't
compile with Gtk < 2.4."
This was broken by a patch I wrote. My apologies, Stu, for the hassle during string freeze. Thanks for fixing it.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Fri, 08 Jul 2005 03:54:31 +0000 |
parents | 86725cfe0550 |
children | 5c56223fa24f |
comparison
equal
deleted
inserted
replaced
11068:9bd0aac996f4 | 11069:65db26d0bc90 |
---|---|
3116 #endif | 3116 #endif |
3117 | 3117 |
3118 /* If I can't find a valid type, I will just tell the user about it and then assume | 3118 /* If I can't find a valid type, I will just tell the user about it and then assume |
3119 it's a png */ | 3119 it's a png */ |
3120 if (!type){ | 3120 if (!type){ |
3121 #if GTK_CHECK_VERSION(2,4,0) | |
3121 GtkWidget *dialog = gtk_message_dialog_new_with_markup(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, | 3122 GtkWidget *dialog = gtk_message_dialog_new_with_markup(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, |
3122 _("<span size='larger' weight='bold'>Unrecognized file type</span>\n\nDefaulting to PNG.")); | 3123 _("<span size='larger' weight='bold'>Unrecognized file type</span>\n\nDefaulting to PNG.")); |
3124 #else | |
3125 GtkWidget *dialog = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, | |
3126 _("Unrecognized file type\n\nDefaulting to PNG.")); | |
3127 #endif | |
3128 | |
3123 g_signal_connect_swapped(dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog); | 3129 g_signal_connect_swapped(dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog); |
3124 gtk_widget_show(dialog); | 3130 gtk_widget_show(dialog); |
3125 type = g_strdup("png"); | 3131 type = g_strdup("png"); |
3126 } | 3132 } |
3127 | 3133 |
3128 gdk_pixbuf_save(image->pixbuf, filename, type, &error, NULL); | 3134 gdk_pixbuf_save(image->pixbuf, filename, type, &error, NULL); |
3129 | 3135 |
3130 if (error){ | 3136 if (error){ |
3137 #if GTK_CHECK_VERSION(2,4,0) | |
3131 GtkWidget *dialog = gtk_message_dialog_new_with_markup(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, | 3138 GtkWidget *dialog = gtk_message_dialog_new_with_markup(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, |
3132 _("<span size='larger' weight='bold'>Error saving image</span>\n\n%s"), error->message); | 3139 _("<span size='larger' weight='bold'>Error saving image</span>\n\n%s"), error->message); |
3140 #else | |
3141 GtkWidget *dialog = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, | |
3142 _("Error saving image\n\n%s"), error->message); | |
3143 #endif | |
3133 g_signal_connect_swapped(dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog); | 3144 g_signal_connect_swapped(dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog); |
3134 gtk_widget_show(dialog); | 3145 gtk_widget_show(dialog); |
3135 g_error_free(error); | 3146 g_error_free(error); |
3136 } | 3147 } |
3137 | 3148 |