aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@novell.com>2004-05-21 04:52:42 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-05-21 04:52:42 +0800
commit8925bb176ee69f892e93d9cd7196088fa042871a (patch)
treebad2dce170976f85c960d996a7bd3d6575f2360c /mail
parentda7b86e7cfb3bd790a28cdd04058e37a39065fff (diff)
downloadgsoc2013-evolution-8925bb176ee69f892e93d9cd7196088fa042871a.tar
gsoc2013-evolution-8925bb176ee69f892e93d9cd7196088fa042871a.tar.gz
gsoc2013-evolution-8925bb176ee69f892e93d9cd7196088fa042871a.tar.bz2
gsoc2013-evolution-8925bb176ee69f892e93d9cd7196088fa042871a.tar.lz
gsoc2013-evolution-8925bb176ee69f892e93d9cd7196088fa042871a.tar.xz
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')
-rw-r--r--mail/ChangeLog17
-rw-r--r--mail/em-composer-prefs.c16
-rw-r--r--mail/em-composer-prefs.h2
-rw-r--r--mail/mail-account-gui.c2
4 files changed, 27 insertions, 10 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index d0cfe3a972..4c4658659d 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,20 @@
+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.
+
2004-05-20 Radek Doulik <rodo@ximian.com>
* em-mailer-prefs.c (em_mailer_prefs_construct): remove "use
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);
diff --git a/mail/em-composer-prefs.h b/mail/em-composer-prefs.h
index e24825477b..74a2a3cf98 100644
--- a/mail/em-composer-prefs.h
+++ b/mail/em-composer-prefs.h
@@ -114,7 +114,7 @@ GType em_composer_prefs_get_type (void);
struct _GtkWidget *em_composer_prefs_new (void);
-void em_composer_prefs_new_signature (struct _GtkWindow *parent, gboolean html, const char *script);
+void em_composer_prefs_new_signature (struct _GtkWindow *parent, gboolean html);
/* needed by global config */
#define EM_COMPOSER_PREFS_CONTROL_ID "OAFIID:GNOME_Evolution_Mail_ComposerPrefs_ConfigControl:" BASE_VERSION
diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c
index f5a3d25ddc..24fe83a336 100644
--- a/mail/mail-account-gui.c
+++ b/mail/mail-account-gui.c
@@ -1606,7 +1606,7 @@ sig_add_new_signature (GtkWidget *w, MailAccountGui *gui)
parent = gtk_widget_get_toplevel (w);
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