[gnome-music] view: Initialize main box before setup_view
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] view: Initialize main box before setup_view
- Date: Mon, 22 Aug 2016 14:38:14 +0000 (UTC)
commit eb70bcbec82cd2454893697941b98c50dd0a5616
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
Groundwork for GtkFlowBox Albums view introduction.
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.
https://bugzilla.gnome.org/show_bug.cgi?id=760164
gnomemusic/view.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/view.py b/gnomemusic/view.py
index 38cc975..d9616d1 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,
@@ -153,6 +153,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]