From b45618e877f5a0a84a865e2b7bdd4215b93586ff Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Tue, 6 Nov 2001 00:33:51 +0000 Subject: 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 --- shell/ChangeLog | 7 ++++++- 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 +2001-11-05 Ettore Perazzoli + + * 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 * 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. */ -- cgit