[gnome-music/wip/jfelder/3-38-empty-view-launch: 1/2] emptyview: Do not make it visible by default




commit db6c176642bf02c0b489c466eb629ec41bf2ae96
Author: Jean Felder <jfelder src gnome org>
Date:   Fri Nov 13 21:15:39 2020 +0100

    emptyview: Do not make it visible by default
    
    The empty view is the first view added to the stack. Therefore, it can
    be visible by at startup before the album view starts to be
    populated.
    
    This issue is fixed by making this view hidden by default. It becomes
    visible if it needs to be shown.
    
    Related: #423

 data/ui/EmptyView.ui | 2 +-
 gnomemusic/window.py | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/data/ui/EmptyView.ui b/data/ui/EmptyView.ui
index cc7ae76c3..3c7856f7b 100644
--- a/data/ui/EmptyView.ui
+++ b/data/ui/EmptyView.ui
@@ -3,7 +3,7 @@
   <!-- interface-requires gtk+ 3.0 -->
   <template class="EmptyView" parent="GtkStack">
     <property name="transition_type">crossfade</property>
-    <property name="visible">True</property>
+    <property name="visible">False</property>
     <child>
       <object class="GtkBox" id="_container">
         <property name="visible">True</property>
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index c5563a221..60b9f59eb 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -184,6 +184,7 @@ class Window(Gtk.ApplicationWindow):
 
         state = self._app.props.coregrilo.props.tracker_available
         empty_view = self.views[View.EMPTY]
+        empty_view.props.visible = True
         if state == TrackerState.UNAVAILABLE:
             empty_view.props.state = EmptyView.State.NO_TRACKER
         elif state == TrackerState.OUTDATED:


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