[gnome-maps] sidebar: Deselect text when focusing route entries
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] sidebar: Deselect text when focusing route entries
- Date: Mon, 5 Feb 2018 21:00:29 +0000 (UTC)
commit 8e02777a8b3610403c4c69ce057e54b384848a35
Author: Vibhanshu Vaibhav <ayush vibhanshu gmail com>
Date: Thu Jan 25 10:33:02 2018 +0530
sidebar: Deselect text when focusing route entries
https://bugzilla.gnome.org/show_bug.cgi?id=783632
src/sidebar.js | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/sidebar.js b/src/sidebar.js
index d338422..f5eeaa4 100644
--- a/src/sidebar.js
+++ b/src/sidebar.js
@@ -196,9 +196,10 @@ var Sidebar = new Lang.Class({
this._query.addPoint(lastIndex - 1);
}).bind(this));
- this.bind_property('child-revealed',
- routeEntry.entry, 'has_focus',
- GObject.BindingFlags.DEFAULT);
+ this.connect('notify::child-revealed', (function(){
+ if (this.child_revealed)
+ routeEntry.entry.grab_focus_without_selecting();
+ }).bind(this));
} else if (type === RouteEntry.Type.VIA) {
routeEntry.button.connect('clicked', (function() {
let row = routeEntry.get_parent();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]