[gnome-maps/wip/mlundblad/transit-service-discovery: 1/8] transitPlan: Add properties for attribution



commit b3f57ec2eb872b38c9af0cc659653d652c165167
Author: Marcus Lundblad <ml update uu se>
Date:   Thu Aug 29 21:21:50 2019 +0200

    transitPlan: Add properties for attribution
    
    Add properties for attribution name
    and URL.

 src/transitPlan.js | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
---
diff --git a/src/transitPlan.js b/src/transitPlan.js
index d30f9db..1a1caaf 100644
--- a/src/transitPlan.js
+++ b/src/transitPlan.js
@@ -96,6 +96,8 @@ var Plan = GObject.registerClass({
     _init(params) {
         super._init(params);
         this.reset();
+        this._attribution = null;
+        this._attributionUrl = null;
     }
 
     get itineraries() {
@@ -106,6 +108,22 @@ var Plan = GObject.registerClass({
         return this._selectedItinerary;
     }
 
+    get attribution() {
+        return this._attribution;
+    }
+
+    set attribution(attribution) {
+        this._attribution = attribution;
+    }
+
+    get attributionUrl() {
+        return this._attributionUrl;
+    }
+
+    set attributionUrl(attributionUrl) {
+        this._attributionUrl = attributionUrl;
+    }
+
     update(itineraries) {
         this._itineraries = itineraries;
         this.bbox = this._createBBox();
@@ -116,6 +134,8 @@ var Plan = GObject.registerClass({
         this._itineraries = [];
         this.bbox = null;
         this._selectedItinerary = null;
+        this._attribution = null;
+        this._attributionUrl = null;
         this.emit('reset');
     }
 


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