Mercurial > pidgin.yaz
changeset 9506:c6ecd07aed6f
[gaim-migrate @ 10333]
Fix a crash with the <2.4 file chooser when using the X to close the
window. Also set a better default window title.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 11 Jul 2004 04:09:43 +0000 |
parents | 12ce3d23c662 |
children | 7c28878de23a |
files | src/gtkrequest.c |
diffstat | 1 files changed, 9 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkrequest.c Sat Jul 10 19:25:41 2004 +0000 +++ b/src/gtkrequest.c Sun Jul 11 04:09:43 2004 +0000 @@ -1398,7 +1398,7 @@ #if !GTK_CHECK_VERSION(2,4,0) /* FILECHOOSER */ static void -file_cancel_cb(GtkWidget *widget, GaimGtkRequestData *data) +file_cancel_cb(GaimGtkRequestData *data) { if (data->cbs[0] != NULL) ((GaimRequestFileCb)data->cbs[0])(data->user_data, NULL); @@ -1447,14 +1447,16 @@ g_signal_connect(G_OBJECT(GTK_FILE_CHOOSER(filesel)), "response", G_CALLBACK(file_ok_check_if_exists_cb), data); #else /* FILECHOOSER */ - filesel = gtk_file_selection_new(title ? title : ""); + filesel = gtk_file_selection_new(title ? title + : (savedialog ? _("Save File...") + : _("Open File..."))); gtk_file_selection_set_filename(GTK_FILE_SELECTION(filesel), filename); - g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(filesel)), "delete_event", - G_CALLBACK(file_cancel_cb), data); - g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(filesel)->cancel_button), + g_signal_connect_swapped(G_OBJECT(GTK_FILE_SELECTION(filesel)), "delete_event", + G_CALLBACK(file_cancel_cb), data); + g_signal_connect_swapped(G_OBJECT(GTK_FILE_SELECTION(filesel)->cancel_button), "clicked", G_CALLBACK(file_cancel_cb), data); - g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(filesel)->ok_button), - "clicked", G_CALLBACK(file_ok_check_if_exists_cb), data); + g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(filesel)->ok_button), "clicked", + G_CALLBACK(file_ok_check_if_exists_cb), data); #endif /* FILECHOOSER */ data->dialog = filesel;