diff options
author | Jeffrey Stedfast <fejj@novell.com> | 2004-05-21 04:52:42 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-05-21 04:52:42 +0800 |
commit | 8925bb176ee69f892e93d9cd7196088fa042871a (patch) | |
tree | bad2dce170976f85c960d996a7bd3d6575f2360c /mail/em-composer-prefs.c | |
parent | da7b86e7cfb3bd790a28cdd04058e37a39065fff (diff) | |
download | gsoc2013-evolution-8925bb176ee69f892e93d9cd7196088fa042871a.tar.gz gsoc2013-evolution-8925bb176ee69f892e93d9cd7196088fa042871a.tar.zst gsoc2013-evolution-8925bb176ee69f892e93d9cd7196088fa042871a.zip |
Fixes for bug #57305.
2004-05-20 Jeffrey Stedfast <fejj@novell.com>
Fixes for bug #57305.
* mail-account-gui.c (sig_add_new_signature): Updated for changes
below.
* em-composer-prefs.c (em_composer_prefs_new_signature): No longer
takes a script argument (makes no sense to edit a script with an
HTML editor if we require that the script already exist before we
let the user add it anyway).
(sig_add_cb): Updated for above change.
(sig_add_script_response): Don't pop up an editor window for the
newly added script, the script has already been created! Instead
simply create a new ESignature object, set the sig->name, and add
it to the signature list.
svn path=/trunk/; revision=26023
Diffstat (limited to 'mail/em-composer-prefs.c')
-rw-r--r-- | mail/em-composer-prefs.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mail/em-composer-prefs.c b/mail/em-composer-prefs.c index 0a678899e1..cc66aa5d60 100644 --- a/mail/em-composer-prefs.c +++ b/mail/em-composer-prefs.c @@ -326,11 +326,11 @@ sig_edit_cb (GtkWidget *widget, EMComposerPrefs *prefs) } void -em_composer_prefs_new_signature (GtkWindow *parent, gboolean html, const char *script) +em_composer_prefs_new_signature (GtkWindow *parent, gboolean html) { ESignature *sig; - sig = mail_config_signature_new (script, script ? TRUE : FALSE, html); + sig = mail_config_signature_new (NULL, FALSE, html); mail_signature_editor (sig, parent, TRUE); } @@ -362,7 +362,7 @@ sig_add_cb (GtkWidget *widget, EMComposerPrefs *prefs) parent = gtk_widget_get_toplevel ((GtkWidget *) prefs); parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; - em_composer_prefs_new_signature ((GtkWindow *) parent, send_html, NULL); + em_composer_prefs_new_signature ((GtkWindow *) parent, send_html); } static void @@ -383,19 +383,19 @@ sig_add_script_response (GtkWidget *widget, int button, EMComposerPrefs *prefs) struct stat st; if (stat (argv[0], &st) == 0 && S_ISREG (st.st_mode) && access (argv[0], X_OK) == 0) { - GtkWidget *parent; ESignature *sig; - parent = gtk_widget_get_toplevel ((GtkWidget *) prefs); - parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; - if ((sig = g_object_get_data ((GObject *) entry, "sig"))) { /* we're just editing an existing signature script */ g_free (sig->name); sig->name = g_strdup (name); e_signature_list_change (mail_config_get_signatures (), sig); } else { - em_composer_prefs_new_signature ((GtkWindow *) parent, TRUE, script); + sig = mail_config_signature_new (script, TRUE, TRUE); + sig->name = g_strdup (name); + + e_signature_list_add (mail_config_get_signatures (), sig); + g_object_unref (sig); } gtk_widget_hide (prefs->sig_script_dialog); |