diff options
author | Charles Zhang <charles.zhang@sun.com> | 2003-12-01 09:32:24 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2003-12-01 09:32:24 +0800 |
commit | 4642aec52b57b652c46b39fc3d019f8d7964e58d (patch) | |
tree | 9364192e676fc8e5b87bab4d60d184728fc598dc /mail | |
parent | d98f355957a9d1186f4f6506fbf06d010434d648 (diff) | |
download | gsoc2013-evolution-4642aec52b57b652c46b39fc3d019f8d7964e58d.tar.gz gsoc2013-evolution-4642aec52b57b652c46b39fc3d019f8d7964e58d.tar.zst gsoc2013-evolution-4642aec52b57b652c46b39fc3d019f8d7964e58d.zip |
connect "changed" signal. (mail_account_editor_changed): change signal
2003-11-27 Charles Zhang <charles.zhang@sun.com>
* mail-account-editor.c (construct): connect "changed" signal.
(mail_account_editor_changed): change signal handler.
Fixes bug #48998.
svn path=/trunk/; revision=23508
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 6 | ||||
-rw-r--r-- | mail/mail-account-editor.c | 67 |
2 files changed, 65 insertions, 8 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 251746b626..5b60ac3140 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2003-11-27 Charles Zhang <charles.zhang@sun.com> + + * mail-account-editor.c (construct): connect "changed" signal. + (mail_account_editor_changed): change signal handler. + Fixes bug #48998. + 2003-11-30 Ettore Perazzoli <ettore@ximian.com> * mail-offline-handler.c: Remove all the syncFolder stuff since diff --git a/mail/mail-account-editor.c b/mail/mail-account-editor.c index d8f6c4df40..11cdb56f94 100644 --- a/mail/mail-account-editor.c +++ b/mail/mail-account-editor.c @@ -105,7 +105,10 @@ apply_changes (MailAccountEditor *editor) if (mail_account_gui_save (editor->gui) == FALSE) return FALSE; - + + gtk_dialog_set_response_sensitive (GTK_DIALOG (editor), + GTK_RESPONSE_APPLY, FALSE); + /* save any changes we may have */ mail_config_write (); @@ -132,16 +135,22 @@ editor_response_cb (GtkWidget *widget, int button, gpointer user_data) } static void +mail_account_editor_changed (GtkWidget *widget, MailAccountEditor *editor) +{ + gtk_dialog_set_response_sensitive (GTK_WIDGET (editor), GTK_RESPONSE_APPLY, TRUE); +} + +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); @@ -151,13 +160,55 @@ 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 (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); + g_signal_connect (editor->gui->source.path, "changed", G_CALLBACK (mail_account_editor_changed), editor); + 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); + g_signal_connect (editor->gui->transport_needs_auth, "toggled", G_CALLBACK (mail_account_editor_changed), editor); + 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); + 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); + gtk_widget_grab_focus (GTK_WIDGET (editor->gui->account_name)); } |