diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-03-19 04:02:19 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-03-19 04:02:19 +0800 |
commit | 35e9d6432d2b01ddcb0953c886fe2e2fd5452c8b (patch) | |
tree | cb7de28f4d6e78b2bb53a20bd3eae1f9b7d17107 | |
parent | 3e3ddfa5fc7e10ba2f8c011db9e0c0d974980c92 (diff) | |
download | gsoc2013-evolution-35e9d6432d2b01ddcb0953c886fe2e2fd5452c8b.tar.gz gsoc2013-evolution-35e9d6432d2b01ddcb0953c886fe2e2fd5452c8b.tar.zst gsoc2013-evolution-35e9d6432d2b01ddcb0953c886fe2e2fd5452c8b.zip |
Don't set the account source/transport types to disabled simply because
2004-03-18 Jeffrey Stedfast <fejj@ximian.com>
* mail-account-gui.c (mail_account_gui_setup): Don't set the
account source/transport types to disabled simply because the
provider is NULL (think of the "None" option).
(source_type_changed): Need to update widget sensitivity based on
locked'ness here.
(transport_type_changed): Same.
svn path=/trunk/; revision=25121
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/mail-account-gui.c | 75 |
2 files changed, 66 insertions, 16 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index f27d37f484..47bff4a411 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,12 @@ 2004-03-18 Jeffrey Stedfast <fejj@ximian.com> + * mail-account-gui.c (mail_account_gui_setup): Don't set the + account source/transport types to disabled simply because the + provider is NULL (think of the "None" option). + (source_type_changed): Need to update widget sensitivity based on + locked'ness here. + (transport_type_changed): Same. + * em-utils.c (em_utils_add_address): rfc2047 decode the address here before passing it off to the addressbook (which expects it to be in human-readable form, not encoded). Fixes bug #55591. diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c index 15a4523cb7..5dbebf3d91 100644 --- a/mail/mail-account-gui.c +++ b/mail/mail-account-gui.c @@ -490,6 +490,7 @@ source_type_changed (GtkWidget *widget, gpointer user_data) MailAccountGui *gui = user_data; GtkWidget *file_entry, *label, *frame, *dwidget = NULL; CamelProvider *provider; + gboolean writeable; provider = g_object_get_data ((GObject *) widget, "provider"); @@ -502,6 +503,18 @@ source_type_changed (GtkWidget *widget, gpointer user_data) gui->source.provider = provider; + if (gui->source.provider) { + writeable = e_account_writable_option (gui->account, gui->source.provider->protocol, "auth"); + gtk_widget_set_sensitive ((GtkWidget *) gui->source.authtype, writeable); + gtk_widget_set_sensitive ((GtkWidget *) gui->source.check_supported, writeable); + + writeable = e_account_writable_option (gui->account, gui->source.provider->protocol, "use_ssl"); + gtk_widget_set_sensitive ((GtkWidget *) gui->source.use_ssl, writeable); + + writeable = e_account_writable (gui->account, E_ACCOUNT_SOURCE_SAVE_PASSWD); + gtk_widget_set_sensitive ((GtkWidget *) gui->source.remember, writeable); + } + if (provider) gtk_label_set_text (gui->source.description, provider->description); else @@ -608,10 +621,23 @@ transport_type_changed (GtkWidget *widget, gpointer user_data) MailAccountGui *gui = user_data; CamelProvider *provider; GtkWidget *label, *frame; + gboolean writeable; provider = g_object_get_data ((GObject *) widget, "provider"); gui->transport.provider = provider; + if (gui->transport.provider) { + writeable = e_account_writable_option (gui->account, gui->transport.provider->protocol, "auth"); + gtk_widget_set_sensitive ((GtkWidget *) gui->transport.authtype, writeable); + gtk_widget_set_sensitive ((GtkWidget *) gui->transport.check_supported, writeable); + + writeable = e_account_writable_option (gui->account, gui->transport.provider->protocol, "use_ssl"); + gtk_widget_set_sensitive ((GtkWidget *) gui->transport.use_ssl, writeable); + + writeable = e_account_writable (gui->account, E_ACCOUNT_TRANSPORT_SAVE_PASSWD); + gtk_widget_set_sensitive ((GtkWidget *) gui->transport.remember, writeable); + } + /* description */ gtk_label_set_text (gui->transport.description, provider->description); @@ -1704,7 +1730,8 @@ mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top) char *max_authname = NULL; char *source_proto, *transport_proto; GList *providers, *l; - + gboolean writeable; + printf("account gui setup\n"); if (gui->account->source && gui->account->source->url) { @@ -1881,24 +1908,40 @@ mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top) } /* FIXME: drive by table?? */ - if (gui->source.provider == NULL - || !e_account_writable(gui->account, E_ACCOUNT_SOURCE_URL)) { - gtk_widget_set_sensitive(gui->source.container, FALSE); + if (!e_account_writable (gui->account, E_ACCOUNT_SOURCE_URL)) { + gtk_widget_set_sensitive (gui->source.container, FALSE); } else { - gtk_widget_set_sensitive(gui->source.container, TRUE); - gtk_widget_set_sensitive((GtkWidget *)gui->source.authtype, e_account_writable_option(gui->account, gui->source.provider->protocol, "auth")); - gtk_widget_set_sensitive((GtkWidget *)gui->source.check_supported, e_account_writable_option(gui->account, gui->source.provider->protocol, "auth")); - gtk_widget_set_sensitive((GtkWidget *)gui->source.use_ssl, e_account_writable_option(gui->account, gui->source.provider->protocol, "use_ssl")); - gtk_widget_set_sensitive((GtkWidget *)gui->source.remember, e_account_writable(gui->account, E_ACCOUNT_SOURCE_SAVE_PASSWD)); + gtk_widget_set_sensitive (gui->source.container, TRUE); + + if (gui->source.provider) { + writeable = e_account_writable_option (gui->account, gui->source.provider->protocol, "auth"); + gtk_widget_set_sensitive ((GtkWidget *) gui->source.authtype, writeable); + gtk_widget_set_sensitive ((GtkWidget *) gui->source.check_supported, writeable); + + writeable = e_account_writable_option (gui->account, gui->source.provider->protocol, "use_ssl"); + gtk_widget_set_sensitive ((GtkWidget *) gui->source.use_ssl, writeable); + + writeable = e_account_writable (gui->account, E_ACCOUNT_SOURCE_SAVE_PASSWD); + gtk_widget_set_sensitive ((GtkWidget *) gui->source.remember, writeable); + } } - if (gui->transport.provider == NULL - || !e_account_writable(gui->account, E_ACCOUNT_TRANSPORT_URL)) { - gtk_widget_set_sensitive(gui->transport.container, FALSE); + + if (!e_account_writable (gui->account, E_ACCOUNT_TRANSPORT_URL)) { + gtk_widget_set_sensitive (gui->transport.container, FALSE); } else { - gtk_widget_set_sensitive((GtkWidget *)gui->transport.authtype, e_account_writable_option(gui->account, gui->transport.provider->protocol, "auth")); - gtk_widget_set_sensitive((GtkWidget *)gui->transport.check_supported, e_account_writable_option(gui->account, gui->transport.provider->protocol, "auth")); - gtk_widget_set_sensitive((GtkWidget *)gui->transport.use_ssl, e_account_writable_option(gui->account, gui->transport.provider->protocol, "use_ssl")); - gtk_widget_set_sensitive((GtkWidget *)gui->transport.remember, e_account_writable(gui->account, E_ACCOUNT_TRANSPORT_SAVE_PASSWD)); + gtk_widget_set_sensitive (gui->transport.container, TRUE); + + if (gui->transport.provider) { + writeable = e_account_writable_option (gui->account, gui->transport.provider->protocol, "auth"); + gtk_widget_set_sensitive ((GtkWidget *) gui->transport.authtype, writeable); + gtk_widget_set_sensitive ((GtkWidget *) gui->transport.check_supported, writeable); + + writeable = e_account_writable_option (gui->account, gui->transport.provider->protocol, "use_ssl"); + gtk_widget_set_sensitive ((GtkWidget *) gui->transport.use_ssl, writeable); + + writeable = e_account_writable (gui->account, E_ACCOUNT_TRANSPORT_SAVE_PASSWD); + gtk_widget_set_sensitive ((GtkWidget *) gui->transport.remember, writeable); + } } gtk_widget_set_sensitive((GtkWidget *)gui->drafts_folder_button, e_account_writable(gui->account, E_ACCOUNT_DRAFTS_FOLDER_URI)); |