diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-02-07 09:58:50 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-02-07 09:58:50 +0800 |
commit | bfd54850fa9ab62b9750f16fd3bc33adc7d3b4ba (patch) | |
tree | e35e7f29fc020bc05a3ca2c518036732be0bc1a5 | |
parent | eda028e5a594c85befd8ba29ce42dc1c66cee33e (diff) | |
download | gsoc2013-evolution-bfd54850fa9ab62b9750f16fd3bc33adc7d3b4ba.tar gsoc2013-evolution-bfd54850fa9ab62b9750f16fd3bc33adc7d3b4ba.tar.gz gsoc2013-evolution-bfd54850fa9ab62b9750f16fd3bc33adc7d3b4ba.tar.bz2 gsoc2013-evolution-bfd54850fa9ab62b9750f16fd3bc33adc7d3b4ba.tar.lz gsoc2013-evolution-bfd54850fa9ab62b9750f16fd3bc33adc7d3b4ba.tar.xz gsoc2013-evolution-bfd54850fa9ab62b9750f16fd3bc33adc7d3b4ba.tar.zst gsoc2013-evolution-bfd54850fa9ab62b9750f16fd3bc33adc7d3b4ba.zip |
Rearranged the #if checks so that we don't ever try to access any smime
2002-02-06 Jeffrey Stedfast <fejj@ximian.com>
* mail-account-gui.c (mail_account_gui_new): Rearranged the #if
checks so that we don't ever try to access any smime widgets
(since they are now being destroyed) if smime isn't enabled.
(mail_account_gui_save): Same here.
svn path=/trunk/; revision=15587
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/mail-account-gui.c | 10 |
2 files changed, 12 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 7494137a3d..9bc145a619 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,10 @@ 2002-02-06 Jeffrey Stedfast <fejj@ximian.com> + * mail-account-gui.c (mail_account_gui_new): Rearranged the #if + checks so that we don't ever try to access any smime widgets + (since they are now being destroyed) if smime isn't enabled. + (mail_account_gui_save): Same here. + * message-list.c: Removed references to NEEDS_REPLY. * mail-callbacks.c (mark_as_needing_reply): Removed. diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c index ab1a249ff9..8477c4f3f0 100644 --- a/mail/mail-account-gui.c +++ b/mail/mail-account-gui.c @@ -1366,6 +1366,8 @@ mail_account_gui_new (MailConfigAccount *account) 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); + +#if defined (HAVE_NSS) && defined (SMIME_SUPPORTED) 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); @@ -1373,8 +1375,7 @@ mail_account_gui_new (MailConfigAccount *account) 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); - -#if !defined(HAVE_NSS) || !defined(SMIME_SUPPORTED) +#else { /* Since we don't have NSS, hide the S/MIME config options */ GtkWidget *frame; @@ -1382,7 +1383,7 @@ mail_account_gui_new (MailConfigAccount *account) frame = glade_xml_get_widget (gui->xml, "smime_frame"); gtk_widget_destroy (frame); } -#endif +#endif /* HAVE_NSS && SMIME_SUPPORTED */ return gui; } @@ -1748,10 +1749,13 @@ mail_account_gui_save (MailAccountGui *gui) 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); + +#if defined (HAVE_NSS) && defined (SMIME_SUPPORTED) 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); +#endif /* HAVE_NSS && SMIME_SUPPORTED */ if (!mail_config_find_account (account)) mail_config_add_account (account); |