diff options
author | Not Zed <NotZed@Ximian.com> | 2004-01-19 15:12:54 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-01-19 15:12:54 +0800 |
commit | 3f3cb88b8e27d8926701bac89ec8773f4bf99d83 (patch) | |
tree | 5b315b757c52a429e754a79f91b23c70c9388bf0 /mail/em-composer-prefs.c | |
parent | 04e3d88bcc495709386e3e8bc092d86b7cd183cb (diff) | |
download | gsoc2013-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
Diffstat (limited to 'mail/em-composer-prefs.c')
-rw-r--r-- | mail/em-composer-prefs.c | 16 |
1 files changed, 10 insertions, 6 deletions
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); |