[gnome-maps/wip/osrm-routing: 3/3] OSRM: fill sidebar with directions
- From: Mattias Bengtsson <mattiasb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/osrm-routing: 3/3] OSRM: fill sidebar with directions
- Date: Wed, 19 Jun 2013 13:02:56 +0000 (UTC)
commit 93a163f2f07055b56ab88234ce786a8a3227b1fc
Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
Date: Mon Jun 17 18:32:11 2013 +0200
OSRM: fill sidebar with directions
WIP! WIP! Start filling the Sidebar with route directions as fetched from
OSRM.
src/mapView.js | 2 +-
src/sidebar.js | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/mapView.js b/src/mapView.js
index f78545e..0eff54c 100644
--- a/src/mapView.js
+++ b/src/mapView.js
@@ -138,7 +138,7 @@ const MapView = new Lang.Class({
longitude: instruction.point.lon,
size: 8.0
}));
- log(" * " + instruction.toString());
+ this._sidebar.addInstruction(instruction);
}, this);
this._routeLayer.visible = true;
diff --git a/src/sidebar.js b/src/sidebar.js
index bb7b142..c2ed5aa 100644
--- a/src/sidebar.js
+++ b/src/sidebar.js
@@ -68,6 +68,15 @@ const Sidebar = new Lang.Class({
this.conceal();
},
+ addInstruction: function(instruction) {
+ this._ui.instructions.add(new Gtk.ListBoxRow({
+ child: new Gtk.Label({
+ label: instruction.toString()
+ })
+ }));
+ log(" * " + instruction.toString());
+ },
+
reveal: function() {
this._ui.revealer.reveal_child = true;
this._ui.revealButton.symbolic_icon_name = 'go-next-symbolic';
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]