diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2001-11-06 08:33:51 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2001-11-06 08:33:51 +0800 |
commit | b45618e877f5a0a84a865e2b7bdd4215b93586ff (patch) | |
tree | d4ea4552588d6e14a2dfddd444fa89905cbb0119 /shell/e-storage-set-view.c | |
parent | b464a6713ae1085c3799ee9c254e7f595518fd84 (diff) | |
download | gsoc2013-evolution-b45618e877f5a0a84a865e2b7bdd4215b93586ff.tar gsoc2013-evolution-b45618e877f5a0a84a865e2b7bdd4215b93586ff.tar.gz gsoc2013-evolution-b45618e877f5a0a84a865e2b7bdd4215b93586ff.tar.bz2 gsoc2013-evolution-b45618e877f5a0a84a865e2b7bdd4215b93586ff.tar.lz gsoc2013-evolution-b45618e877f5a0a84a865e2b7bdd4215b93586ff.tar.xz gsoc2013-evolution-b45618e877f5a0a84a865e2b7bdd4215b93586ff.tar.zst gsoc2013-evolution-b45618e877f5a0a84a865e2b7bdd4215b93586ff.zip |
Get the storage name if we are dragging a storage instead of a folder.
* e-storage-set-view.c (set_e_shortcut_selection): Get the storage
name if we are dragging a storage instead of a folder.
svn path=/trunk/; revision=14604
Diffstat (limited to 'shell/e-storage-set-view.c')
-rw-r--r-- | shell/e-storage-set-view.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c index ad302c0d5f..06f977b9c7 100644 --- a/shell/e-storage-set-view.c +++ b/shell/e-storage-set-view.c @@ -574,6 +574,7 @@ set_e_shortcut_selection (EStorageSetView *storage_set_view, int shortcut_len; char *shortcut; const char *name; + const char *folder_path; g_assert (storage_set_view != NULL); g_assert (selection_data != NULL); @@ -581,8 +582,22 @@ set_e_shortcut_selection (EStorageSetView *storage_set_view, priv = storage_set_view->priv; node = lookup_node_in_hash (storage_set_view, priv->selected_row_path); - folder = get_folder_at_node (storage_set_view, node); - name = e_folder_get_name (folder); + + folder_path = e_tree_memory_node_get_data (E_TREE_MEMORY(priv->etree_model), node); + g_assert (folder_path != NULL); + + folder = e_storage_set_get_folder (priv->storage_set, folder_path); + if (folder != NULL) { + name = e_folder_get_name (folder); + } else { + EStorage *storage; + + storage = e_storage_set_get_storage (priv->storage_set, folder_path + 1); + if (storage != NULL) + name = e_storage_get_display_name (storage); + else + name = NULL; + } /* FIXME: Get `evolution:' from somewhere instead of hardcoding it here. */ |