[gnome-maps/wip/mlundblad/transit-routing: 1/2] WIP: Add print layout for transit



commit 2c0e2fba6997fbd190331bbd8a7119283856b5a2
Author: Marcus Lundblad <ml update uu se>
Date:   Tue Sep 20 23:27:09 2016 +0200

    WIP: Add print layout for transit

 src/org.gnome.Maps.src.gresource.xml |    1 +
 src/transitPrintLayout.js            |   40 ++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 0 deletions(-)
---
diff --git a/src/org.gnome.Maps.src.gresource.xml b/src/org.gnome.Maps.src.gresource.xml
index fa1b45d..89ff771 100644
--- a/src/org.gnome.Maps.src.gresource.xml
+++ b/src/org.gnome.Maps.src.gresource.xml
@@ -82,6 +82,7 @@
     <file>transitMoreRow.js</file>
     <file>transitOptions.js</file>
     <file>transitPlan.js</file>
+    <file>transitPrintLayout.js</file>
     <file>transitRouteLabel.js</file>
     <file>transitStopRow.js</file>
     <file>transitWalkMarker.js</file>
diff --git a/src/transitPrintLayout.js b/src/transitPrintLayout.js
new file mode 100644
index 0000000..561a422
--- /dev/null
+++ b/src/transitPrintLayout.js
@@ -0,0 +1,40 @@
+/* -*- 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, see <http://www.gnu.org/licenses/>.
+ *
+ * Author: Marcus Lundblad <ml update uu se>
+ */
+
+const Lang = imports.lang;
+
+const PrintLayout = imports.printLayout;
+
+const TransitPrintLayout = new Lang.Class({
+    Name: 'TransitPrintLayout',
+    Extends: PrintLayout.PrintLayout,
+
+    _init: function(params) {
+        this._itinerary = params.itinerary;
+        delete params.itinerary;
+
+        this.parent(params);
+    },
+
+    render: function() {
+        this._createNewPage();
+    }
+});


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]