diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2001-01-10 01:21:34 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-01-10 01:21:34 +0800 |
commit | 2b1d1fdc36a85c3cd3b18cd1d24ef36e35d36504 (patch) | |
tree | 07f48e2c5b52316bc94f85104f53d28a3ea7c5ba /mail/mail-accounts.c | |
parent | 5e1b1bf7cbe2070ba0187b3b6a4941394e585e4c (diff) | |
download | gsoc2013-evolution-2b1d1fdc36a85c3cd3b18cd1d24ef36e35d36504.tar gsoc2013-evolution-2b1d1fdc36a85c3cd3b18cd1d24ef36e35d36504.tar.gz gsoc2013-evolution-2b1d1fdc36a85c3cd3b18cd1d24ef36e35d36504.tar.bz2 gsoc2013-evolution-2b1d1fdc36a85c3cd3b18cd1d24ef36e35d36504.tar.lz gsoc2013-evolution-2b1d1fdc36a85c3cd3b18cd1d24ef36e35d36504.tar.xz gsoc2013-evolution-2b1d1fdc36a85c3cd3b18cd1d24ef36e35d36504.tar.zst gsoc2013-evolution-2b1d1fdc36a85c3cd3b18cd1d24ef36e35d36504.zip |
New function to set the password for a given url.
2001-01-09 Jeffrey Stedfast <fejj@helixcode.com>
* session.c (mail_session_set_password): New function to set the
password for a given url.
* mail-config-druid.c (druid_finish): Don't save the password in
the source url, instead insert it into the save-password hash.
(mail_config_druid_get_source_url): Check to make sure the
authmech isn't "", if it is then don't set the authmech.
* mail-account-editor.c (apply_changes): Don't save the password
in the source url, instead insert it into the save-password
hash. Also check to make sure we don't set an empty string as the
authmech for the source or transport.
* mail-accounts.c (mail_default): After reloading the accounts,
reselect the previously selected account.
(mail_delete): Same.
* mail-config-druid.c (druid_cancel): Fixed segfault bug.
svn path=/trunk/; revision=7319
Diffstat (limited to 'mail/mail-accounts.c')
-rw-r--r-- | mail/mail-accounts.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c index 9d0fd7090c..f48e33120d 100644 --- a/mail/mail-accounts.c +++ b/mail/mail-accounts.c @@ -209,19 +209,20 @@ mail_delete (GtkButton *button, gpointer data) MailConfigAccount *account; if (dialog->accounts_row >= 0) { - int row, len; + int sel, row, len; - account = gtk_clist_get_row_data (dialog->mail_accounts, dialog->accounts_row); + sel = dialog->accounts_row; + + account = gtk_clist_get_row_data (dialog->mail_accounts, sel); g_slist_remove ((GSList *) dialog->accounts, account); account_destroy (account); mail_config_write (); - gtk_clist_remove (dialog->mail_accounts, dialog->accounts_row); + gtk_clist_remove (dialog->mail_accounts, sel); len = g_slist_length ((GSList *) dialog->accounts); if (len > 0) { - row = dialog->accounts_row; - row = row >= len ? len - 1 : row; + row = sel >= len ? len - 1 : sel; gtk_clist_select_row (dialog->mail_accounts, row, 0); } else { dialog->accounts_row = -1; @@ -239,10 +240,14 @@ mail_default (GtkButton *button, gpointer data) const MailConfigAccount *account; if (dialog->accounts_row >= 0) { - account = gtk_clist_get_row_data (dialog->mail_accounts, dialog->accounts_row); + int row; + + row = dialog->accounts_row; + account = gtk_clist_get_row_data (dialog->mail_accounts, row); mail_config_set_default_account (account); mail_config_write (); load_accounts (dialog); + gtk_clist_select_row (dialog->mail_accounts, row, 0); } } |