[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, 3 Jul 2013 23:42:12 +0000 (UTC)
commit f53809bb6124d3e6f2b5c18b9ef83543f2d02b00
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 +++++++++
src/sidebar.ui | 3 +++
3 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/src/mapView.js b/src/mapView.js
index f6357e2..6c9e144 100644
--- a/src/mapView.js
+++ b/src/mapView.js
@@ -139,7 +139,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 5bebd4f..13dc9ac 100644
--- a/src/sidebar.js
+++ b/src/sidebar.js
@@ -77,6 +77,15 @@ const Sidebar = new Lang.Class({
return actor;
},
+ addInstruction: function(instruction) {
+ this._ui.instructionsList.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';
diff --git a/src/sidebar.ui b/src/sidebar.ui
index 6efc28c..6d76265 100644
--- a/src/sidebar.ui
+++ b/src/sidebar.ui
@@ -173,5 +173,8 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
+ <style>
+ <class name="osd" />
+ </style>
</object>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]