[gnome-maps/wip/osrm-routing] WIP! Sidebar: fill the instructions list
- From: Mattias Bengtsson <mattiasb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/osrm-routing] WIP! Sidebar: fill the instructions list
- Date: Sat, 15 Jun 2013 16:11:24 +0000 (UTC)
commit f9053ffe091cca60dc3fbe5ab623e9319af65cdc
Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
Date: Sat Jun 15 01:28:24 2013 +0200
WIP! Sidebar: fill the instructions list
larger comment goes here...
src/gnome-maps.gresource.xml | 1 +
src/mapView.js | 2 +-
src/sidebar.js | 25 ++++++++++---------------
3 files changed, 12 insertions(+), 16 deletions(-)
---
diff --git a/src/gnome-maps.gresource.xml b/src/gnome-maps.gresource.xml
index 5916d8f..8239728 100644
--- a/src/gnome-maps.gresource.xml
+++ b/src/gnome-maps.gresource.xml
@@ -3,6 +3,7 @@
<gresource prefix="/org/gnome/maps">
<file preprocess="xml-stripblanks">app-menu.ui</file>
<file preprocess="xml-stripblanks">main-window.ui</file>
+ <file preprocess="xml-stripblanks">sidebar-directions.ui</file>
<file alias="application.css">../data/gnome-maps.css</file>
</gresource>
</gresources>
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 9caa61f..9b9f278 100644
--- a/src/sidebar.js
+++ b/src/sidebar.js
@@ -50,21 +50,11 @@ const Sidebar = new Lang.Class({
this._revealButton.get_style_context().add_class('osd');
this._revealButton.connect('clicked', this.toggle.bind(this));
- // then the sidebar itself, packed into the revealer
- let grid = new Gtk.Grid({ vexpand: true,
- hexpand: true,
- margin_top: 32,
- margin_left: 32,
- margin_right: 32,
- row_spacing: 15,
- orientation: Gtk.Orientation.VERTICAL,
- valign: Gtk.Align.FILL });
-
- let container = new Gtk.Frame({ child: grid,
- shadow_type: Gtk.ShadowType.IN,
- width_request: 200 });
- container.get_style_context().add_class('maps-sidebar');
-
+ let builder = new Gtk.Builder();
+ builder.add_from_resource('/org/gnome/maps/sidebar-directions.ui');
+ let container = builder.get_object('container');
+ this._instructions = builder.get_object('instructions');
+
this._revealer = new Gd.Revealer({ child: container,
orientation: Gtk.Orientation.VERTICAL });
this._revealer.show_all();
@@ -82,6 +72,11 @@ const Sidebar = new Lang.Class({
this.conceal();
},
+ addInstruction: function(instruction) {
+ this._instructions.add(new Gtk.Entry({ }));
+ // log(" * " + instruction.toString());
+ },
+
reveal: function() {
this._revealer.reveal_child = true;
this._revealButton.symbolic_icon_name = 'go-next-symbolic';
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]