aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-02-25 05:31:19 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-02-25 05:31:19 +0800
commit2d5d15a0f30b9c9c68f12c28365045cbf5a2a3a9 (patch)
tree5d8bbb0b3d7f3475c625df647ed7ed3675356575 /mail
parentd729e24f4bcd61b7da2d58dcd03820d8097a1b7a (diff)
downloadgsoc2013-evolution-2d5d15a0f30b9c9c68f12c28365045cbf5a2a3a9.tar
gsoc2013-evolution-2d5d15a0f30b9c9c68f12c28365045cbf5a2a3a9.tar.gz
gsoc2013-evolution-2d5d15a0f30b9c9c68f12c28365045cbf5a2a3a9.tar.bz2
gsoc2013-evolution-2d5d15a0f30b9c9c68f12c28365045cbf5a2a3a9.tar.lz
gsoc2013-evolution-2d5d15a0f30b9c9c68f12c28365045cbf5a2a3a9.tar.xz
gsoc2013-evolution-2d5d15a0f30b9c9c68f12c28365045cbf5a2a3a9.tar.zst
gsoc2013-evolution-2d5d15a0f30b9c9c68f12c28365045cbf5a2a3a9.zip
Need to listen for changes to S/MIME options, the signature option menu,
2004-02-24 Jeffrey Stedfast <fejj@ximian.com> * mail-account-editor.c (construct): Need to listen for changes to S/MIME options, the signature option menu, and any extra provider-specific config options. Fixes bug #54036. svn path=/trunk/; revision=24852
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog4
-rw-r--r--mail/mail-account-editor.c54
-rw-r--r--mail/mail-account-gui.c4
3 files changed, 44 insertions, 18 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 385d416c00..89d3c2ce84 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,9 @@
2004-02-24 Jeffrey Stedfast <fejj@ximian.com>
+ * mail-account-editor.c (construct): Need to listen for changes to
+ S/MIME options, the signature option menu, and any extra
+ provider-specific config options. Fixes bug #54036.
+
* em-folder-view.c (emfv_popup_mark_junk): Set the SEEN flag as
well.
(emfv_list_key_press): Removed the skip-to-next-message logic as
diff --git a/mail/mail-account-editor.c b/mail/mail-account-editor.c
index 02385b7cb4..8a09d2519e 100644
--- a/mail/mail-account-editor.c
+++ b/mail/mail-account-editor.c
@@ -141,16 +141,28 @@ mail_account_editor_changed (GtkWidget *widget, MailAccountEditor *editor)
}
static void
+listen_for_changes (const char *name, GtkWidget *widget, MailAccountEditor *editor)
+{
+ if (GTK_IS_ENTRY (widget)) {
+ g_signal_connect (widget, "changed", G_CALLBACK (mail_account_editor_changed), editor);
+ } else if (GTK_IS_SPIN_BUTTON (widget)) {
+ g_signal_connect (widget, "value-changed", G_CALLBACK (mail_account_editor_changed), editor);
+ } else if (GTK_IS_TOGGLE_BUTTON (widget)) {
+ g_signal_connect (widget, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
+ }
+}
+
+static void
construct (MailAccountEditor *editor, EAccount *account, EMAccountPrefs *dialog)
{
EAccountService *source = account->source;
-
+
editor->gui = mail_account_gui_new (account, dialog);
-
+
/* get our toplevel widget and reparent it */
editor->notebook = GTK_NOTEBOOK (glade_xml_get_widget (editor->gui->xml, "account_editor_notebook"));
gtk_widget_reparent (GTK_WIDGET (editor->notebook), GTK_DIALOG (editor)->vbox);
-
+
/* give our dialog an OK button and title */
gtk_window_set_title (GTK_WINDOW (editor), _("Evolution Account Editor"));
gtk_window_set_resizable (GTK_WINDOW (editor), TRUE);
@@ -160,16 +172,18 @@ construct (MailAccountEditor *editor, EAccount *account, EMAccountPrefs *dialog)
GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
NULL);
-
+
g_signal_connect (editor, "response", G_CALLBACK (editor_response_cb), editor);
-
+
g_signal_connect (editor->gui->account_name, "changed", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->default_account, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->full_name, "changed", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->email_address, "changed", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->reply_to, "changed", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->organization, "changed", G_CALLBACK (mail_account_editor_changed), editor);
-
+ g_signal_connect (gtk_option_menu_get_menu (editor->gui->sig_option_menu),
+ "selection-done", G_CALLBACK (mail_account_editor_changed), editor);
+
g_signal_connect (editor->gui->source.type, "changed", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->source.hostname, "changed", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->source.username, "changed", G_CALLBACK (mail_account_editor_changed), editor);
@@ -177,10 +191,10 @@ construct (MailAccountEditor *editor, EAccount *account, EMAccountPrefs *dialog)
g_signal_connect (editor->gui->source.use_ssl, "changed", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->source.authtype, "changed", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->source.remember, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
-
+
g_signal_connect (editor->gui->source_auto_check, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->source_auto_check_min, "value-changed", G_CALLBACK (mail_account_editor_changed), editor);
-
+
g_signal_connect (editor->gui->transport.type, "changed", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->transport.hostname, "changed", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->transport.username, "changed", G_CALLBACK (mail_account_editor_changed), editor);
@@ -188,27 +202,35 @@ construct (MailAccountEditor *editor, EAccount *account, EMAccountPrefs *dialog)
g_signal_connect (editor->gui->transport.use_ssl, "changed", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->transport.authtype, "changed", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->transport.remember, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
-
+
g_signal_connect (editor->gui->drafts_folder_button, "clicked", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->sent_folder_button, "clicked", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->always_cc, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->cc_addrs, "changed", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->always_bcc, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->bcc_addrs, "changed", G_CALLBACK (mail_account_editor_changed), editor);
-
+
g_signal_connect (editor->gui->pgp_key, "changed", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->pgp_encrypt_to_self, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->pgp_always_sign, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->pgp_no_imip_sign, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
g_signal_connect (editor->gui->pgp_always_trust, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
-
+
+ g_signal_connect (editor->gui->smime_sign_default, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
+ g_signal_connect (editor->gui->smime_sign_key, "changed", G_CALLBACK (mail_account_editor_changed), editor);
+ g_signal_connect (editor->gui->smime_encrypt_default, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
+ g_signal_connect (editor->gui->smime_encrypt_to_self, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
+ g_signal_connect (editor->gui->smime_encrypt_key, "changed", G_CALLBACK (mail_account_editor_changed), editor);
+
mail_account_gui_setup (editor->gui, GTK_WIDGET (editor));
-
+
mail_account_gui_build_extra_conf (editor->gui, source->url);
-
- gtk_dialog_set_response_sensitive (GTK_DIALOG (editor),
- GTK_RESPONSE_APPLY, FALSE);
-
+
+ /* yes, this is kinda gross... but what can we do, eh? */
+ g_hash_table_foreach (editor->gui->extra_config, (GHFunc) listen_for_changes, editor);
+
+ gtk_dialog_set_response_sensitive (GTK_DIALOG (editor), GTK_RESPONSE_APPLY, FALSE);
+
gtk_widget_grab_focus (GTK_WIDGET (editor->gui->account_name));
}
diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c
index 8f211ac850..6b911eef88 100644
--- a/mail/mail-account-gui.c
+++ b/mail/mail-account-gui.c
@@ -1264,7 +1264,7 @@ sig_fill_options (MailAccountGui *gui)
mi = gtk_menu_item_new_with_label (sig->name);
g_object_set_data ((GObject *) mi, "sig", sig);
gtk_widget_show (mi);
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
}
}
@@ -1277,7 +1277,7 @@ sig_changed (GtkWidget *w, MailAccountGui *gui)
active = gtk_menu_get_active (GTK_MENU (w));
index = g_list_index (GTK_MENU_SHELL (w)->children, active);
- gui->def_signature = (MailConfigSignature *) g_object_get_data(G_OBJECT(active), "sig");
+ gui->def_signature = (MailConfigSignature *) g_object_get_data (G_OBJECT (active), "sig");
gui->auto_signature = index == 1 ? TRUE : FALSE;
}