diff options
-rw-r--r-- | mail/ChangeLog | 18 | ||||
-rw-r--r-- | mail/component-factory.c | 7 | ||||
-rw-r--r-- | mail/mail-config-druid.c | 8 | ||||
-rw-r--r-- | mail/mail-config.c | 20 |
4 files changed, 40 insertions, 13 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index fa8e473540..304eaab494 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,21 @@ +2001-08-24 Peter Williams <peterw@ximian.com> + + * mail-config.c (add_shortcut_entry): Instead of using the length + of the shortcuts list as the index for the shortcut, use -1, which + means "last". + + * mail-config-druid.c (druid_finish): Remove the account adding + stuff since that happens in wizard_finish now. + + * mail-config.c (add_new_storage): New function. Add a + MailConfigAccount to the shell as a storage. + (maybe_add_shortcut): Renamed to new_source_created. + (new_source_created): Call add_new_storage here. + + * component-factory.c (mail_remove_storage_by_uri): Don't warn + if the storage isn't remote... no point in making the caller + do extra work. + 2001-08-24 Jeffrey Stedfast <fejj@ximian.com> * mail-config.c (mail_config_set_thread_list): Don't let the uri diff --git a/mail/component-factory.c b/mail/component-factory.c index c197827fc1..3a6732f987 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -1106,8 +1106,11 @@ mail_remove_storage_by_uri (const char *uri) mail_remove_storage (CAMEL_STORE (store)); camel_object_unref (CAMEL_OBJECT (store)); } - } else - g_warning ("%s is not a remote storage.", uri); + } else { + /* why make the caller redundantly check this? */ + /*g_warning ("%s is not a remote storage.", uri);*/ + } + camel_exception_clear (&ex); } diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c index f5781cacb9..02834761c5 100644 --- a/mail/mail-config-druid.c +++ b/mail/mail-config-druid.c @@ -185,14 +185,6 @@ static void druid_finish (GnomeDruidPage *page, gpointer arg1, gpointer user_data) { MailConfigDruid *druid = user_data; - MailConfigAccount *account; - GSList *mini; - - /* Load up this new account */ - account = gtk_object_get_data (GTK_OBJECT (account_wizard), "account-data"); - mini = g_slist_prepend (NULL, account); - mail_load_storages (druid->shell, mini, TRUE); - g_slist_free (mini); gtk_object_set_data (GTK_OBJECT (account_wizard), "account-data", NULL); gtk_widget_destroy (GTK_WIDGET (druid)); diff --git a/mail/mail-config.c b/mail/mail-config.c index 89bc55f5ef..1ae74ae0e8 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -1531,7 +1531,7 @@ add_shortcut_entry (const char *name, const char *uri, const char *type) GNOME_Evolution_Shortcuts_add (shortcuts_interface, group_num, - the_group->shortcuts._length, + -1, /* "end of list" */ the_shortcut, &ev); @@ -1549,7 +1549,17 @@ add_shortcut_entry (const char *name, const char *uri, const char *type) } static void -maybe_add_shortcut (MailConfigAccount *account) +add_new_storage (const char *url, const char *name) +{ + extern EvolutionShellClient *global_shell_client; + GNOME_Evolution_Shell corba_shell; + + corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (global_shell_client)); + mail_load_storage_by_uri (corba_shell, url, name); +} + +static void +new_source_created (MailConfigAccount *account) { CamelProvider *prov; gchar *name; @@ -1577,6 +1587,10 @@ maybe_add_shortcut (MailConfigAccount *account) add_shortcut_entry (name, url, "mail"); g_free (name); g_free (url); + + /* while we're here, add the storage to the folder tree */ + + add_new_storage (account->source->url, account->name); } void @@ -1585,7 +1599,7 @@ mail_config_add_account (MailConfigAccount *account) config->accounts = g_slist_append (config->accounts, account); if (account->source && account->source->url) - maybe_add_shortcut (account); + new_source_created (account); } static void |