summaryrefslogtreecommitdiff
path: root/wikipedia
diff options
context:
space:
mode:
authorMatt Watson <mattdangerw@gmail.com>2014-05-12 16:35:18 -0700
committerMatt Watson <mattdangerw@gmail.com>2014-05-13 12:50:02 -0700
commit396bfe04660e17d02c147488edd0c752682afecf (patch)
treef3ca112de3b227468b85ecb6cb9fbb3dafff650f /wikipedia
parent7a2edd48f30f1f0bd1496c69c58ca9ac0e791d49 (diff)
EosPageManager uses GtkStack properties directly
Use the visible-child and visible-child-name properties of GtkStack in lieu of visible-page and visible-page-name. Use the transition-duration, transition-type and name properties of GtkStack instead of proxying in page manager with properties of that same name. The page manger becomes nothing more than a stack with custom child properties for use in EosWindow, and becomes a lot simpler. This breaks the page manager api and will require changes in the apps as well [endlessm/eos-sdk#985]
Diffstat (limited to 'wikipedia')
-rw-r--r--wikipedia/views/domain_wiki_view.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/wikipedia/views/domain_wiki_view.js b/wikipedia/views/domain_wiki_view.js
index a2f7419..06a936d 100644
--- a/wikipedia/views/domain_wiki_view.js
+++ b/wikipedia/views/domain_wiki_view.js
@@ -196,10 +196,10 @@ const DomainWikiView = new Lang.Class({
* Transition to the front page of the view
*/
show_front_page: function () {
- if (this._window.page_manager.visible_page_name === "front")
+ if (this._window.page_manager.visible_child_name === "front")
return;
- this._window.page_manager.transition_type = Endless.PageManagerTransitionType.SLIDE_RIGHT;
- this._window.page_manager.visible_page_name = "front";
+ this._window.page_manager.transition_type = Gtk.StackTransitionType.SLIDE_RIGHT;
+ this._window.page_manager.visible_child_name = "front";
},
/**
@@ -207,14 +207,14 @@ const DomainWikiView = new Lang.Class({
* Transition to the category page of the view
*/
show_category_page: function () {
- if (this._window.page_manager.visible_page_name === "category")
+ if (this._window.page_manager.visible_child_name === "category")
return;
this._category_article_list.scrollToTop();
- if (this._window.page_manager.visible_page_name === "front")
- this._window.page_manager.transition_type = Endless.PageManagerTransitionType.SLIDE_LEFT;
+ if (this._window.page_manager.visible_child_name === "front")
+ this._window.page_manager.transition_type = Gtk.StackTransitionType.SLIDE_LEFT;
else
- this._window.page_manager.transition_type = Endless.PageManagerTransitionType.SLIDE_RIGHT;
- this._window.page_manager.visible_page_name = "category";
+ this._window.page_manager.transition_type = Gtk.StackTransitionType.SLIDE_RIGHT;
+ this._window.page_manager.visible_child_name = "category";
},
/**
@@ -222,11 +222,11 @@ const DomainWikiView = new Lang.Class({
* Transition to the article page of the view
*/
show_article_page: function () {
- if (this._window.page_manager.visible_page_name === "article")
+ if (this._window.page_manager.visible_child_name === "article")
return;
this._article_list.scrollToTop();
- this._window.page_manager.transition_type = Endless.PageManagerTransitionType.SLIDE_LEFT;
- this._window.page_manager.visible_page_name = "article";
+ this._window.page_manager.transition_type = Gtk.StackTransitionType.SLIDE_LEFT;
+ this._window.page_manager.visible_child_name = "article";
},
set_categories: function(categories){