Save the pgp and smime always-sign options.

2001-08-09  Jeffrey Stedfast  <fejj@ximian.com>

	* 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.

svn path=/trunk/; revision=11841
This commit is contained in:
Jeffrey Stedfast
2001-08-09 19:24:06 +00:00
committed by Jeffrey Stedfast
parent 6b0d359b25
commit bfa7f88ced
7 changed files with 98 additions and 32 deletions

View File

@ -1,3 +1,11 @@
2001-08-09 Jeffrey Stedfast <fejj@ximian.com>
* 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 <ettore@ximian.com>
* message-browser.c (set_bonobo_ui): Remove the "Customize

View File

@ -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 ();

View File

@ -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;

View File

@ -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

View File

@ -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;
}

View File

@ -1767,7 +1767,7 @@ Kerberos
<class>GtkTable</class>
<name>pgp_table</name>
<border_width>3</border_width>
<rows>2</rows>
<rows>3</rows>
<columns>2</columns>
<homogeneous>False</homogeneous>
<row_spacing>4</row_spacing>
@ -1830,6 +1830,29 @@ Kerberos
<label>Always encrypt to myself when sending encrypted mail</label>
<active>True</active>
<draw_indicator>True</draw_indicator>
<child>
<left_attach>0</left_attach>
<right_attach>2</right_attach>
<top_attach>2</top_attach>
<bottom_attach>3</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkCheckButton</class>
<name>pgp_always_sign</name>
<can_focus>True</can_focus>
<label>Always sign outgoing messages when using this account</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
<left_attach>0</left_attach>
<right_attach>2</right_attach>
@ -1865,7 +1888,7 @@ Kerberos
<class>GtkTable</class>
<name>smime_table</name>
<border_width>3</border_width>
<rows>2</rows>
<rows>3</rows>
<columns>3</columns>
<homogeneous>False</homogeneous>
<row_spacing>4</row_spacing>
@ -1928,6 +1951,51 @@ Kerberos
<label>Always encrypt to myself when sending encrypyed mail</label>
<active>True</active>
<draw_indicator>True</draw_indicator>
<child>
<left_attach>0</left_attach>
<right_attach>2</right_attach>
<top_attach>2</top_attach>
<bottom_attach>3</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkButton</class>
<name>digital_ids</name>
<can_focus>True</can_focus>
<label>Digital IDs...</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<left_attach>2</left_attach>
<right_attach>3</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkCheckButton</class>
<name>smime_always_sign</name>
<can_focus>True</can_focus>
<label>Always sign outgoing messages when using this account</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
<left_attach>0</left_attach>
<right_attach>2</right_attach>
@ -1965,28 +2033,6 @@ Kerberos
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkButton</class>
<name>digital_ids</name>
<can_focus>True</can_focus>
<label>Digital IDs...</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<left_attach>2</left_attach>
<right_attach>3</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
</widget>
</widget>
</widget>

View File

@ -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 {