From 3f3cb88b8e27d8926701bac89ec8773f4bf99d83 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Mon, 19 Jan 2004 07:12:54 +0000 Subject: get the toplevel widget here too, similar to bug 52161. 2004-01-19 Not Zed * em-folder-browser.c (emfb_folder_expunge): get the toplevel widget here too, similar to bug 52161. ** See bug #52956 * em-composer-prefs.c (sig_edit_cb): The fileentry_add_script_script widget is a GnomeFileEntry not a GtkEntry. (sig_add_script_response): use get_full_path rather than snooping the gtkentry. Also, don't close/quit the script dialogue on a bad name. svn path=/trunk/; revision=24301 --- mail/ChangeLog | 14 ++++++++++++++ mail/em-composer-prefs.c | 16 ++++++++++------ mail/em-folder-browser.c | 2 +- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 686b655d49..4abe8e72bb 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,17 @@ +2004-01-19 Not Zed + + * em-folder-browser.c (emfb_folder_expunge): get the toplevel + widget here too, similar to bug 52161. + + ** See bug #52956 + + * em-composer-prefs.c (sig_edit_cb): The + fileentry_add_script_script widget is a GnomeFileEntry not a + GtkEntry. + (sig_add_script_response): use get_full_path rather than snooping + the gtkentry. Also, don't close/quit the script dialogue on a bad + name. + 2004-01-19 Not Zed * em-migrate.c (em_upgrade_pop_uid_caches_1_4): if we can't open diff --git a/mail/em-composer-prefs.c b/mail/em-composer-prefs.c index f16e254ccf..f3f052db58 100644 --- a/mail/em-composer-prefs.c +++ b/mail/em-composer-prefs.c @@ -235,8 +235,8 @@ sig_edit_cb (GtkWidget *widget, EMComposerPrefs *prefs) GtkWidget *entry; entry = glade_xml_get_widget (prefs->sig_script_gui, "fileentry_add_script_script"); - gtk_entry_set_text (GTK_ENTRY (entry), sig->name); - + gnome_file_entry_set_filename((GnomeFileEntry *)entry, sig->script); + entry = glade_xml_get_widget (prefs->sig_script_gui, "entry_add_script_name"); gtk_entry_set_text (GTK_ENTRY (entry), sig->name); @@ -293,14 +293,15 @@ sig_add_cb (GtkWidget *widget, EMComposerPrefs *prefs) static void sig_add_script_response (GtkWidget *widget, int button, EMComposerPrefs *prefs) { - const char *script, *name; + const char *name; + char *script; GtkWidget *dialog; GtkWidget *entry; if (button == GTK_RESPONSE_ACCEPT) { entry = glade_xml_get_widget (prefs->sig_script_gui, "fileentry_add_script_script"); - script = gtk_entry_get_text (GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (entry)))); - + script = gnome_file_entry_get_full_path((GnomeFileEntry *)entry, FALSE); + entry = glade_xml_get_widget (prefs->sig_script_gui, "entry_add_script_name"); name = gtk_entry_get_text (GTK_ENTRY (entry)); if (script && *script) { @@ -323,11 +324,13 @@ sig_add_script_response (GtkWidget *widget, int button, EMComposerPrefs *prefs) } gtk_widget_hide (prefs->sig_script_dialog); + g_free(script); return; } } - + + g_free(script); dialog = gtk_message_dialog_new (GTK_WINDOW (prefs->sig_script_dialog), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, @@ -335,6 +338,7 @@ sig_add_script_response (GtkWidget *widget, int button, EMComposerPrefs *prefs) gtk_dialog_run ((GtkDialog *) dialog); gtk_widget_destroy (dialog); + return; } gtk_widget_hide (widget); diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c index 5b76eeef23..43d42e433d 100644 --- a/mail/em-folder-browser.c +++ b/mail/em-folder-browser.c @@ -534,7 +534,7 @@ emfb_folder_expunge(BonoboUIComponent *uid, void *data, const char *path) { EMFolderBrowser *emfb = data; - em_utils_expunge_folder ((GtkWidget *) emfb, emfb->view.folder); + em_utils_expunge_folder(gtk_widget_get_toplevel((GtkWidget *)emfb), emfb->view.folder); } static void -- cgit v1.2.3