From f342817e88f4e598b7962d94d497c408c45a8107 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Mon, 26 Mar 2001 18:55:41 +0000 Subject: 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 --- shell/e-storage-set-view.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'shell/e-storage-set-view.c') 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); -- cgit v1.2.3