aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-storage-set-view.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-09-10 05:43:46 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2000-09-10 05:43:46 +0800
commit3d7fc19a83c4c3835e2c5c6821b45f4a27dcae73 (patch)
treedd0ff4f52e31599ba8190d85d0f1ab2932784bf3 /shell/e-storage-set-view.c
parent93ce4979954074c5f7d6061958e523efb7bfb356 (diff)
downloadgsoc2013-evolution-3d7fc19a83c4c3835e2c5c6821b45f4a27dcae73.tar.gz
gsoc2013-evolution-3d7fc19a83c4c3835e2c5c6821b45f4a27dcae73.tar.zst
gsoc2013-evolution-3d7fc19a83c4c3835e2c5c6821b45f4a27dcae73.zip
Use the name of the storage or the folder in the storage set view,
instead of just the last segment of the path, so that we can support display names correctly. svn path=/trunk/; revision=5296
Diffstat (limited to 'shell/e-storage-set-view.c')
-rw-r--r--shell/e-storage-set-view.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index b90f556286..670df6f920 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -489,16 +489,26 @@ etree_icon_at (ETreeModel *etree, ETreePath *tree_path, void *model_data)
static void*
etree_value_at (ETreeModel *etree, ETreePath *tree_path, int col, void *model_data)
{
+ EStorageSetView *storage_set_view;
+ EStorageSet *storage_set;
+ EStorage *storage;
+ EFolder *folder;
char *path;
- char *last_separator;
- path = (char*)e_tree_model_node_get_data (etree, tree_path);
+ storage_set_view = E_STORAGE_SET_VIEW (model_data);
+ storage_set = storage_set_view->priv->storage_set;
- last_separator = strrchr (path, G_DIR_SEPARATOR);
+ path = (char *) e_tree_model_node_get_data (etree, tree_path);
+
+ folder = e_storage_set_get_folder (storage_set, path);
+ if (folder != NULL)
+ return (void *) e_folder_get_name (folder);
- g_return_val_if_fail (last_separator != NULL, NULL);
+ storage = e_storage_set_get_storage (storage_set, path + 1);
+ if (storage != NULL)
+ return (void *) e_storage_get_name (storage);
- return last_separator + 1;
+ return NULL;
}
static void