[gnome-maps/wip/mlundblad/transit-routing: 1/3] WIP: Add list box row class for representing transit itineraries
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/transit-routing: 1/3] WIP: Add list box row class for representing transit itineraries
- Date: Mon, 30 May 2016 20:39:22 +0000 (UTC)
commit f89b8b06e065b49e00d2aa8348107efcfe39acb2
Author: Marcus Lundblad <ml update uu se>
Date: Mon May 30 22:34:39 2016 +0200
WIP: Add list box row class for representing transit itineraries
This list box class is used to render the overview items showing the list of
found itineraries when performing a transit route search.
data/org.gnome.Maps.data.gresource.xml | 1 +
data/ui/transit-itinerary-row.ui | 12 ++++++++++
src/org.gnome.Maps.src.gresource.xml | 1 +
src/transitItineraryRow.js | 38 ++++++++++++++++++++++++++++++++
4 files changed, 52 insertions(+), 0 deletions(-)
---
diff --git a/data/org.gnome.Maps.data.gresource.xml b/data/org.gnome.Maps.data.gresource.xml
index 2c9c82d..d859a5b 100644
--- a/data/org.gnome.Maps.data.gresource.xml
+++ b/data/org.gnome.Maps.data.gresource.xml
@@ -31,6 +31,7 @@
<file preprocess="xml-stripblanks">ui/sidebar.ui</file>
<file preprocess="xml-stripblanks">ui/social-place-more-results-row.ui</file>
<file preprocess="xml-stripblanks">ui/social-place-row.ui</file>
+ <file preprocess="xml-stripblanks">ui/transit-itinerary-row.ui</file>
<file preprocess="xml-stripblanks">ui/user-location-bubble.ui</file>
<file preprocess="xml-stripblanks">ui/zoom-control.ui</file>
<file preprocess="xml-stripblanks">ui/zoom-in-notification.ui</file>
diff --git a/data/ui/transit-itinerary-row.ui b/data/ui/transit-itinerary-row.ui
new file mode 100644
index 0000000..089aeef
--- /dev/null
+++ b/data/ui/transit-itinerary-row.ui
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<interface>
+ <requires lib="gtk+" version="3.14"/>
+ <template class="Gjs_TransitItineraryRow" parent="GtkListBoxRow">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkGrid">
+
+ </object>
+ </child>
+ </template>
+</interface>
diff --git a/src/org.gnome.Maps.src.gresource.xml b/src/org.gnome.Maps.src.gresource.xml
index 8a9a218..4b6d148 100644
--- a/src/org.gnome.Maps.src.gresource.xml
+++ b/src/org.gnome.Maps.src.gresource.xml
@@ -72,6 +72,7 @@
<file>socialPlaceMatcher.js</file>
<file>storedRoute.js</file>
<file>togeojson/togeojson.js</file>
+ <file>transitItineraryRow.js</file>
<file>transitOptions.js</file>
<file>transitPlan.js</file>
<file>translations.js</file>
diff --git a/src/transitItineraryRow.js b/src/transitItineraryRow.js
new file mode 100644
index 0000000..732e1ad
--- /dev/null
+++ b/src/transitItineraryRow.js
@@ -0,0 +1,38 @@
+/* -*- Mode: JS2; indent-tabs-mode: nil; js2-basic-offset: 4 -*- */
+/* vim: set et ts=4 sw=4: */
+/*
+ * Copyright (c) 2016 Marcus Lundblad
+ *
+ * GNOME Maps is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * GNOME Maps is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with GNOME Maps; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author: Marcus Lundblad <ml update uu se>
+ */
+
+const Lang = imports.lang;
+
+const Gtk = imports.gi.Gtk;
+
+const TransitItineraryRow = new Lang.Class({
+ Name: 'TransitItineraryRow',
+ Extends: Gtk.ListBoxRow,
+ Template: 'resource:///org/gnome/Maps/ui/transit-itinerary-row.ui',
+
+ _init: function(params) {
+ this._itinerary = params.itinerary;
+ delete params.itinerary;
+
+ this.parent(params);
+ }
+});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]