From 391b62599222f023593b51c10fc0aec26a535f57 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Sat, 13 Jan 2001 07:27:01 +0000 Subject: Fixed mail_load_storages to make a mini GSList of the account, not the 2001-01-13 Jeffrey Stedfast * mail-config-druid.c (druid_finish): Fixed mail_load_storages to make a mini GSList of the account, not the account->source. Oops. * mail-accounts.c (news_delete): Updated to use the remove_news() function. * mail-config.c (mail_config_remove_news): New convenience function for removing news accounts. (mail_config_remove_account): Pretty much the same thing. * mail-ops.c (do_send_queue): Get the X-Evolution-Transport URL and use that if it exists, else fall back on the default transport. * mail-callbacks.c (composer_postpone_cb): Set an X-Evolution-Transport header. svn path=/trunk/; revision=7477 --- mail/mail-accounts.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'mail/mail-accounts.c') diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c index dcedd6de84..29353fea63 100644 --- a/mail/mail-accounts.c +++ b/mail/mail-accounts.c @@ -214,13 +214,12 @@ mail_delete (GtkButton *button, gpointer data) sel = dialog->accounts_row; account = gtk_clist_get_row_data (dialog->mail_accounts, sel); - g_slist_remove ((GSList *) dialog->accounts, account); - account_destroy (account); + dialog->accounts = mail_config_remove_account (account); mail_config_write (); gtk_clist_remove (dialog->mail_accounts, sel); - len = g_slist_length ((GSList *) dialog->accounts); + len = dialog->accounts ? g_slist_length ((GSList *) dialog->accounts) : 0; if (len > 0) { row = sel >= len ? len - 1 : sel; gtk_clist_select_row (dialog->mail_accounts, row, 0); @@ -305,13 +304,12 @@ news_delete (GtkButton *button, gpointer data) int row, len; server = gtk_clist_get_row_data (dialog->news_accounts, dialog->news_row); - g_slist_remove ((GSList *) dialog->news, server); - service_destroy (server); + dialog->news = mail_config_remove_news (server); mail_config_write (); gtk_clist_remove (dialog->news_accounts, dialog->news_row); - len = g_slist_length ((GSList *) dialog->news); + len = dialog->news ? g_slist_length ((GSList *) dialog->news) : 0; if (len > 0) { row = dialog->news_row; row = row >= len ? len - 1 : row; -- cgit v1.2.3