aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-selector.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-12-04 01:50:59 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-12-04 01:50:59 +0800
commitd7aa831cc419feea80fab7d74449eb709f86c88a (patch)
treed184b3afbc92c87af2cd4681c9acc302ad89ebc2 /mail/em-folder-selector.c
parent313275af7dd939c72e42e38fe4b75f1daf903f55 (diff)
downloadgsoc2013-evolution-d7aa831cc419feea80fab7d74449eb709f86c88a.tar
gsoc2013-evolution-d7aa831cc419feea80fab7d74449eb709f86c88a.tar.gz
gsoc2013-evolution-d7aa831cc419feea80fab7d74449eb709f86c88a.tar.bz2
gsoc2013-evolution-d7aa831cc419feea80fab7d74449eb709f86c88a.tar.lz
gsoc2013-evolution-d7aa831cc419feea80fab7d74449eb709f86c88a.tar.xz
gsoc2013-evolution-d7aa831cc419feea80fab7d74449eb709f86c88a.tar.zst
gsoc2013-evolution-d7aa831cc419feea80fab7d74449eb709f86c88a.zip
Need to prepend a "/" to path if the path is the url fragment. Also fixed
2003-12-03 Jeffrey Stedfast <fejj@ximian.com> * em-folder-tree.c (em_folder_tree_set_selected): Need to prepend a "/" to path if the path is the url fragment. Also fixed to select the store node if path == "/". svn path=/trunk/; revision=23611
Diffstat (limited to 'mail/em-folder-selector.c')
-rw-r--r--mail/em-folder-selector.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c
index dea2603e2f..c502ac9a8d 100644
--- a/mail/em-folder-selector.c
+++ b/mail/em-folder-selector.c
@@ -332,10 +332,16 @@ em_folder_selector_get_selected_path (EMFolderSelector *emfs)
}
if (path && emfs->name_entry) {
+ const char *name;
char *newpath;
- path = newpath = g_strdup_printf ("%s/%s", path, gtk_entry_get_text (emfs->name_entry));
- emfs->selected_path = newpath;
+ name = gtk_entry_get_text (emfs->name_entry);
+ if (strcmp (path, "/") != 0)
+ newpath = g_strdup_printf ("%s/%s", path, name);
+ else
+ newpath = g_strdup_printf ("/%s", name);
+
+ path = emfs->selected_path = newpath;
}
return path;