changeset 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 9bd0aac996f4
children fdb8ba7a4857
files src/gtkimhtml.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkimhtml.c	Thu Jul 07 15:49:45 2005 +0000
+++ b/src/gtkimhtml.c	Fri Jul 08 03:54:31 2005 +0000
@@ -3118,8 +3118,14 @@
 	/* 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){
+#if GTK_CHECK_VERSION(2,4,0)
 		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."));
+#else
+		GtkWidget *dialog = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
+						_("Unrecognized file type\n\nDefaulting to PNG."));
+#endif
+
 		g_signal_connect_swapped(dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog);
 		gtk_widget_show(dialog);
 		type = g_strdup("png");
@@ -3128,8 +3134,13 @@
 	gdk_pixbuf_save(image->pixbuf, filename, type, &error, NULL);
 
 	if (error){
+#if GTK_CHECK_VERSION(2,4,0)
 		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);
+#else
+		GtkWidget *dialog = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
+				_("Error saving image\n\n%s"), error->message);
+#endif
 		g_signal_connect_swapped(dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog);
 		gtk_widget_show(dialog);
 		g_error_free(error);