[gnome-music/wip/mschraal/window-template: 6/6] window: Use property syntax for GtkStack switching
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/window-template: 6/6] window: Use property syntax for GtkStack switching
- Date: Mon, 18 May 2020 15:22:44 +0000 (UTC)
commit 830f30f332aab60506c3ccdd9df530987e9168cf
Author: Marinus Schraal <mschraal gnome org>
Date: Mon May 18 13:31:21 2020 +0200
window: Use property syntax for GtkStack switching
gnomemusic/window.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index 726b75fa..f736f81b 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -199,9 +199,9 @@ class Window(Gtk.ApplicationWindow):
def _on_search_mode_changed(self, search, value):
if self._search.props.search_mode_active:
- self._headerbar_stack.set_visible_child_name("search")
+ self._headerbar_stack.props.visible_child_name = "search"
else:
- self._headerbar_stack.set_visible_child_name("main")
+ self._headerbar_stack.props.visible_child_name = "main"
def _on_songs_available(self, klass, value):
if self._app.props.coremodel.props.songs_available:
@@ -254,7 +254,7 @@ class Window(Gtk.ApplicationWindow):
else:
self._stack.add_named(i, i.name)
- self._stack.set_visible_child(self.views[View.ALBUM])
+ self._stack.props.visible_child = self.views[View.ALBUM]
self.views[View.SEARCH].bind_property(
"search-state", self._search, "state",
@@ -426,7 +426,7 @@ class Window(Gtk.ApplicationWindow):
return
# Get back to the view before the search
- self._stack.set_visible_child(self._view_before_search)
+ self._stack.props.visible_child = self._view_before_search
def _switch_back_from_childview(self, klass=None):
if self.props.selection_mode:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]