diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-09-21 08:58:28 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-09-21 08:58:28 +0800 |
commit | 24364797eff3d4416fa93fa860bfdd79349a0b23 (patch) | |
tree | 9ce9c3a99323c5d28ab5be1028025713e431f3be /mail/mail-accounts.c | |
parent | a68b5681353d9999b208cdbada9b40586eb09c18 (diff) | |
download | gsoc2013-evolution-24364797eff3d4416fa93fa860bfdd79349a0b23.tar.gz gsoc2013-evolution-24364797eff3d4416fa93fa860bfdd79349a0b23.tar.zst gsoc2013-evolution-24364797eff3d4416fa93fa860bfdd79349a0b23.zip |
Do not add the account here as this is taken care of in
2001-09-20 Jeffrey Stedfast <fejj@ximian.com>
* mail-config-druid.c (wizard_finish_cb): Do not add the account
here as this is taken care of in mail_account_gui_save() since it
has to be able to set the default account.
* mail-config.c (mail_config_set_default_account): Don't allow the
index to become invalid.
* mail-account-gui.c (mail_account_gui_save): Add the account
before setting it as the default.
svn path=/trunk/; revision=13037
Diffstat (limited to 'mail/mail-accounts.c')
-rw-r--r-- | mail/mail-accounts.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c index 391d4f0aaa..5e3086182d 100644 --- a/mail/mail-accounts.c +++ b/mail/mail-accounts.c @@ -117,20 +117,19 @@ mail_accounts_dialog_finalise (GtkObject *obj) static void load_accounts (MailAccountsDialog *dialog) { - const MailConfigAccount *account; + const MailConfigAccount *account, *default_account; const GSList *node = dialog->accounts; int i = 0; - int default_account; - + gtk_clist_freeze (dialog->mail_accounts); gtk_clist_clear (dialog->mail_accounts); - default_account = mail_config_get_default_account_num (); - + default_account = mail_config_get_default_account (); + while (node) { CamelURL *url; - gchar *text[3]; + char *text[3]; account = node->data; @@ -142,7 +141,7 @@ load_accounts (MailAccountsDialog *dialog) text[0] = ""; text[1] = e_utf8_to_gtk_string (GTK_WIDGET (dialog->mail_accounts), account->name); text[2] = g_strdup_printf ("%s%s", url && url->protocol ? url->protocol : _("None"), - (i == default_account) ? _(" (default)") : ""); + (account == default_account) ? _(" (default)") : ""); if (url) camel_url_free (url); @@ -155,7 +154,7 @@ load_accounts (MailAccountsDialog *dialog) gtk_clist_set_pixmap (dialog->mail_accounts, i, 0, dialog->mark_pixmap, dialog->mark_bitmap); - + /* set the account on the row */ gtk_clist_set_row_data (dialog->mail_accounts, i, (gpointer) account); @@ -164,7 +163,7 @@ load_accounts (MailAccountsDialog *dialog) } gtk_clist_thaw (dialog->mail_accounts); - + /* * The selection gets cleared when we rebuild the clist, but no * unselect event is emitted. So we simulate it here. @@ -180,7 +179,7 @@ mail_select (GtkCList *clist, gint row, gint column, GdkEventButton *event, gpoi { MailAccountsDialog *dialog = data; MailConfigAccount *account = gtk_clist_get_row_data (clist, row); - + dialog->accounts_row = row; gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_edit), TRUE); gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_delete), TRUE); |