[gnome-maps/wip/mlundblad/touch-gestures] contextMenu: WIP: use a GtkGestureLongPress...



commit 5056213e7899c2013a332596b36c80366dd862fa
Author: Marcus Lundblad <ml update uu se>
Date:   Mon Oct 16 22:21:32 2017 +0200

    contextMenu: WIP: use a GtkGestureLongPress...

 src/contextMenu.js |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/contextMenu.js b/src/contextMenu.js
index 5306093..8cebf75 100644
--- a/src/contextMenu.js
+++ b/src/contextMenu.js
@@ -72,6 +72,15 @@ var ContextMenu = new Lang.Class({
                                        this._routingUpdate.bind(this));
         this._routeItem.visible = false;
         this._routingUpdate();
+        this._initLongPress();
+    },
+
+    _initLongPress: function() {
+        let gesture = new Gtk.GestureLongPress({ widget: this._mapView });
+
+        gesture.connect('pressed', (function() {
+            Utils.debug('long press');
+        }).bind(this));
     },
 
     _onButtonReleaseEvent: function(widget, event) {


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