aboutsummaryrefslogtreecommitdiffstats
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
parentaa1c1fa95bbccee08b044876b831f527ae835487 (diff)
downloadgsoc2013-evolution-c1e363ad2e18778f742fefa72564c5f1a2a8556b.tar
gsoc2013-evolution-c1e363ad2e18778f742fefa72564c5f1a2a8556b.tar.gz
gsoc2013-evolution-c1e363ad2e18778f742fefa72564c5f1a2a8556b.tar.bz2
gsoc2013-evolution-c1e363ad2e18778f742fefa72564c5f1a2a8556b.tar.lz
gsoc2013-evolution-c1e363ad2e18778f742fefa72564c5f1a2a8556b.tar.xz
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
-rw-r--r--shell/ChangeLog9
-rw-r--r--shell/e-storage-set-view.c10
2 files changed, 14 insertions, 5 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 482e7d5cf4..0e35b6f4c3 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,14 @@
2001-09-20 Ettore Perazzoli <ettore@ximian.com>
+ * 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.
+
+2001-09-20 Ettore Perazzoli <ettore@ximian.com>
+
* e-shell-view.c (storage_set_view_box_event_cb): Removed.
(folder_bar_popup_map_callback): Don't connect.
(reparent_storage_set_view_box_and_destroy_popup): Don't ungrab
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;