[gnome-music/wip/gbsneto/flowbox: 2/11] view: initialize main box before setup_view
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/gbsneto/flowbox: 2/11] view: initialize main box before setup_view
- Date: Tue, 9 Aug 2016 07:36:36 +0000 (UTC)
commit 18e2b5b4c775c228472b3d3baa1353db25a5e866
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Aug 9 02:56:20 2016 -0300
view: initialize main box before setup_view
While initializing the Albums view, we will need to
access the main box, which must be initialized when
setup_view() gets called.
This patch moves the code around so the box is initialized
when setup_view() is called.
gnomemusic/view.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/view.py b/gnomemusic/view.py
index 1e627a5..1370d54 100644
--- a/gnomemusic/view.py
+++ b/gnomemusic/view.py
@@ -90,11 +90,11 @@ class ViewContainer(Gtk.Stack):
GObject.TYPE_INT
)
+ self._box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
+
# Setup the main view
self._setup_view(view_type)
- self._box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
- self._box.pack_start(self.view, True, True, 0)
if use_sidebar:
self.stack = Gtk.Stack(
transition_type=Gtk.StackTransitionType.SLIDE_RIGHT,
@@ -151,6 +151,8 @@ class ViewContainer(Gtk.Stack):
self.view.click_handler = self.view.connect('item-activated', self._on_item_activated)
self.view.connect('selection-mode-request', self._on_selection_mode_request)
+ self._box.pack_start(self.view, True, True, 0)
+
@log
def _on_header_bar_toggled(self, button):
if button.get_active():
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]