aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-selector.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-05-26 12:25:10 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-05-26 12:25:10 +0800
commitac8e0571f2e3478a2f1fc2a55a2df7dbf8aa0456 (patch)
treed31bbdc1752aea650b3bfadb272492291d3f8228 /mail/em-folder-selector.c
parent1c11041eebd485a471e842ba4f75834c2ce6e1f7 (diff)
downloadgsoc2013-evolution-ac8e0571f2e3478a2f1fc2a55a2df7dbf8aa0456.tar
gsoc2013-evolution-ac8e0571f2e3478a2f1fc2a55a2df7dbf8aa0456.tar.gz
gsoc2013-evolution-ac8e0571f2e3478a2f1fc2a55a2df7dbf8aa0456.tar.bz2
gsoc2013-evolution-ac8e0571f2e3478a2f1fc2a55a2df7dbf8aa0456.tar.lz
gsoc2013-evolution-ac8e0571f2e3478a2f1fc2a55a2df7dbf8aa0456.tar.xz
gsoc2013-evolution-ac8e0571f2e3478a2f1fc2a55a2df7dbf8aa0456.tar.zst
gsoc2013-evolution-ac8e0571f2e3478a2f1fc2a55a2df7dbf8aa0456.zip
set the default selection to inbox.
2004-05-26 Not Zed <NotZed@Ximian.com> * importers/evolution-mbox-importer.c (create_control_fn): set the default selection to inbox. * importers/evolution-outlook-importer.c (folder_selected) (create_control_fn): copied from mbox importer. fixes a crash & lets you choose the target folder. 2004-05-25 Not Zed <NotZed@Ximian.com> * mail-component.c (mc_add_local_store_done): removed, now redundant. * em-folder-tree.c (em_folder_tree_set_selected): fix for path changes. * em-folder-tree-model.c (em_folder_tree_model_set_unread_count): change to use full name rather than path name. * em-folder-tree-model.h: renamed path_hash to full_hash. * em-folder-tree-model.c (folder_subscribed): dont use g_path_get_dirname here, it is os dependent, we want / always. (full_hash_free): rename from path_hash free. svn path=/trunk/; revision=26090
Diffstat (limited to 'mail/em-folder-selector.c')
-rw-r--r--mail/em-folder-selector.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c
index d317635ee1..4d2c771f86 100644
--- a/mail/em-folder-selector.c
+++ b/mail/em-folder-selector.c
@@ -357,8 +357,15 @@ em_folder_selector_get_selected_uri (EMFolderSelector *emfs)
camel_url_set_fragment (url, newpath);
} else {
- newpath = g_strdup_printf("%s/%s", (url->path == NULL || strcmp(url->path, "/") == 0) ? "":url->path, name);
+ char *path;
+
+ path = g_strdup_printf("%s/%s", (url->path == NULL || strcmp(url->path, "/") == 0) ? "":url->path, name);
camel_url_set_path(url, newpath);
+ if (path[0] == '/') {
+ newpath = g_strdup(path+1);
+ g_free(path);
+ } else
+ newpath = path;
}
g_free (emfs->selected_path);
@@ -406,7 +413,7 @@ em_folder_selector_get_selected_path (EMFolderSelector *emfs)
char *newpath;
name = gtk_entry_get_text (emfs->name_entry);
- if (strcmp (path, "/") != 0)
+ if (strcmp (path, "") != 0)
newpath = g_strdup_printf ("%s/%s", path, name);
else
newpath = g_strdup_printf ("/%s", name);