diff options
author | Peter Williams <peterw@ximian.com> | 2001-08-25 03:01:59 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2001-08-25 03:01:59 +0800 |
commit | 2fba11c88fa90dc7b34a1b191ca327f942c47150 (patch) | |
tree | 79595babb0fdfc8eacaab46dbb14e6ab06a4071f /mail/mail-config.c | |
parent | e1843b9aa20c455aba336939bd861d46fcce4c15 (diff) | |
download | gsoc2013-evolution-2fba11c88fa90dc7b34a1b191ca327f942c47150.tar gsoc2013-evolution-2fba11c88fa90dc7b34a1b191ca327f942c47150.tar.gz gsoc2013-evolution-2fba11c88fa90dc7b34a1b191ca327f942c47150.tar.bz2 gsoc2013-evolution-2fba11c88fa90dc7b34a1b191ca327f942c47150.tar.lz gsoc2013-evolution-2fba11c88fa90dc7b34a1b191ca327f942c47150.tar.xz gsoc2013-evolution-2fba11c88fa90dc7b34a1b191ca327f942c47150.tar.zst gsoc2013-evolution-2fba11c88fa90dc7b34a1b191ca327f942c47150.zip |
Instead of using the length of the shortcuts list as the index for the
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.
svn path=/trunk/; revision=12445
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r-- | mail/mail-config.c | 20 |
1 files changed, 17 insertions, 3 deletions
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 |