summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wikipedia/WikipediaApplication.js10
-rw-r--r--wikipedia/views/wikipedia_view.js3
2 files changed, 9 insertions, 4 deletions
diff --git a/wikipedia/WikipediaApplication.js b/wikipedia/WikipediaApplication.js
index dfecb31..a72b03b 100644
--- a/wikipedia/WikipediaApplication.js
+++ b/wikipedia/WikipediaApplication.js
@@ -26,13 +26,17 @@ const WikipediaApplication = new Lang.Class({
'Application name',
'Name of the Wikipedia-based application',
GObject.ParamFlags.READABLE,
+ ''),
+
+ // Name of the Wikipedia-based application, e.g. 'Brazil', 'Math'
+ 'application-base-path': GObject.ParamSpec.string('application-base-path',
+ 'Application Base Path',
+ 'Path to base directory where execution began',
+ GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY,
'')
},
_init: function(props) {
- this._application_uri = null;
- this._categories = null;
-
this.parent(props);
},
diff --git a/wikipedia/views/wikipedia_view.js b/wikipedia/views/wikipedia_view.js
index 6ac2134..261e879 100644
--- a/wikipedia/views/wikipedia_view.js
+++ b/wikipedia/views/wikipedia_view.js
@@ -77,7 +77,8 @@ const WikipediaView = new Lang.Class({
let articleHTML = article["text"];
let title = article['title'];
let current_dir = Endless.getCurrentFileDir();
- let cur_exec = Utils.get_path_for_relative_path(".");
+
+ let cur_exec = this.get_toplevel().get_application().application_base_path;
let image_path = cur_exec + "/web_view/article_images/";
let documentHTML = this._get_meta_html() + this._get_body_html(articleHTML, human_title, image_path);