[polari/wip/fmuellner/drop-target-3-20: 5/6] pasteManager: Use connect_after() to receive drag data



commit 9a4254b9d8ae0eb28017f8a8c31e21c48cff88be
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri May 6 15:24:31 2016 +0200

    pasteManager: Use connect_after() to receive drag data
    
    GTK+'s text widgets already have built-in DND support which may conflict
    with our own drop target support. Currently that is not an issue, as the
    chat log is not editable, which disables the built-in support. However we
    want to extend the entry's built-in drop target support as well, where
    this will be an issue - in particular as it should use either the regular
    or our custom support.
    Running our custom GtkWidget::drag-data-received handler after the object
    method handler will allow classes to do that by either making the built-in
    handler a NOOP or stopping the signal emission.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=766068

 src/pasteManager.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/pasteManager.js b/src/pasteManager.js
index 3900581..c864fc0 100644
--- a/src/pasteManager.js
+++ b/src/pasteManager.js
@@ -78,8 +78,8 @@ const DropTargetIface = new Lang.Interface({
         widget.connect('drag-drop', Lang.bind(this, this._onDragDrop));
         widget.connect('drag-leave', Lang.bind(this, this._onDragLeave));
         widget.connect('drag-motion', Lang.bind(this, this._onDragMotion));
-        widget.connect('drag-data-received',
-                       Lang.bind(this, this._onDragDataReceived));
+        widget.connect_after('drag-data-received',
+                             Lang.bind(this, this._onDragDataReceived));
     },
 
     _onDragDrop: function(widget, context, x, y, time) {


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