[gnome-maps] mainWindow: set correct DND drag status



commit b1c076f9f39ae5eee5c251aae898ca5b6ac53204
Author: Hashem Nasarat <hashem riseup net>
Date:   Wed Jan 6 23:45:57 2016 -0500

    mainWindow: set correct DND drag status
    
    Sometimes Maps wouldn't accept a drop because we weren't setting the
    drag_status appropriately.
    
    Also change drag_finish to denote that the originally-dropped file is
    not a semantic move and that the source shouldn't delete the original
    data because Maps doesn't really take responsibility for the file -- it
    just displays it until the app quits.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759544
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760256

 src/mainWindow.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index dc4e623..cd59837 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -150,6 +150,7 @@ const MainWindow = new Lang.Class({
         this.drag_dest_add_uri_targets();
 
         this.connect('drag-motion', (function(widget, ctx, x, y, time) {
+            Gdk.drag_status(ctx, Gdk.DragAction.COPY, time);
             return true;
         }).bind(this));
 
@@ -160,7 +161,7 @@ const MainWindow = new Lang.Class({
             if (content_type === 'application/vnd.geo+json' ||
                 content_type === 'application/json') {
                 this._mapView.openGeoJSON(Gio.file_new_for_uri(uri));
-                Gtk.drag_finish(ctx, true, true, time);
+                Gtk.drag_finish(ctx, true, false, time);
             } else {
                 Gtk.drag_finish(ctx, false, false, time);
             }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]