[gnome-maps] sidebar: Set default focus to From entry
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] sidebar: Set default focus to From entry
- Date: Tue, 16 Sep 2014 05:35:51 +0000 (UTC)
commit 0bb4777e8eb0439ab7270fd8a8cf23e4611e2a93
Author: Damián Nohales <damiannohales gmail com>
Date: Fri Sep 12 11:47:59 2014 -0300
sidebar: Set default focus to From entry
https://bugzilla.gnome.org/show_bug.cgi?id=736569
src/sidebar.js | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/sidebar.js b/src/sidebar.js
index fad8194..4ee4c11 100644
--- a/src/sidebar.js
+++ b/src/sidebar.js
@@ -79,9 +79,13 @@ const Sidebar = new Lang.Class({
ui.modeBikeToggle,
ui.modeCarToggle);
- this._initRouteEntry(ui.fromEntryGrid, 0);
+ let fromEntry = this._initRouteEntry(ui.fromEntryGrid, 0);
this._initRouteEntry(ui.toEntryGrid, 1);
+ this.bind_property('child-revealed',
+ fromEntry, 'has_focus',
+ GObject.BindingFlags.DEFAULT);
+
ui.viaAddButton.connect('clicked', (function() {
this._createViaRow(ui.viaGridContainer);
}).bind(this));
@@ -156,6 +160,8 @@ const Sidebar = new Lang.Class({
point, 'place',
GObject.BindingFlags.BIDIRECTIONAL);
Application.routeService.query.addPoint(point, pointIndex);
+
+ return entry;
},
_initInstructionList: function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]