summaryrefslogtreecommitdiff
path: root/wikipedia
diff options
context:
space:
mode:
authorPhilip Chimento <philip@endlessm.com>2013-08-02 17:37:45 -0700
committerPhilip Chimento <philip@endlessm.com>2013-08-02 17:42:45 -0700
commit9044b1501112f14bec4f5a158d370860f063f73a (patch)
tree2ee411ffd7eec0f25a71913d5722929799ff7e7e /wikipedia
parent059dbcb85c7549b231f861e0b3c3c41a3e8b4c16 (diff)
Last modifications to remove Brazil-specific content
[endlessm/eos-sdk#206]
Diffstat (limited to 'wikipedia')
-rw-r--r--wikipedia/PrebuiltCategoryPage.js10
-rw-r--r--wikipedia/generate_resource_file.py21
-rw-r--r--wikipedia/presenters/domain_wiki_presenter.js4
-rw-r--r--wikipedia/views/domain_wiki_view.js4
4 files changed, 9 insertions, 30 deletions
diff --git a/wikipedia/PrebuiltCategoryPage.js b/wikipedia/PrebuiltCategoryPage.js
index a6b276d..05240b6 100644
--- a/wikipedia/PrebuiltCategoryPage.js
+++ b/wikipedia/PrebuiltCategoryPage.js
@@ -7,6 +7,10 @@ const Lang = imports.lang;
const BoxWithBg = imports.BoxWithBg;
const ScaledImage = imports.scaled_image;
+const SUBMENU_SEPARATOR_A_URI = "/com/endlessm/wikipedia-domain/assets/submenu_separator_shadow_a.png";
+const SPLASH_SEPARATOR_URI = "/com/endlessm/wikipedia-domain/assets/category_splash_separator_shadow.png";
+const INTRO_TITLE_SEPARATOR_URI = "/com/endlessm/wikipedia-domain/assets/introduction_title_separator.png";
+
GObject.ParamFlags.READWRITE = GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE;
function _resourceUriToPath(uri) {
@@ -73,19 +77,19 @@ const PrebuiltCategoryPage = new Lang.Class({
});
this._submenu_separator = new ScaledImage.ScaledImage({
- resource: "/com/endlessm/brazil/assets/submenu_separator_shadow_a.png",
+ resource: SUBMENU_SEPARATOR_A_URI,
constraint: Gtk.Orientation.VERTICAL,
halign: Gtk.Align.END
});
this._splash_separator = new ScaledImage.ScaledImage({
- resource: "/com/endlessm/brazil/assets/category_splash_separator_shadow.png",
+ resource: SPLASH_SEPARATOR_URI,
constraint: Gtk.Orientation.VERTICAL,
halign: Gtk.Align.END
});
this._description_separator = new ScaledImage.ScaledImage({
- resource: "/com/endlessm/brazil/assets/introduction_title_separator.png",
+ resource: INTRO_TITLE_SEPARATOR_URI,
constraint: Gtk.Orientation.HORIZONTAL
});
diff --git a/wikipedia/generate_resource_file.py b/wikipedia/generate_resource_file.py
deleted file mode 100644
index a0ca003..0000000
--- a/wikipedia/generate_resource_file.py
+++ /dev/null
@@ -1,21 +0,0 @@
-import json
-import xml.etree.ElementTree as ET
-
-path = "../data/app_info"
-filename = os.listdir(path)[0]
-handle = open(filename, 'r')
-app_info = json.loads(handle.read())
-categories = app_info['categories']
-app_image_name = "app_image/" + app_info['app_image']
-
-tree = ET.parse('..data/endless_brazil.gresource.xml')
-root = tree.getroot()
-filenode = root.find('gresource')
-
-for category in categories:
- image_file = category['image_file']
- new_file_name = "category_images/" + image_file
- elem = ET.Element('file')
- elem.text = new_file_name
- filenode.append(elem)
-ET.dump(root) \ No newline at end of file
diff --git a/wikipedia/presenters/domain_wiki_presenter.js b/wikipedia/presenters/domain_wiki_presenter.js
index 9bdb7f8..bdc8d0f 100644
--- a/wikipedia/presenters/domain_wiki_presenter.js
+++ b/wikipedia/presenters/domain_wiki_presenter.js
@@ -48,10 +48,6 @@ const DomainWikiPresenter = new Lang.Class({
let app_content = JSON.parse(Utils.load_file_from_resource(filename));
this._application_name = app_content['app_name'];
this._image_uri = app_content['app_image_uri'];
- // HACK until we get app image
- if(this._image_uri === undefined || this._image_uri === ""){
- this._image_uri = "resource:///com/endlessm/brazil/category_images/bg_brazil_sports.jpg"
- }
this._lang_code = filename.substring(0, 2);
let categories = app_content['categories'];
let cat_length = categories.length
diff --git a/wikipedia/views/domain_wiki_view.js b/wikipedia/views/domain_wiki_view.js
index 9955789..84af542 100644
--- a/wikipedia/views/domain_wiki_view.js
+++ b/wikipedia/views/domain_wiki_view.js
@@ -11,8 +11,8 @@ const SideBarButton = imports.SideBarButton;
const _ = Gettext.gettext;
const SIDEBAR_BACK_BUTTON_URI = "/com/endlessm/wikipedia-domain/assets/image_strip_back_button.png";
-const SUBMENU_SEPARATOR_A_URI = "/com/endlessm/brazil/assets/submenu_separator_shadow_a.png";
-const SUBMENU_SEPARATOR_B_URI = "/com/endlessm/brazil/assets/submenu_separator_shadow_b.png";
+const SUBMENU_SEPARATOR_A_URI = "/com/endlessm/wikipedia-domain/assets/submenu_separator_shadow_a.png";
+const SUBMENU_SEPARATOR_B_URI = "/com/endlessm/wikipedia-domain/assets/submenu_separator_shadow_b.png";
const DomainWikiView = new Lang.Class({
Name: "DomainWikiView",