summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThaddaeus Tintenfisch <thad.fisch@gmail.com>2015-03-19 21:20:02 +0100
committerEric Koegel <eric.koegel@gmail.com>2015-05-17 12:14:59 +0300
commit02aa86d01c2e5f4e7905215e461375d299c93ecb (patch)
treec3de437845b1b2747dd6fc9220b1681d69b678cc
parentf82ad9ae3360a61cfe357a4b41a72212f0572e85 (diff)
downloadxfdesktop-02aa86d01c2e5f4e7905215e461375d299c93ecb.tar.gz
Prefer "_NETSCAPE_URL" over "text/uri-list" (Bug #9632)
Create a link instead of a copy after dragging the URL or media content from a web browser window. Matches the behavior of Nautilus and Nemo.
-rw-r--r--src/xfdesktop-file-icon-manager.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/xfdesktop-file-icon-manager.c b/src/xfdesktop-file-icon-manager.c
index 9032e3e5..0f74aba9 100644
--- a/src/xfdesktop-file-icon-manager.c
+++ b/src/xfdesktop-file-icon-manager.c
@@ -254,9 +254,9 @@ static const GtkTargetEntry drag_targets[] = {
};
static const gint n_drag_targets = (sizeof(drag_targets)/sizeof(drag_targets[0]));
static const GtkTargetEntry drop_targets[] = {
+ { "_NETSCAPE_URL", 0, TARGET_NETSCAPE_URL, },
{ "text/uri-list", 0, TARGET_TEXT_URI_LIST, },
{ "XdndDirectSave0", 0, TARGET_XDND_DIRECT_SAVE0, },
- { "_NETSCAPE_URL", 0, TARGET_NETSCAPE_URL },
};
static const gint n_drop_targets = (sizeof(drop_targets)/sizeof(drop_targets[0]));
@@ -3557,12 +3557,13 @@ xfdesktop_file_icon_manager_drag_data_received(XfdesktopIconViewManager *manager
}
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
- * stage 1 */
+ /* FIXME: we don't support XdndDirectSave stage 3, result F, i.e.,
+ * the app has to save the data itself given the filename we provided
+ * in stage 1 */
if(8 == gtk_selection_data_get_format(data)
&& 1 == gtk_selection_data_get_length(data)
- && 'F' == gtk_selection_data_get_data(data)[0]) {
+ && 'F' == gtk_selection_data_get_data(data)[0])
+ {
gdk_property_change(gdk_drag_context_get_source_window(context),
gdk_atom_intern("XdndDirectSave0", FALSE),
gdk_atom_intern("text/plain", FALSE), 8,