aboutsummaryrefslogtreecommitdiffstats
path: root/mail/component-factory.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-08-23 07:30:27 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-08-23 07:30:27 +0800
commit8cb5eafe19b6710d0a81256aa1203441a35e01ee (patch)
treec2c19d07a24ffd4408853a55ceb4625c9960f361 /mail/component-factory.c
parent4ec5f98d75b92b8a1da39d8bbe3962535e9725aa (diff)
downloadgsoc2013-evolution-8cb5eafe19b6710d0a81256aa1203441a35e01ee.tar
gsoc2013-evolution-8cb5eafe19b6710d0a81256aa1203441a35e01ee.tar.gz
gsoc2013-evolution-8cb5eafe19b6710d0a81256aa1203441a35e01ee.tar.bz2
gsoc2013-evolution-8cb5eafe19b6710d0a81256aa1203441a35e01ee.tar.lz
gsoc2013-evolution-8cb5eafe19b6710d0a81256aa1203441a35e01ee.tar.xz
gsoc2013-evolution-8cb5eafe19b6710d0a81256aa1203441a35e01ee.tar.zst
gsoc2013-evolution-8cb5eafe19b6710d0a81256aa1203441a35e01ee.zip
Don't blindly make all vtrash folder types have a uri of vtrash:file:/,
2001-08-22 Jeffrey Stedfast <fejj@ximian.com> * component-factory.c (create_view): Don't blindly make all vtrash folder types have a uri of vtrash:file:/, instead only make it use vtrash:file:/ if it's a file: uri, else use physical_uri. svn path=/trunk/; revision=12411
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r--mail/component-factory.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/mail/component-factory.c b/mail/component-factory.c
index d391092901..c8652721e2 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -130,7 +130,7 @@ create_view (EvolutionShellComponent *shell_component,
shell_client = evolution_shell_component_get_owner (shell_component);
corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client));
- if (g_strcasecmp (folder_type, "mail") == 0) {
+ if (!g_strcasecmp (folder_type, "mail")) {
const char *noselect;
CamelURL *url;
@@ -142,7 +142,7 @@ create_view (EvolutionShellComponent *shell_component,
control = folder_browser_factory_new_control (physical_uri,
corba_shell);
camel_url_free (url);
- } else if (g_strcasecmp (folder_type, "mailstorage") == 0) {
+ } else if (!g_strcasecmp (folder_type, "mailstorage")) {
CamelService *store;
EvolutionStorage *storage;
@@ -157,12 +157,15 @@ create_view (EvolutionShellComponent *shell_component,
}
if (!gtk_object_get_data (GTK_OBJECT (storage), "connected"))
- mail_scan_subfolders (CAMEL_STORE(store), storage);
+ mail_scan_subfolders (CAMEL_STORE (store), storage);
camel_object_unref (CAMEL_OBJECT (store));
control = folder_browser_factory_new_control ("", corba_shell);
- } else if (g_strcasecmp (folder_type, "vtrash") == 0) {
- control = folder_browser_factory_new_control ("vtrash:file:/", corba_shell);
+ } else if (!g_strcasecmp (folder_type, "vtrash")) {
+ if (!g_strncasecmp (physical_uri, "file:", 5))
+ control = folder_browser_factory_new_control ("vtrash:file:/", corba_shell);
+ else
+ control = folder_browser_factory_new_control (physical_uri, corba_shell);
} else
return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE;