[gnome-maps] searchPopup: Handle activation by stored route



commit 960f65fb97cd32e2d321a8d8bc36e8d5d202b2cb
Author: Jonas Danielsson <jonas threetimestwo org>
Date:   Sun Aug 16 21:09:09 2015 +0200

     searchPopup: Handle activation by stored route

 src/searchPopup.js |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/searchPopup.js b/src/searchPopup.js
index d4a204b..0963cb6 100644
--- a/src/searchPopup.js
+++ b/src/searchPopup.js
@@ -22,6 +22,7 @@ const GObject = imports.gi.GObject;
 const Gtk = imports.gi.Gtk;
 const Lang = imports.lang;
 
+const Application = imports.application;
 const PlaceListRow = imports.placeListRow;
 const PlaceStore = imports.placeStore;
 
@@ -63,6 +64,10 @@ const SearchPopup = new Lang.Class({
             this._mode = Mode.ACTIVATED;
         }).bind(this));
 
+        Application.routeService.route.connect('updated', (function() {
+            this._mode = Mode.ACTIVATED;
+        }).bind(this));
+
          this._list.connect('row-activated', (function(list, row) {
              if (row)
                  this.emit('selected', row.place);
@@ -127,7 +132,7 @@ const SearchPopup = new Lang.Class({
     },
 
     showCompletion: function() {
-        if (this._mode === Mode.ACTIVATED) {
+        if (this._mode === undefined || this._mode === Mode.ACTIVATED) {
             this._mode = Mode.IDLE;
             return;
         }


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