aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-storage-set-view.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-03-27 02:55:41 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-03-27 02:55:41 +0800
commitf342817e88f4e598b7962d94d497c408c45a8107 (patch)
tree030887f24eba1ffab1dcaf29792ba154506752c7 /shell/e-storage-set-view.c
parent4cc23476d3f379c519e6b4a08bf83188fc77f900 (diff)
downloadgsoc2013-evolution-f342817e88f4e598b7962d94d497c408c45a8107.tar.gz
gsoc2013-evolution-f342817e88f4e598b7962d94d497c408c45a8107.tar.zst
gsoc2013-evolution-f342817e88f4e598b7962d94d497c408c45a8107.zip
Finish the DnD stuff by implementing move/copy on the shell side as
well. Now we should just need to implement the corresponding bits in the components... svn path=/trunk/; revision=8949
Diffstat (limited to 'shell/e-storage-set-view.c')
-rw-r--r--shell/e-storage-set-view.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index fcc288b70b..dc084fac35 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -1170,17 +1170,22 @@ tree_drag_data_received (ETree *etree,
if (strcmp (target_type, EVOLUTION_PATH_TARGET_TYPE) == 0) {
const char *source_path;
- const char *destination_path;
+ const char *destination_folder_path;
+ char *destination_path;
source_path = (const char *) selection_data->data;
/* (Basic sanity checks.) */
if (source_path == NULL || source_path[0] != G_DIR_SEPARATOR || source_path[1] == '\0')
return;
- destination_path = e_tree_memory_node_get_data (E_TREE_MEMORY (priv->etree_model), path);
- if (destination_path == NULL)
+ destination_folder_path = e_tree_memory_node_get_data (E_TREE_MEMORY (priv->etree_model), path);
+ if (destination_folder_path == NULL)
return;
+ destination_path = g_concat_dir_and_file (destination_folder_path,
+ g_basename (source_path));
+
+
switch (context->action) {
case GDK_ACTION_MOVE:
g_print ("EStorageSetView: Moving from `%s' to `%s'\n", source_path, destination_path);
@@ -1195,6 +1200,8 @@ tree_drag_data_received (ETree *etree,
default:
g_warning ("EStorageSetView: Don't know action %d\n", context->action);
}
+
+ g_free (destination_path);
}
target_path = e_tree_memory_node_get_data (E_TREE_MEMORY(priv->etree_model), path);