[gnome-maps] placeEntry: Return true from 'match-selected'



commit d64ce6557b4a072141637a0fb8d313fbe6bccc4b
Author: Jonas Danielsson <jonas threetimestwo org>
Date:   Sun Aug 24 20:03:19 2014 +0200

    placeEntry: Return true from 'match-selected'
    
    The documentation for GtkEntryCompletion states:
    
    "When the user selects a completion, the content of the
    entry is updated. By default, the content of the entry is
    replaced by the text column of the model, but this can be
    overridden by connecting to the "match-selected" signal and
    updating the entry in the signal handler. Note that you
    should return TRUE from the signal handler to suppress the
    default behaviour."
    
    We update the entry in our signal handler but we do not
    return TRUE. This results in the text being set to the
    empty string and setting the place of the placeEntry
    to null.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=734597

 src/placeEntry.js |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/placeEntry.js b/src/placeEntry.js
index 6bf93d4..c2202cf 100644
--- a/src/placeEntry.js
+++ b/src/placeEntry.js
@@ -84,6 +84,7 @@ const PlaceEntry = new Lang.Class({
 
         completion.connect('match-selected', (function(c, model, iter) {
             this.place = model.get_value(iter, PlaceStore.Columns.PLACE);
+            return true;
         }).bind(this));
 
         return completion;


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