diff options
author | Rory MacQueen <rorymacqueen@gmail.com> | 2013-08-07 16:31:11 -0700 |
---|---|---|
committer | Rory MacQueen <rorymacqueen@gmail.com> | 2013-08-07 16:31:11 -0700 |
commit | 9ae3cff83e113dbd8ca8cd70466fa150852daba9 (patch) | |
tree | c90dcc2848e1abcf9ab6c92f5e2bc3f37aa02f96 /wikipedia | |
parent | 1ac6803f44cc947dc13773883a04981624fc1228 (diff) |
cur execution path is now application base path
[endlessm/eos-sdk#238]
Diffstat (limited to 'wikipedia')
-rw-r--r-- | wikipedia/WikipediaApplication.js | 10 | ||||
-rw-r--r-- | wikipedia/views/wikipedia_view.js | 3 |
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); |