[gnome-maps/wip/jonasdn/storedRoute: 116/118] searchPopup: Handle activation by stored route
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/jonasdn/storedRoute: 116/118] searchPopup: Handle activation by stored route
- Date: Sun, 16 Aug 2015 19:17:55 +0000 (UTC)
commit 83d4f60ffc78a92a716d0aa6fdd12756e7c54c4f
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]