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 | |
parent | b464a6713ae1085c3799ee9c254e7f595518fd84 (diff) | |
download | gsoc2013-evolution-b45618e877f5a0a84a865e2b7bdd4215b93586ff.tar.gz 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')
-rw-r--r-- | shell/ChangeLog | 7 | ||||
-rw-r--r-- | shell/e-storage-set-view.c | 19 |
2 files changed, 23 insertions, 3 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 720fb7a0a2..5784e58f11 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,4 +1,9 @@ -2001-11-05 Anna Marie Dirks <anna@ximian.com> +2001-11-05 Ettore Perazzoli <ettore@ximian.com> + + * e-storage-set-view.c (set_e_shortcut_selection): Get the storage + name if we are dragging a storage instead of a folder. + +2001-11-01 Anna Marie Dirks <anna@ximian.com> * e-shell-importer.c (prepare_intelligent_page): Fixed spacing and alignment probelms. (See bug #14281) 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. */ |