aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-01-19 15:12:54 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-01-19 15:12:54 +0800
commit3f3cb88b8e27d8926701bac89ec8773f4bf99d83 (patch)
tree5b315b757c52a429e754a79f91b23c70c9388bf0
parent04e3d88bcc495709386e3e8bc092d86b7cd183cb (diff)
downloadgsoc2013-evolution-3f3cb88b8e27d8926701bac89ec8773f4bf99d83.tar.gz
gsoc2013-evolution-3f3cb88b8e27d8926701bac89ec8773f4bf99d83.tar.zst
gsoc2013-evolution-3f3cb88b8e27d8926701bac89ec8773f4bf99d83.zip
get the toplevel widget here too, similar to bug 52161.
2004-01-19 Not Zed <NotZed@Ximian.com> * 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
-rw-r--r--mail/ChangeLog14
-rw-r--r--mail/em-composer-prefs.c16
-rw-r--r--mail/em-folder-browser.c2
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,5 +1,19 @@
2004-01-19 Not Zed <NotZed@Ximian.com>
+ * 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 <NotZed@Ximian.com>
+
* em-migrate.c (em_upgrade_pop_uid_caches_1_4): if we can't open
the pop3 cache dir, because it doesn't exist, it is not an error.
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