summaryrefslogtreecommitdiff
path: root/wikipedia
diff options
context:
space:
mode:
authorRory MacQueen <rorymacqueen@gmail.com>2013-08-01 20:22:12 -0700
committerRory MacQueen <rorymacqueen@gmail.com>2013-08-02 15:33:10 -0700
commit41e91b9dce5718465d4152ce94cde41d01892641 (patch)
treedbcfb0e9736918dda0e4cf7972c18a377dd846e2 /wikipedia
parentfd6186ce97837863a9200084cc38f2dcd0722402 (diff)
Added Brazil content
[endlessm/eos-sdk#186]
Diffstat (limited to 'wikipedia')
-rw-r--r--wikipedia/data/category_images/156356538.jpgbin0 -> 398570 bytes
-rw-r--r--wikipedia/data/category_images/2013-03-16 02.33.23.jpgbin0 -> 613060 bytes
-rw-r--r--wikipedia/data/category_images/8fev2013---desfile-da-escola-rosas-de-ouro-no-sambodromo-do-anhembi-em-sao-paulo-1360409445571_1920x1080.jpgbin0 -> 716942 bytes
-rw-r--r--wikipedia/data/category_images/Antique_Map_Janssonius_South_America.jpgbin0 -> 128225 bytes
-rw-r--r--wikipedia/data/category_images/Oscar_Pereira_da_Silva_-_Desembarque_de_Pedro_Álvares_Cabral_em_Porto_Seguro_em_1500.jpgbin0 -> 358855 bytes
-rw-r--r--wikipedia/data/category_images/Tarsila_do_Amaral_04.jpgbin0 -> 337274 bytes
-rw-r--r--wikipedia/data/category_images/camisa-Uniforme-de-futebol-da-seleção-brasileira2.jpgbin0 -> 644796 bytes
-rw-r--r--wikipedia/data/category_images/musica.jpgbin0 -> 396554 bytes
-rw-r--r--wikipedia/data/category_images/red_parrot_close_up-Animal_photography_Wallpaper_1440x900.jpgbin0 -> 392330 bytes
-rw-r--r--wikipedia/data/category_images/rio_de_janeiro_by_night_2738x1825.jpgbin0 -> 751245 bytes
-rw-r--r--wikipedia/data/endless_brazil.gresource.xml8
-rw-r--r--wikipedia/data/pt-br-brazil-app.json (renamed from wikipedia/data/brazil_categories.json)0
-rw-r--r--wikipedia/src/endless_brazil.js2
-rw-r--r--wikipedia/src/endless_wikipedia/PrebuiltCategoryPage.js1
-rw-r--r--wikipedia/src/presenters/domain_wiki_presenter.js7
-rw-r--r--wikipedia/src/views/title_label_view.js6
16 files changed, 20 insertions, 4 deletions
diff --git a/wikipedia/data/category_images/156356538.jpg b/wikipedia/data/category_images/156356538.jpg
new file mode 100644
index 0000000..85ce7b6
--- /dev/null
+++ b/wikipedia/data/category_images/156356538.jpg
Binary files differ
diff --git a/wikipedia/data/category_images/2013-03-16 02.33.23.jpg b/wikipedia/data/category_images/2013-03-16 02.33.23.jpg
new file mode 100644
index 0000000..09532b1
--- /dev/null
+++ b/wikipedia/data/category_images/2013-03-16 02.33.23.jpg
Binary files differ
diff --git a/wikipedia/data/category_images/8fev2013---desfile-da-escola-rosas-de-ouro-no-sambodromo-do-anhembi-em-sao-paulo-1360409445571_1920x1080.jpg b/wikipedia/data/category_images/8fev2013---desfile-da-escola-rosas-de-ouro-no-sambodromo-do-anhembi-em-sao-paulo-1360409445571_1920x1080.jpg
new file mode 100644
index 0000000..de7bdb8
--- /dev/null
+++ b/wikipedia/data/category_images/8fev2013---desfile-da-escola-rosas-de-ouro-no-sambodromo-do-anhembi-em-sao-paulo-1360409445571_1920x1080.jpg
Binary files differ
diff --git a/wikipedia/data/category_images/Antique_Map_Janssonius_South_America.jpg b/wikipedia/data/category_images/Antique_Map_Janssonius_South_America.jpg
new file mode 100644
index 0000000..f327e44
--- /dev/null
+++ b/wikipedia/data/category_images/Antique_Map_Janssonius_South_America.jpg
Binary files differ
diff --git a/wikipedia/data/category_images/Oscar_Pereira_da_Silva_-_Desembarque_de_Pedro_Álvares_Cabral_em_Porto_Seguro_em_1500.jpg b/wikipedia/data/category_images/Oscar_Pereira_da_Silva_-_Desembarque_de_Pedro_Álvares_Cabral_em_Porto_Seguro_em_1500.jpg
new file mode 100644
index 0000000..73015f2
--- /dev/null
+++ b/wikipedia/data/category_images/Oscar_Pereira_da_Silva_-_Desembarque_de_Pedro_Álvares_Cabral_em_Porto_Seguro_em_1500.jpg
Binary files differ
diff --git a/wikipedia/data/category_images/Tarsila_do_Amaral_04.jpg b/wikipedia/data/category_images/Tarsila_do_Amaral_04.jpg
new file mode 100644
index 0000000..831830c
--- /dev/null
+++ b/wikipedia/data/category_images/Tarsila_do_Amaral_04.jpg
Binary files differ
diff --git a/wikipedia/data/category_images/camisa-Uniforme-de-futebol-da-seleção-brasileira2.jpg b/wikipedia/data/category_images/camisa-Uniforme-de-futebol-da-seleção-brasileira2.jpg
new file mode 100644
index 0000000..de0104e
--- /dev/null
+++ b/wikipedia/data/category_images/camisa-Uniforme-de-futebol-da-seleção-brasileira2.jpg
Binary files differ
diff --git a/wikipedia/data/category_images/musica.jpg b/wikipedia/data/category_images/musica.jpg
new file mode 100644
index 0000000..077c12d
--- /dev/null
+++ b/wikipedia/data/category_images/musica.jpg
Binary files differ
diff --git a/wikipedia/data/category_images/red_parrot_close_up-Animal_photography_Wallpaper_1440x900.jpg b/wikipedia/data/category_images/red_parrot_close_up-Animal_photography_Wallpaper_1440x900.jpg
new file mode 100644
index 0000000..5e1f153
--- /dev/null
+++ b/wikipedia/data/category_images/red_parrot_close_up-Animal_photography_Wallpaper_1440x900.jpg
Binary files differ
diff --git a/wikipedia/data/category_images/rio_de_janeiro_by_night_2738x1825.jpg b/wikipedia/data/category_images/rio_de_janeiro_by_night_2738x1825.jpg
new file mode 100644
index 0000000..a37a107
--- /dev/null
+++ b/wikipedia/data/category_images/rio_de_janeiro_by_night_2738x1825.jpg
Binary files differ
diff --git a/wikipedia/data/endless_brazil.gresource.xml b/wikipedia/data/endless_brazil.gresource.xml
index bbbf39c..a3b1137 100644
--- a/wikipedia/data/endless_brazil.gresource.xml
+++ b/wikipedia/data/endless_brazil.gresource.xml
@@ -7,6 +7,14 @@
<file>category_images/cuisine.jpg</file>
<file>category_images/history.jpg</file>
<file>category_images/bg_brazil_sports.jpg</file>
+ <file>category_images/rio_de_janeiro_by_night_2738x1825.jpg</file>
+ <file>category_images/156356538.jpg</file>
+ <file>category_images/Tarsila_do_Amaral_04.jpg</file>
+ <file>category_images/8fev2013---desfile-da-escola-rosas-de-ouro-no-sambodromo-do-anhembi-em-sao-paulo-1360409445571_1920x1080.jpg</file>
+ <file>category_images/camisa-Uniforme-de-futebol-da-seleção-brasileira2.jpg</file>
+ <file>category_images/Oscar_Pereira_da_Silva_-_Desembarque_de_Pedro_Álvares_Cabral_em_Porto_Seguro_em_1500.jpg</file>
+ <file>category_images/red_parrot_close_up-Animal_photography_Wallpaper_1440x900.jpg</file>
+ <file>category_images/musica.jpg</file>
<file>assets/introduction_title_separator.png</file>
<file>assets/submenu_bg_hover.png</file>
<file>assets/submenu_bg_pressed.png</file>
diff --git a/wikipedia/data/brazil_categories.json b/wikipedia/data/pt-br-brazil-app.json
index 8808872..8808872 100644
--- a/wikipedia/data/brazil_categories.json
+++ b/wikipedia/data/pt-br-brazil-app.json
diff --git a/wikipedia/src/endless_brazil.js b/wikipedia/src/endless_brazil.js
index 8e73b82..75bef28 100644
--- a/wikipedia/src/endless_brazil.js
+++ b/wikipedia/src/endless_brazil.js
@@ -12,6 +12,6 @@ let resource = Gio.Resource.load(Endless.getCurrentFileDir() + '/../data/endless
resource._register();
let app = new EndlessWikipedia.PrebuiltWikipediaApplication({
- application_uri: 'resource:///com/endlessm/brazil/brazil_categories.json'
+ application_uri: 'resource:///com/endlessm/brazil/pt-br-brazil-app.json'
});
app.run(ARGV);
diff --git a/wikipedia/src/endless_wikipedia/PrebuiltCategoryPage.js b/wikipedia/src/endless_wikipedia/PrebuiltCategoryPage.js
index 5d51ab4..a6fa53e 100644
--- a/wikipedia/src/endless_wikipedia/PrebuiltCategoryPage.js
+++ b/wikipedia/src/endless_wikipedia/PrebuiltCategoryPage.js
@@ -104,6 +104,7 @@ const PrebuiltCategoryPage = new Lang.Class({
});
this._description_scrolled_window.add(this._description_text_view);
+ this._description_scrolled_window.set_policy(Gtk.PolicyType.ALWAYS, Gtk.PolicyType.ALWAYS);
this.parent(props);
diff --git a/wikipedia/src/presenters/domain_wiki_presenter.js b/wikipedia/src/presenters/domain_wiki_presenter.js
index 25c7e55..43beaa5 100644
--- a/wikipedia/src/presenters/domain_wiki_presenter.js
+++ b/wikipedia/src/presenters/domain_wiki_presenter.js
@@ -48,6 +48,10 @@ 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['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
@@ -64,7 +68,8 @@ const DomainWikiPresenter = new Lang.Class({
},
initCategory: function(category){
- let params = {description:category['content_text'], image_uri:category['image_uri'], title:category['category_name']};
+ let image_uri = category['image_file'];
+ let params = {description:category['content_text'], image_uri:image_uri, title:category['category_name']};
return new CategoryModel.CategoryModel(params);
},
diff --git a/wikipedia/src/views/title_label_view.js b/wikipedia/src/views/title_label_view.js
index 336492c..e91e671 100644
--- a/wikipedia/src/views/title_label_view.js
+++ b/wikipedia/src/views/title_label_view.js
@@ -55,8 +55,10 @@ const TitleLabelView = new Lang.Class({
vfunc_size_allocate: function(allocation) {
this.parent(allocation);
- this._updateImage(Utils.resourceUriToPath(this._image_uri),
- allocation.width, allocation.height);
+ if(this._image_uri !== "" && this._image_uri != null) {
+ this._updateImage(Utils.resourceUriToPath(this._image_uri),
+ allocation.width, allocation.height);
+ }
},
// PROPERTIES