summaryrefslogtreecommitdiff
path: root/wikipedia
diff options
context:
space:
mode:
authorrmacqueen <rorymacqueen@gmail.com>2013-08-07 16:46:25 -0700
committerrmacqueen <rorymacqueen@gmail.com>2013-08-07 16:46:25 -0700
commitcaf59b891550e9e210026be7a892c2e11176c87e (patch)
tree9d48bb80329a8b3b65e6552ad196ecd227572779 /wikipedia
parent986597b8cbcee2f941a4e7ba18cef0a30214d4a6 (diff)
parent9ae3cff83e113dbd8ca8cd70466fa150852daba9 (diff)
Merge pull request #240 from endlessm/issues/238
cur execution path is now application base path
Diffstat (limited to 'wikipedia')
-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);