summaryrefslogtreecommitdiff
path: root/wikipedia
diff options
context:
space:
mode:
Diffstat (limited to 'wikipedia')
-rw-r--r--wikipedia/ArticleList.js2
-rw-r--r--wikipedia/EndlessWikipedia.js2
-rw-r--r--wikipedia/Makefile.am.inc20
-rw-r--r--wikipedia/PrebuiltArticlesPage.js5
-rw-r--r--wikipedia/PrebuiltCategoryPage.js4
-rw-r--r--wikipedia/PrebuiltFrontPage.js4
-rw-r--r--wikipedia/PrebuiltWikipediaApplication.js6
-rw-r--r--wikipedia/WikipediaApplication.js4
-rw-r--r--wikipedia/WikipediaWebView.js (renamed from wikipedia/views/wikipedia_view.js)6
-rw-r--r--wikipedia/models/category_model.js2
-rw-r--r--wikipedia/models/domain_wiki_model.js4
-rw-r--r--wikipedia/presenters/domain_wiki_presenter.js6
-rw-r--r--wikipedia/views/domain_wiki_view.js6
-rw-r--r--wikipedia/widgets/BackButton.js (renamed from wikipedia/BackButton.js)0
-rw-r--r--wikipedia/widgets/BoxWithBg.js (renamed from wikipedia/BoxWithBg.js)0
-rw-r--r--wikipedia/widgets/SideBarButton.js (renamed from wikipedia/SideBarButton.js)0
-rw-r--r--wikipedia/widgets/TextButton.js (renamed from wikipedia/TextButton.js)0
-rw-r--r--wikipedia/widgets/category_button.js (renamed from wikipedia/views/category_button.js)2
-rw-r--r--wikipedia/widgets/category_layout_manager.js (renamed from wikipedia/views/category_layout_manager.js)0
-rw-r--r--wikipedia/widgets/category_selector_view.js (renamed from wikipedia/views/category_selector_view.js)4
-rw-r--r--wikipedia/widgets/scaled_image.js (renamed from wikipedia/scaled_image.js)0
-rw-r--r--wikipedia/widgets/title_label_view.js (renamed from wikipedia/views/title_label_view.js)2
22 files changed, 39 insertions, 40 deletions
diff --git a/wikipedia/ArticleList.js b/wikipedia/ArticleList.js
index 05f4470..d6edb0f 100644
--- a/wikipedia/ArticleList.js
+++ b/wikipedia/ArticleList.js
@@ -3,7 +3,7 @@ const GObject = imports.gi.GObject;
const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
-const TextButton = imports.TextButton;
+const TextButton = imports.wikipedia.widgets.TextButton;
const ARTICLE_LIST_SIZE_REQUEST = 320;
const HOVER_ARROW_URI = "/com/endlessm/wikipedia-domain/assets/submenu_hover_arrow.png";
diff --git a/wikipedia/EndlessWikipedia.js b/wikipedia/EndlessWikipedia.js
index 333f486..25df16c 100644
--- a/wikipedia/EndlessWikipedia.js
+++ b/wikipedia/EndlessWikipedia.js
@@ -1,5 +1,4 @@
const Endless = imports.gi.Endless;
-imports.searchPath.unshift(Endless.getCurrentFileDir());
// Pull modules into this namespace, sort of like __init__.py and __all__
this.WikipediaApplication = imports.wikipedia.WikipediaApplication.WikipediaApplication;
@@ -8,6 +7,7 @@ this.PrebuiltFrontPage = imports.wikipedia.PrebuiltFrontPage.PrebuiltFrontPage;
this.PrebuiltCategoryPage = imports.wikipedia.PrebuiltCategoryPage.PrebuiltCategoryPage;
this.PrebuiltArticlesPage = imports.wikipedia.PrebuiltArticlesPage.PrebuiltArticlesPage;
this.ArticleList = imports.wikipedia.ArticleList.ArticleList;
+this.WikipediaWebView = imports.wikipedia.WikipediaWebView.WikipediaWebView;
const STYLE_CLASS_TITLE = 'title';
const STYLE_CLASS_PREBUILT = 'prebuilt';
diff --git a/wikipedia/Makefile.am.inc b/wikipedia/Makefile.am.inc
index 038082a..572788b 100644
--- a/wikipedia/Makefile.am.inc
+++ b/wikipedia/Makefile.am.inc
@@ -22,17 +22,17 @@ EXTRA_DIST += wikipedia/config.js.in
js_sources = \
wikipedia/ArticleList.js \
- wikipedia/BackButton.js \
- wikipedia/BoxWithBg.js \
+ wikipedia/widgets/BackButton.js \
+ wikipedia/widgets/BoxWithBg.js \
wikipedia/EndlessWikipedia.js \
wikipedia/PrebuiltArticlesPage.js \
wikipedia/PrebuiltCategoryPage.js \
wikipedia/PrebuiltFrontPage.js \
wikipedia/PrebuiltWikipediaApplication.js \
- wikipedia/SideBarButton.js \
- wikipedia/TextButton.js \
+ wikipedia/widgets/SideBarButton.js \
+ wikipedia/widgets/TextButton.js \
wikipedia/config.js \
- wikipedia/scaled_image.js \
+ wikipedia/widgets/scaled_image.js \
wikipedia/utils.js \
wikipedia/WikipediaApplication.js \
wikipedia/models/article_model.js \
@@ -41,12 +41,12 @@ js_sources = \
wikipedia/models/utils/json_utils.js \
wikipedia/models/utils/locale_utils.js \
wikipedia/presenters/domain_wiki_presenter.js \
- wikipedia/views/category_button.js \
- wikipedia/views/category_layout_manager.js \
- wikipedia/views/category_selector_view.js \
+ wikipedia/widgets/category_button.js \
+ wikipedia/widgets/category_layout_manager.js \
+ wikipedia/widgets/category_selector_view.js \
wikipedia/views/domain_wiki_view.js \
- wikipedia/views/title_label_view.js \
- wikipedia/views/wikipedia_view.js \
+ wikipedia/widgets/title_label_view.js \
+ wikipedia/WikipediaWebView.js \
$(NULL)
parafernalia_sources = \
diff --git a/wikipedia/PrebuiltArticlesPage.js b/wikipedia/PrebuiltArticlesPage.js
index 933e3b4..59935ac 100644
--- a/wikipedia/PrebuiltArticlesPage.js
+++ b/wikipedia/PrebuiltArticlesPage.js
@@ -3,7 +3,6 @@ const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
const EndlessWikipedia = imports.wikipedia.EndlessWikipedia;
-const WikipediaView = imports.views.wikipedia_view;
GObject.ParamFlags.READWRITE = GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE;
@@ -27,8 +26,8 @@ const PrebuiltArticlesPage = new Lang.Class({
this._article_title = null;
this._article_uri = null;
- this._wiki_view = new WikipediaView.WikipediaView({
- expand:true,
+ this._wiki_view = new EndlessWikipedia.WikipediaWebView({
+ expand:true
});
this.parent(props);
diff --git a/wikipedia/PrebuiltCategoryPage.js b/wikipedia/PrebuiltCategoryPage.js
index 5ee3e23..85484b9 100644
--- a/wikipedia/PrebuiltCategoryPage.js
+++ b/wikipedia/PrebuiltCategoryPage.js
@@ -4,8 +4,8 @@ const GdkPixbuf = imports.gi.GdkPixbuf;
const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
-const BoxWithBg = imports.BoxWithBg;
-const ScaledImage = imports.scaled_image;
+const BoxWithBg = imports.wikipedia.widgets.BoxWithBg;
+const ScaledImage = imports.wikipedia.widgets.scaled_image;
const CATEGORY_DESCRIPTION_WIDTH = 520;
const SUBMENU_SEPARATOR_A_URI = "/com/endlessm/wikipedia-domain/assets/submenu_separator_shadow_a.png";
diff --git a/wikipedia/PrebuiltFrontPage.js b/wikipedia/PrebuiltFrontPage.js
index 352220d..5da89f0 100644
--- a/wikipedia/PrebuiltFrontPage.js
+++ b/wikipedia/PrebuiltFrontPage.js
@@ -3,8 +3,8 @@ const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
const EndlessWikipedia = imports.wikipedia.EndlessWikipedia;
-const CategorySelectorView = imports.views.category_selector_view;
-const TitleLabelView = imports.views.title_label_view;
+const CategorySelectorView = imports.wikipedia.widgets.category_selector_view;
+const TitleLabelView = imports.wikipedia.widgets.title_label_view;
const TITLE_CATEGORY_COLUMN_SPACING = 10; // pixels
diff --git a/wikipedia/PrebuiltWikipediaApplication.js b/wikipedia/PrebuiltWikipediaApplication.js
index 9747330..d6e2e5b 100644
--- a/wikipedia/PrebuiltWikipediaApplication.js
+++ b/wikipedia/PrebuiltWikipediaApplication.js
@@ -4,9 +4,9 @@ const Lang = imports.lang;
const Gtk = imports.gi.Gtk;
const EndlessWikipedia = imports.wikipedia.EndlessWikipedia;
-const DomainWikiView = imports.views.domain_wiki_view;
-const DomainWikiModel = imports.models.domain_wiki_model;
-const DomainWikiPresenter = imports.presenters.domain_wiki_presenter;
+const DomainWikiView = imports.wikipedia.views.domain_wiki_view;
+const DomainWikiModel = imports.wikipedia.models.domain_wiki_model;
+const DomainWikiPresenter = imports.wikipedia.presenters.domain_wiki_presenter;
String.prototype.format = Format.format;
diff --git a/wikipedia/WikipediaApplication.js b/wikipedia/WikipediaApplication.js
index a72b03b..152f770 100644
--- a/wikipedia/WikipediaApplication.js
+++ b/wikipedia/WikipediaApplication.js
@@ -5,8 +5,8 @@ const Lang = imports.lang;
const GObject = imports.gi.GObject;
const Gio = imports.gi.Gio;
-const Config = imports.config;
-const DomainWikiModel = imports.models.domain_wiki_model;
+const Config = imports.wikipedia.config;
+const DomainWikiModel = imports.wikipedia.models.domain_wiki_model;
GObject.ParamFlags.READWRITE = GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE;
diff --git a/wikipedia/views/wikipedia_view.js b/wikipedia/WikipediaWebView.js
index bcd6270..c820c8f 100644
--- a/wikipedia/views/wikipedia_view.js
+++ b/wikipedia/WikipediaWebView.js
@@ -3,7 +3,7 @@ const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
const Soup = imports.gi.Soup;
const WebKit = imports.gi.WebKit2;
-const Utils = imports.utils;
+const Utils = imports.wikipedia.utils;
const getPageURL = "http://127.0.0.1:3000/getDomainSpecificArticle?title=";
@@ -18,8 +18,8 @@ WebKit.WebContext.get_default().register_uri_scheme('image', function(request) {
request.finish(stream, -1, 'image/png');
});
-const WikipediaView = new Lang.Class({
- Name: 'EndlessWikipediaView',
+const WikipediaWebView = new Lang.Class({
+ Name: 'EndlessWikipediaWebView',
Extends: WebKit.WebView,
_init: function(params) {
diff --git a/wikipedia/models/category_model.js b/wikipedia/models/category_model.js
index ea9bfb6..1c981bc 100644
--- a/wikipedia/models/category_model.js
+++ b/wikipedia/models/category_model.js
@@ -3,7 +3,7 @@ const GObject = imports.gi.GObject;
const Lang = imports.lang;
// Local libraries
-const ArticleModel = imports.models.article_model;
+const ArticleModel = imports.wikipedia.models.article_model;
const CategoryModel = new Lang.Class({
Name: "CategoryModel",
diff --git a/wikipedia/models/domain_wiki_model.js b/wikipedia/models/domain_wiki_model.js
index c838361..87941ba 100644
--- a/wikipedia/models/domain_wiki_model.js
+++ b/wikipedia/models/domain_wiki_model.js
@@ -5,8 +5,8 @@ const GObject = imports.gi.GObject;
const Lang = imports.lang;
// Local libraries
-const CategoryModel = imports.models.category_model;
-const Utils = imports.utils;
+const CategoryModel = imports.wikipedia.models.category_model;
+const Utils = imports.wikipedia.utils;
const DomainWikiModel = new Lang.Class({
diff --git a/wikipedia/presenters/domain_wiki_presenter.js b/wikipedia/presenters/domain_wiki_presenter.js
index bdc8d0f..15229ce 100644
--- a/wikipedia/presenters/domain_wiki_presenter.js
+++ b/wikipedia/presenters/domain_wiki_presenter.js
@@ -2,10 +2,10 @@ const Lang = imports.lang;
const GObject = imports.gi.GObject;
//Local Libraries
-const Utils = imports.utils;
+const Utils = imports.wikipedia.utils;
-const CategoryModel = imports.models.category_model;
-const ArticleModel = imports.models.article_model;
+const CategoryModel = imports.wikipedia.models.category_model;
+const ArticleModel = imports.wikipedia.models.article_model;
function _resourceUriToPath(uri) {
diff --git a/wikipedia/views/domain_wiki_view.js b/wikipedia/views/domain_wiki_view.js
index 448f2d5..9dd8358 100644
--- a/wikipedia/views/domain_wiki_view.js
+++ b/wikipedia/views/domain_wiki_view.js
@@ -6,9 +6,9 @@ const GObject = imports.gi.GObject;
const Gtk = imports.gi.Gtk;
const Endless = imports.gi.Endless;
-const Config = imports.config;
-const BackButton = imports.BackButton;
-const SideBarButton = imports.SideBarButton;
+const Config = imports.wikipedia.config;
+const BackButton = imports.wikipedia.widgets.BackButton;
+const SideBarButton = imports.wikipedia.widgets.SideBarButton;
const _ = function(string) { return GLib.dgettext('eos-sdk', string); };
Gettext.bindtextdomain('eos-sdk', Config.DATADIR + '/locale');
diff --git a/wikipedia/BackButton.js b/wikipedia/widgets/BackButton.js
index cfb3155..cfb3155 100644
--- a/wikipedia/BackButton.js
+++ b/wikipedia/widgets/BackButton.js
diff --git a/wikipedia/BoxWithBg.js b/wikipedia/widgets/BoxWithBg.js
index 1ae9404..1ae9404 100644
--- a/wikipedia/BoxWithBg.js
+++ b/wikipedia/widgets/BoxWithBg.js
diff --git a/wikipedia/SideBarButton.js b/wikipedia/widgets/SideBarButton.js
index b602d6c..b602d6c 100644
--- a/wikipedia/SideBarButton.js
+++ b/wikipedia/widgets/SideBarButton.js
diff --git a/wikipedia/TextButton.js b/wikipedia/widgets/TextButton.js
index 834826f..834826f 100644
--- a/wikipedia/TextButton.js
+++ b/wikipedia/widgets/TextButton.js
diff --git a/wikipedia/views/category_button.js b/wikipedia/widgets/category_button.js
index 7fde6a1..77812f1 100644
--- a/wikipedia/views/category_button.js
+++ b/wikipedia/widgets/category_button.js
@@ -4,7 +4,7 @@ const GObject = imports.gi.GObject;
const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
-const Utils = imports.utils;
+const Utils = imports.wikipedia.utils;
const CATEGORY_LABEL_LEFT_MARGIN = 25; // pixels
const CATEGORY_LABEL_BOTTOM_MARGIN = 20; // pixels
diff --git a/wikipedia/views/category_layout_manager.js b/wikipedia/widgets/category_layout_manager.js
index a7be3bb..a7be3bb 100644
--- a/wikipedia/views/category_layout_manager.js
+++ b/wikipedia/widgets/category_layout_manager.js
diff --git a/wikipedia/views/category_selector_view.js b/wikipedia/widgets/category_selector_view.js
index 5432a3e..776bf52 100644
--- a/wikipedia/views/category_selector_view.js
+++ b/wikipedia/widgets/category_selector_view.js
@@ -2,8 +2,8 @@ const GObject = imports.gi.GObject;
const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
-const CategoryButton = imports.views.category_button;
-const CategoryLayoutManager = imports.views.category_layout_manager;
+const CategoryButton = imports.wikipedia.widgets.category_button;
+const CategoryLayoutManager = imports.wikipedia.widgets.category_layout_manager;
const CATEGORY_COLUMN_SPACING = 10; // pixels
const CATEGORY_ROW_SPACING = 10; // pixels
diff --git a/wikipedia/scaled_image.js b/wikipedia/widgets/scaled_image.js
index 9808914..9808914 100644
--- a/wikipedia/scaled_image.js
+++ b/wikipedia/widgets/scaled_image.js
diff --git a/wikipedia/views/title_label_view.js b/wikipedia/widgets/title_label_view.js
index 479747d..f3f599e 100644
--- a/wikipedia/views/title_label_view.js
+++ b/wikipedia/widgets/title_label_view.js
@@ -3,7 +3,7 @@ const GObject = imports.gi.GObject;
const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
-const Utils = imports.utils;
+const Utils = imports.wikipedia.utils;
const TITLE_LABEL_SCREEN_WIDTH_PERCENTAGE = 0.37;
const TITLE_LABEL_LEFT_MARGIN = 20; // pixels