changeset 9574:fd32ae5ee373

[gaim-migrate @ 10417] A few tweaks to the file selector for IM image saving when using gtk <2.4. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 22 Jul 2004 03:43:59 +0000
parents c8e0426c63ed
children d39eecc24a59
files src/gtkimhtml.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkimhtml.c	Thu Jul 22 03:23:12 2004 +0000
+++ b/src/gtkimhtml.c	Thu Jul 22 03:43:59 2004 +0000
@@ -2829,7 +2829,7 @@
 		} else {
 			dirname = g_strdup(filename);
 		}
-		gtk_file_selection_set_filename(image->filesel, dirname);
+		gtk_file_selection_set_filename(GTK_FILE_SELECTION(image->filesel), dirname);
 		g_free(dirname);
 		g_free(filename);
 		return;
@@ -2885,12 +2885,12 @@
 	image->filesel = gtk_file_selection_new(_("Save Image"));
 	if (image->filename != NULL)
 		gtk_file_selection_set_filename(GTK_FILE_SELECTION(image->filesel), image->filename);
+	g_signal_connect_swapped(G_OBJECT(GTK_FILE_SELECTION(image->filesel)), "delete_event",
+							 G_CALLBACK(image_save_cancel_cb), image);
+	g_signal_connect_swapped(G_OBJECT(GTK_FILE_SELECTION(image->filesel)->cancel_button),
+							 "clicked", G_CALLBACK(image_save_cancel_cb), image);
 	g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(image->filesel)->ok_button), "clicked",
 					 G_CALLBACK(image_save_check_if_exists_cb), image);
-	g_signal_connect_swapped(G_OBJECT(GTK_FILE_SELECTION(image->filesel)->ok_button), "clicked",
-							 G_CALLBACK(image_save_cancel_cb), image);
-	g_signal_connect_swapped(G_OBJECT(GTK_FILE_SELECTION(image->filesel)->cancel_button), "clicked",
-							 G_CALLBACK(image_save_cancel_cb), image);
 #endif /* FILECHOOSER */
 
 	gtk_widget_show(image->filesel);