[gnome-music/wip/jfelder/albumwidget-cleanup: 4/4] albumwidget: Define widgets visibility in the ui file



commit 782d51cf3f7fdcba8a897ea8b0e1e9b2ad92a787
Author: Jean Felder <jfelder src gnome org>
Date:   Tue Sep 11 20:52:18 2018 +0200

    albumwidget: Define widgets visibility in the ui file
    
    All the widgets are visible by default. Only the composer label
    visibility can change and it is handled by _set_duration_label call.

 data/ui/AlbumWidget.ui            | 1 +
 gnomemusic/widgets/albumwidget.py | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/data/ui/AlbumWidget.ui b/data/ui/AlbumWidget.ui
index cf19f250..213d8eb8 100644
--- a/data/ui/AlbumWidget.ui
+++ b/data/ui/AlbumWidget.ui
@@ -3,6 +3,7 @@
 <interface>
   <requires lib="gtk+" version="3.12"/>
   <template class="AlbumWidget" parent="GtkEventBox">
+    <property name="visible">True</property>
     <style>
       <class name="view"/>
       <class name="content-view"/>
diff --git a/gnomemusic/widgets/albumwidget.py b/gnomemusic/widgets/albumwidget.py
index f634a640..ea56a1b4 100644
--- a/gnomemusic/widgets/albumwidget.py
+++ b/gnomemusic/widgets/albumwidget.py
@@ -92,8 +92,6 @@ class AlbumWidget(Gtk.EventBox):
         self.bind_property(
             'selected-items-count', self._parent_view, 'selected-items-count')
 
-        self.show_all()
-
     @log
     def _create_model(self):
         """Create the ListStore model for this widget."""
@@ -230,7 +228,6 @@ class AlbumWidget(Gtk.EventBox):
 
             self._set_duration_label()
             self._update_model(self._player)
-            self.show_all()
 
     @log
     def _update_model(self, player, position=None):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]