From 396bfe04660e17d02c147488edd0c752682afecf Mon Sep 17 00:00:00 2001 From: Matt Watson Date: Mon, 12 May 2014 16:35:18 -0700 Subject: 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] --- wikipedia/views/domain_wiki_view.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'wikipedia') 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){ -- cgit v1.2.3