diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-01-13 15:27:01 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-01-13 15:27:01 +0800 |
commit | 391b62599222f023593b51c10fc0aec26a535f57 (patch) | |
tree | caeec651bf6af9d2f5c4b7db56b137d32562f082 /mail | |
parent | d223e02dc78c4d5126bcd16f4bb987aece8b8815 (diff) | |
download | gsoc2013-evolution-391b62599222f023593b51c10fc0aec26a535f57.tar.gz gsoc2013-evolution-391b62599222f023593b51c10fc0aec26a535f57.tar.zst gsoc2013-evolution-391b62599222f023593b51c10fc0aec26a535f57.zip |
Fixed mail_load_storages to make a mini GSList of the account, not the
2001-01-13 Jeffrey Stedfast <fejj@ximian.com>
* 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
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 10 | ||||
-rw-r--r-- | mail/mail-accounts.c | 10 | ||||
-rw-r--r-- | mail/mail-config-druid.c | 2 | ||||
-rw-r--r-- | mail/mail-config.c | 18 | ||||
-rw-r--r-- | mail/mail-config.h | 2 |
5 files changed, 35 insertions, 7 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 8ccd4fc80f..d5f13a7764 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,15 @@ 2001-01-13 Jeffrey Stedfast <fejj@ximian.com> + * 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. 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; diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c index faf2e7f2f8..67c1663839 100644 --- a/mail/mail-config-druid.c +++ b/mail/mail-config-druid.c @@ -224,7 +224,7 @@ druid_finish (GnomeDruidPage *page, gpointer arg1, gpointer user_data) mail_config_add_account (account); mail_config_write (); - mini = g_slist_prepend (NULL, account->source); + mini = g_slist_prepend (NULL, account); mail_load_storages (druid->shell, mini, TRUE); g_slist_free (mini); diff --git a/mail/mail-config.c b/mail/mail-config.c index 55862acc09..04d59f7f17 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -576,6 +576,15 @@ mail_config_add_account (MailConfigAccount *account) config->accounts = g_slist_append (config->accounts, account); } +const GSList * +mail_config_remove_account (MailConfigAccount *account) +{ + config->accounts = g_slist_remove (config->accounts, account); + account_destroy (account); + + return config->accounts; +} + void mail_config_set_default_account (const MailConfigAccount *account) { @@ -637,6 +646,15 @@ mail_config_add_news (MailConfigService *news) config->news = g_slist_append (config->news, news); } +const GSList * +mail_config_remove_news (MailConfigService *news) +{ + config->news = g_slist_remove (config->news, news); + service_destroy (news); + + return config->news; +} + GSList * mail_config_get_sources (void) { diff --git a/mail/mail-config.h b/mail/mail-config.h index cc8e9b7cbe..8998893e3b 100644 --- a/mail/mail-config.h +++ b/mail/mail-config.h @@ -97,6 +97,7 @@ const MailConfigAccount *mail_config_get_default_account (void); const MailConfigAccount *mail_config_get_account_by_name (const char *account_name); const GSList *mail_config_get_accounts (void); void mail_config_add_account (MailConfigAccount *account); +const GSList *mail_config_remove_account (MailConfigAccount *account); void mail_config_set_default_account (const MailConfigAccount *account); const MailConfigIdentity *mail_config_get_default_identity (void); @@ -105,6 +106,7 @@ const MailConfigService *mail_config_get_default_transport (void); const MailConfigService *mail_config_get_default_news (void); const GSList *mail_config_get_news (void); void mail_config_add_news (MailConfigService *news); +const GSList *mail_config_remove_news (MailConfigService *news); /* convenience functions to help ease the transition over to the new codebase */ GSList *mail_config_get_sources (void); |