diff options
author | root <root@rshg054.dnsready.net> | 2011-08-21 23:14:35 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2011-08-21 23:14:35 +0000 |
commit | e9a5c646563c984f362db1777f8c6bc7da63a4ab (patch) | |
tree | 709694a1605c0b60dc9c0c57718e7fd661924646 /extra/xfdesktop/fix-desktop-drag-and-drop.patch | |
parent | 839141249778baa4dba0f0511c52b5eded3cd934 (diff) |
Sun Aug 21 23:14:34 UTC 2011
Diffstat (limited to 'extra/xfdesktop/fix-desktop-drag-and-drop.patch')
-rw-r--r-- | extra/xfdesktop/fix-desktop-drag-and-drop.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/extra/xfdesktop/fix-desktop-drag-and-drop.patch b/extra/xfdesktop/fix-desktop-drag-and-drop.patch new file mode 100644 index 000000000..8c0c4bcc8 --- /dev/null +++ b/extra/xfdesktop/fix-desktop-drag-and-drop.patch @@ -0,0 +1,57 @@ +diff --git a/src/xfdesktop-file-icon-manager.c b/src/xfdesktop-file-icon-manager.c +index 2711646..d3ca2eb 100644 +--- a/src/xfdesktop-file-icon-manager.c ++++ b/src/xfdesktop-file-icon-manager.c +@@ -2794,7 +2794,7 @@ xfdesktop_file_icon_manager_drag_data_received(XfdesktopIconViewManager *manager + GFile *tfile = NULL; + gboolean copy_only = TRUE, drop_ok = FALSE; + GList *file_list; +- ++ + if(info == TARGET_XDND_DIRECT_SAVE0) { + /* we don't suppose XdndDirectSave stage 3, result F, i.e., the app + * has to save the data itself given the filename we provided in +@@ -2816,7 +2816,7 @@ xfdesktop_file_icon_manager_drag_data_received(XfdesktopIconViewManager *manager + /* data is "URL\nTITLE" */ + GFile *source_file = NULL; + gchar *exo_desktop_item_edit = g_find_program_in_path("exo-desktop-item-edit"); +- ++ + if(drop_icon) { + GFileInfo *finfo = xfdesktop_file_icon_peek_file_info(XFDESKTOP_FILE_ICON(drop_icon)); + if(g_file_info_get_file_type(finfo) == G_FILE_TYPE_DIRECTORY) +@@ -2911,8 +2911,15 @@ xfdesktop_file_icon_manager_drag_data_received(XfdesktopIconViewManager *manager + gchar *dest_basename = g_file_get_basename(l->data); + + if(dest_basename && *dest_basename != '\0') { +- GFile *dest_file = g_file_get_child(base_dest_file, dest_basename); +- dest_file_list = g_list_prepend(dest_file_list, dest_file); ++ /* If we copy a file, we need to use the new absolute filename ++ * as the destination. If we move, we need to use the destination ++ * directory. */ ++ if(copy_only) { ++ GFile *dest_file = g_file_get_child(base_dest_file, dest_basename); ++ dest_file_list = g_list_prepend(dest_file_list, dest_file); ++ } else { ++ dest_file_list = g_list_prepend(dest_file_list, base_dest_file); ++ } + } + + g_free(dest_basename); +@@ -2923,10 +2930,10 @@ xfdesktop_file_icon_manager_drag_data_received(XfdesktopIconViewManager *manager + if(dest_file_list) { + dest_file_list = g_list_reverse(dest_file_list); + +- drop_ok =xfdesktop_file_utils_transfer_files(context->action, +- file_list, +- dest_file_list, +- fmanager->priv->gscreen); ++ drop_ok = xfdesktop_file_utils_transfer_files(context->action, ++ file_list, ++ dest_file_list, ++ fmanager->priv->gscreen); + } + + xfdesktop_file_utils_file_list_free(dest_file_list); + + |