[gnome-music/wip/mschraal/slidebar-removal: 11/12] Remove slidebar machinery
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/slidebar-removal: 11/12] Remove slidebar machinery
- Date: Wed, 12 Sep 2018 11:55:15 +0000 (UTC)
commit 0abfb2295baa416862e69032562cb398622cdeec
Author: Marinus Schraal <mschraal gnome org>
Date: Fri Aug 31 14:13:00 2018 +0200
Remove slidebar machinery
In 3db2000c9c the slidebar effect was removed, remove the unneeded
surrounding machinery as well.
gnomemusic/views/baseview.py | 16 ++++------------
gnomemusic/views/playlistview.py | 5 ++---
gnomemusic/window.py | 5 -----
3 files changed, 6 insertions(+), 20 deletions(-)
---
diff --git a/gnomemusic/views/baseview.py b/gnomemusic/views/baseview.py
index 8559136a..3d1c3818 100644
--- a/gnomemusic/views/baseview.py
+++ b/gnomemusic/views/baseview.py
@@ -72,18 +72,10 @@ class BaseView(Gtk.Stack):
# Setup the main view
self._setup_view()
- if use_sidebar:
- self.stack = Gtk.Stack()
- dummy = Gtk.Frame(visible=False)
- self.stack.add_named(dummy, 'dummy')
- if sidebar:
- self.stack.add_named(sidebar, 'sidebar')
- else:
- self.stack.add_named(self._box, 'sidebar')
- self.stack.set_visible_child_name('dummy')
- self._grid.add(self.stack)
- if not use_sidebar or sidebar:
- self._grid.add(self._box)
+ if sidebar:
+ self._grid.add(sidebar)
+
+ self._grid.add(self._box)
self._star_handler = StarHandlerWidget(self, 9)
self._window = window
diff --git a/gnomemusic/views/playlistview.py b/gnomemusic/views/playlistview.py
index e285431f..3f4244c9 100644
--- a/gnomemusic/views/playlistview.py
+++ b/gnomemusic/views/playlistview.py
@@ -115,9 +115,8 @@ class PlaylistView(BaseView):
self._sidebar.set_selection_mode(Gtk.SelectionMode.SINGLE)
self._sidebar.connect('row-activated', self._on_playlist_activated)
- self._grid.insert_column(0)
- self._grid.child_set_property(self.stack, 'top-attach', 0)
- self._grid.child_set_property(self.stack, 'height', 2)
+ self._grid.child_set_property(sidebar_container, 'top-attach', 0)
+ self._grid.child_set_property(sidebar_container, 'height', 2)
self._iter_to_clean = None
self._iter_to_clean_model = None
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index c1440d91..28765ade 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -412,11 +412,6 @@ class Window(Gtk.ApplicationWindow):
or self.prev_view == self.views[View.EMPTY])):
self.curr_view.set_visible_child(self.curr_view._grid)
- # Slide out sidebar on switching to Artists or Playlists view
- if self.curr_view == self.views[View.ARTIST] or \
- self.curr_view == self.views[View.PLAYLIST]:
- self.curr_view.stack.set_visible_child_name('dummy')
- self.curr_view.stack.set_visible_child_name('sidebar')
if (self.curr_view != self.views[View.SEARCH]
and self.curr_view != self.views[View.EMPTY]):
self.headerbar.searchbar.reveal(False)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]