diff --git a/mail/ChangeLog b/mail/ChangeLog index c97d307156..20905012c2 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,11 @@ +2001-08-09 Jeffrey Stedfast + + * mail-account-gui.c (mail_account_gui_save): Save the pgp and + smime always-sign options. + + * mail-config.c (account_copy): Copy the always-sign options over + too. + 2001-08-07 Ettore Perazzoli * message-browser.c (set_bonobo_ui): Remove the "Customize diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c index 05d2674699..06fe1e16fe 100644 --- a/mail/mail-account-gui.c +++ b/mail/mail-account-gui.c @@ -1266,11 +1266,15 @@ mail_account_gui_new (MailConfigAccount *account) e_utf8_gtk_entry_set_text (gui->pgp_key, account->pgp_key); gui->pgp_encrypt_to_self = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "pgp_encrypt_to_self")); gtk_toggle_button_set_active (gui->pgp_encrypt_to_self, account->pgp_encrypt_to_self); + gui->pgp_always_sign = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "pgp_always_sign")); + gtk_toggle_button_set_active (gui->pgp_always_sign, account->pgp_always_sign); gui->smime_key = GTK_ENTRY (glade_xml_get_widget (gui->xml, "smime_key")); if (account->smime_key) e_utf8_gtk_entry_set_text (gui->smime_key, account->smime_key); gui->smime_encrypt_to_self = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "smime_encrypt_to_self")); gtk_toggle_button_set_active (gui->smime_encrypt_to_self, account->smime_encrypt_to_self); + gui->smime_always_sign = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "smime_always_sign")); + gtk_toggle_button_set_active (gui->smime_always_sign, account->smime_always_sign); #ifndef HAVE_NSS { @@ -1565,7 +1569,7 @@ mail_account_gui_save (MailAccountGui *gui) account->name = e_utf8_gtk_entry_get_text (gui->account_name); if (gtk_toggle_button_get_active (gui->default_account)) mail_config_set_default_account (account); - + /* construct the identity */ identity_destroy (account->id); account->id = g_new0 (MailConfigIdentity, 1); @@ -1602,9 +1606,11 @@ mail_account_gui_save (MailAccountGui *gui) g_free (account->pgp_key); account->pgp_key = e_utf8_gtk_entry_get_text (gui->pgp_key); account->pgp_encrypt_to_self = gtk_toggle_button_get_active (gui->pgp_encrypt_to_self); + account->pgp_always_sign = gtk_toggle_button_get_active (gui->pgp_always_sign); g_free (account->smime_key); account->smime_key = e_utf8_gtk_entry_get_text (gui->smime_key); account->smime_encrypt_to_self = gtk_toggle_button_get_active (gui->smime_encrypt_to_self); + account->smime_always_sign = gtk_toggle_button_get_active (gui->smime_always_sign); mail_autoreceive_setup (); diff --git a/mail/mail-account-gui.h b/mail/mail-account-gui.h index d428ee2546..eaef146eda 100644 --- a/mail/mail-account-gui.h +++ b/mail/mail-account-gui.h @@ -71,7 +71,7 @@ typedef struct { GtkToggleButton *has_html_signature; GtkButton *edit_signature; GtkButton *edit_html_signature; - + /* incoming mail */ MailAccountGuiService source; GtkToggleButton *source_auto_check; @@ -97,8 +97,10 @@ typedef struct { /* Security */ GtkEntry *pgp_key; GtkToggleButton *pgp_encrypt_to_self; + GtkToggleButton *pgp_always_sign; GtkEntry *smime_key; GtkToggleButton *smime_encrypt_to_self; + GtkToggleButton *smime_always_sign; } MailAccountGui; diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 35d59afb56..fd4b47e8ed 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -449,12 +449,12 @@ create_msg_composer (const char *url) send_html = mail_config_get_send_html (); composer = url ? e_msg_composer_new_from_url (url) : e_msg_composer_new (); - + if (composer) { e_msg_composer_set_send_html (composer, send_html); e_msg_composer_show_sig_file (composer); } - + return GTK_WIDGET (composer); } @@ -462,7 +462,7 @@ void compose_msg (GtkWidget *widget, gpointer user_data) { GtkWidget *composer; - + if (!check_send_configuration (FOLDER_BROWSER (user_data))) return; @@ -474,7 +474,7 @@ compose_msg (GtkWidget *widget, gpointer user_data) GTK_SIGNAL_FUNC (composer_send_cb), NULL); gtk_signal_connect (GTK_OBJECT (composer), "postpone", GTK_SIGNAL_FUNC (composer_postpone_cb), NULL); - + gtk_widget_show (composer); } @@ -753,8 +753,8 @@ static void requeue_mail_reply(CamelFolder *folder, char *uid, CamelMimeMessage *msg, void *data) { int mode = GPOINTER_TO_INT(data); - - mail_reply(folder, msg, uid, mode); + + mail_reply (folder, msg, uid, mode); } void diff --git a/mail/mail-config.c b/mail/mail-config.c index 7002a20584..48507f36b0 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -191,9 +191,11 @@ account_copy (const MailConfigAccount *account) new->pgp_key = g_strdup (account->pgp_key); new->pgp_encrypt_to_self = account->pgp_encrypt_to_self; + new->pgp_always_sign = account->pgp_always_sign; new->smime_key = g_strdup (account->smime_key); new->smime_encrypt_to_self = account->smime_encrypt_to_self; + new->smime_always_sign = account->smime_always_sign; return new; } diff --git a/mail/mail-config.glade b/mail/mail-config.glade index 76fabd40c5..d32051c9aa 100644 --- a/mail/mail-config.glade +++ b/mail/mail-config.glade @@ -1767,7 +1767,7 @@ Kerberos GtkTable pgp_table 3 - 2 + 3 2 False 4 @@ -1830,6 +1830,29 @@ Kerberos True True + + 0 + 2 + 2 + 3 + 0 + 0 + False + False + False + False + True + False + + + + + GtkCheckButton + pgp_always_sign + True + + False + True 0 2 @@ -1865,7 +1888,7 @@ Kerberos GtkTable smime_table 3 - 2 + 3 3 False 4 @@ -1928,6 +1951,51 @@ Kerberos True True + + 0 + 2 + 2 + 3 + 0 + 0 + False + False + False + False + True + False + + + + + GtkButton + digital_ids + True + + GTK_RELIEF_NORMAL + + 2 + 3 + 0 + 1 + 0 + 0 + False + False + False + False + True + False + + + + + GtkCheckButton + smime_always_sign + True + + False + True 0 2 @@ -1965,28 +2033,6 @@ Kerberos False - - - GtkButton - digital_ids - True - - GTK_RELIEF_NORMAL - - 2 - 3 - 0 - 1 - 0 - 0 - False - False - False - False - True - False - - diff --git a/mail/mail-config.h b/mail/mail-config.h index 5f5fd78645..db057f0656 100644 --- a/mail/mail-config.h +++ b/mail/mail-config.h @@ -61,9 +61,11 @@ typedef struct { gchar *pgp_key; gboolean pgp_encrypt_to_self; + gboolean pgp_always_sign; gchar *smime_key; gboolean smime_encrypt_to_self; + gboolean smime_always_sign; } MailConfigAccount; typedef enum {