diff options
author | Dan Winship <danw@src.gnome.org> | 2000-12-02 04:25:10 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-12-02 04:25:10 +0800 |
commit | 7c69d2523a8b4760065b1596c1837292e9dfff53 (patch) | |
tree | df7bba4a39e523592b64e1515e820a781106518a /mail/mail-config-gui.c | |
parent | 4f4e741d46da50b1a81b3d28ca38ea3c661cb94d (diff) | |
download | gsoc2013-evolution-7c69d2523a8b4760065b1596c1837292e9dfff53.tar gsoc2013-evolution-7c69d2523a8b4760065b1596c1837292e9dfff53.tar.gz gsoc2013-evolution-7c69d2523a8b4760065b1596c1837292e9dfff53.tar.bz2 gsoc2013-evolution-7c69d2523a8b4760065b1596c1837292e9dfff53.tar.lz gsoc2013-evolution-7c69d2523a8b4760065b1596c1837292e9dfff53.tar.xz gsoc2013-evolution-7c69d2523a8b4760065b1596c1837292e9dfff53.tar.zst gsoc2013-evolution-7c69d2523a8b4760065b1596c1837292e9dfff53.zip |
Writes out passwords (to .gnome_private) in our patented proprietary "Best
* session.c (mail_session_remember_password): Writes out passwords
(to .gnome_private) in our patented proprietary "Best Awesome
Super Encryption 64" ("BASE64") format which could not possibly
ever be cracked by even the most cryptographically knowledgeable
five-year-olds.
(mail_session_init): Load remembered passwords at startup.
(mail_session_forget_passwords): Erase them from disk as well as
memory.
* mail-config.c: Add "remember_password" field to
MailConfigService.
(mail_config_write_on_exit): Call mail_session_remember_password
for services with "remember_password" set.
* mail-config-gui.c: Add "remember password" checkbox to the
dialogs, and make it appear and disappear as appropriate.
svn path=/trunk/; revision=6760
Diffstat (limited to 'mail/mail-config-gui.c')
-rw-r--r-- | mail/mail-config-gui.c | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/mail/mail-config-gui.c b/mail/mail-config-gui.c index 90e11083f0..513a1bcd5e 100644 --- a/mail/mail-config-gui.c +++ b/mail/mail-config-gui.c @@ -83,6 +83,7 @@ typedef struct GtkWidget *auth_html; GtkWidget *auth_detect; GtkWidget *keep_on_server; + GtkWidget *remember_password; gint pnum; } MailDialogServicePageItem; @@ -708,6 +709,9 @@ service_page_set_url (MailDialogServicePage *page, MailConfigService *service) if (spitem->keep_on_server) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (spitem->keep_on_server), service->keep_on_server); + if (spitem->remember_password) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (spitem->remember_password), service->remember_password); + camel_exception_free (ex); camel_url_free (url); } @@ -721,6 +725,10 @@ service_page_item_auth_activate (GtkWidget *menuitem, authtype = gtk_object_get_data (GTK_OBJECT (menuitem), "authtype"); put_html (GTK_HTML (spitem->auth_html), _(authtype->description)); + if (authtype->need_password) + gtk_widget_show (spitem->remember_password); + else + gtk_widget_hide (spitem->remember_password); } static void @@ -780,7 +788,15 @@ service_page_extract (MailDialogServicePage *page) if (spitem->keep_on_server) { source->keep_on_server = gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON (spitem->keep_on_server)); - } + } else + source->keep_on_server = FALSE; + + if (spitem->remember_password && + GTK_WIDGET_VISIBLE (spitem->remember_password)) { + source->remember_password = gtk_toggle_button_get_active ( + GTK_TOGGLE_BUTTON (spitem->remember_password)); + } else + source->remember_password = FALSE; return source; } @@ -890,7 +906,7 @@ service_page_item_new (MailDialogServicePage *page, MailService *mcs) description->parent->parent, TRUE, TRUE, 0); - table = gtk_table_new (6, 3, FALSE); + table = gtk_table_new (7, 3, FALSE); gtk_table_set_row_spacings (GTK_TABLE (table), 2); gtk_table_set_col_spacings (GTK_TABLE (table), 10); gtk_container_set_border_width (GTK_CONTAINER (table), 8); @@ -948,17 +964,25 @@ service_page_item_new (MailDialogServicePage *page, MailService *mcs) GTK_SIGNAL_FUNC (service_page_detect), page); + item->remember_password = gtk_check_button_new_with_label ( + _("Remember this password")); + gtk_signal_connect (GTK_OBJECT (item->keep_on_server), "toggled", + GTK_SIGNAL_FUNC (service_page_item_changed), + page); + gtk_table_attach (GTK_TABLE (table), item->remember_password, + 1, 3, row + 1, row + 2, GTK_FILL, 0, 0, 0); + item->auth_html = html_new (TRUE); gtk_table_attach (GTK_TABLE (table), item->auth_html->parent->parent, - 0, 3, row + 1, row + 2, + 0, 3, row + 2, row + 3, GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); /* this is done async */ url = camel_url_to_string (mcs->service->url, FALSE); config_do_query_authtypes (page, url, item); g_free (url); - row += 2; + row += 3; } if ((mcs->provider->flags & CAMEL_PROVIDER_IS_REMOTE) && |