[Xfce4-commits] [xfce/xfdesktop] 13/35: Prefer "_NETSCAPE_URL" over "text/uri-list" (Bug #9632)

noreply at xfce.org noreply at xfce.org
Sun May 17 11:38:01 CEST 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch xfce-4.12
in repository xfce/xfdesktop.

commit 02aa86d01c2e5f4e7905215e461375d299c93ecb
Author: Thaddaeus Tintenfisch <thad.fisch at gmail.com>
Date:   Thu Mar 19 21:20:02 2015 +0100

    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.
---
 src/xfdesktop-file-icon-manager.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/xfdesktop-file-icon-manager.c b/src/xfdesktop-file-icon-manager.c
index 9032e3e..0f74aba 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,

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list