aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-storage-set-view.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-09-22 01:02:51 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-09-22 01:02:51 +0800
commitc1e363ad2e18778f742fefa72564c5f1a2a8556b (patch)
tree985fa30ecbda87c4f2d8c20902b56485e23ba4f0 /shell/e-storage-set-view.c
parentaa1c1fa95bbccee08b044876b831f527ae835487 (diff)
downloadgsoc2013-evolution-c1e363ad2e18778f742fefa72564c5f1a2a8556b.tar.gz
gsoc2013-evolution-c1e363ad2e18778f742fefa72564c5f1a2a8556b.tar.zst
gsoc2013-evolution-c1e363ad2e18778f742fefa72564c5f1a2a8556b.zip
Check for a component for the given row *after* trying to handle
* e-storage-set-view.c (tree_drag_motion): Check for a component for the given row *after* trying to handle EVOLUTION_PATH_TARGET_TYPE. Otherwise, we always fail in the case of dnd between a folder and the toplevel node of its storage. (find_matching_target_for_drag_context): If not on a folder, always return EVOLUTION_PATH_TARGET_TYPE. svn path=/trunk/; revision=13050
Diffstat (limited to 'shell/e-storage-set-view.c')
-rw-r--r--shell/e-storage-set-view.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index 9218b184a7..73c73f940f 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -397,7 +397,7 @@ find_matching_target_for_drag_context (EStorageSetView *storage_set_view,
folder = get_folder_at_node (storage_set_view, path);
if (folder == NULL)
- return NULL;
+ return EVOLUTION_PATH_TARGET_TYPE;
accepted_types = e_folder_type_registry_get_accepted_dnd_types_for_type (folder_type_registry,
e_folder_get_type_string (folder));
@@ -1061,10 +1061,6 @@ tree_drag_motion (ETree *tree,
path = e_tree_node_at_row (E_TREE (storage_set_view), row);
- component_client = get_component_at_node (storage_set_view, path);
- if (component_client == NULL)
- return FALSE;
-
dnd_type = find_matching_target_for_drag_context (storage_set_view, path, context);
if (dnd_type == NULL)
return FALSE;
@@ -1072,6 +1068,10 @@ tree_drag_motion (ETree *tree,
if (strcmp (dnd_type, EVOLUTION_PATH_TARGET_TYPE) == 0)
return handle_evolution_path_drag_motion (storage_set_view, path, row, context, time);
+ component_client = get_component_at_node (storage_set_view, path);
+ if (component_client == NULL)
+ return FALSE;
+
destination_folder_interface = evolution_shell_component_client_get_dnd_destination_interface (component_client);
if (destination_folder_interface == NULL)
return FALSE;