[gnome-maps/wip/osrm-routing: 24/24] OSRM: fill sidebar with directions
- From: Mattias Bengtsson <mattiasb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/osrm-routing: 24/24] OSRM: fill sidebar with directions
- Date: Wed, 3 Jul 2013 22:40:00 +0000 (UTC)
commit 8b36cffc3e3d33df7e5985b56ffa64043c983fe4
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 30fa2f3..0037fa1 100644
--- a/src/sidebar.js
+++ b/src/sidebar.js
@@ -79,6 +79,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 76fef33..6f4498a 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]