[gnome-maps/wip/jonasdn/storedRoute: 6/13] placeEntry: Add match route property



commit 66ace71cbe6b3e5e447236c84a62800f0d85e877
Author: Jonas Danielsson <jonas threetimestwo org>
Date:   Thu Feb 12 20:43:34 2015 +0100

    placeEntry: Add match route property
    
    https://bugzilla.gnome.org/show_bug.cgi?id=744425

 src/placeEntry.js |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/placeEntry.js b/src/placeEntry.js
index 185b6d6..159b06a 100644
--- a/src/placeEntry.js
+++ b/src/placeEntry.js
@@ -97,6 +97,9 @@ const PlaceEntry = new Lang.Class({
         let parseOnFocusOut = props.parseOnFocusOut;
         delete props.parseOnFocusOut;
 
+        this._matchRoute = props.matchRoute || false;
+        delete props.matchRoute;
+
         this.parent(props);
 
         this._filter = new Gtk.TreeModelFilter({ child_model: Application.placeStore });
@@ -162,6 +165,10 @@ const PlaceEntry = new Lang.Class({
 
     _completionVisibleFunc: function(model, iter) {
         let place = model.get_value(iter, PlaceStore.Columns.PLACE);
+        let type = model.get_value(iter, PlaceStore.Columns.TYPE);
+
+        if (!this._matchRoute && type === PlaceStore.PlaceType.FAVORITE_ROUTE)
+            return false;
 
         if (place !== null)
             return place.match(this.text);


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