[gnome-music/wip/jfelder/lastfm-ui-part-2: 9/9] appmenu: Hide Last.fm switcher if no account is configured



commit ca601d9be4321e4c60035ed9d76fea927c154e49
Author: Jean Felder <jfelder src gnome org>
Date:   Tue Jan 14 23:59:44 2020 +0100

    appmenu: Hide Last.fm switcher if no account is configured

 data/ui/AppMenu.ui            | 3 +--
 gnomemusic/widgets/appmenu.py | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/data/ui/AppMenu.ui b/data/ui/AppMenu.ui
index c2d57db3..9c1e1625 100644
--- a/data/ui/AppMenu.ui
+++ b/data/ui/AppMenu.ui
@@ -28,8 +28,7 @@
           <object class="GtkBox" id="_lastfm_box">
             <property name="margin-left">5</property>
             <property name="margin-right">5</property>
-            <property name="sensitive">False</property>
-            <property name="visible">True</property>
+            <property name="visible">False</property>
             <child>
               <object class="GtkLabel">
                 <property name="can_focus">False</property>
diff --git a/gnomemusic/widgets/appmenu.py b/gnomemusic/widgets/appmenu.py
index 4bbaa417..981afc1f 100644
--- a/gnomemusic/widgets/appmenu.py
+++ b/gnomemusic/widgets/appmenu.py
@@ -63,13 +63,13 @@ class AppMenu(Gtk.PopoverMenu):
         self._lastfm_configure_button.props.sensitive = True
 
         if state == GoaLastFM.State.NOT_CONFIGURED:
-            self._lastfm_box.props.sensitive = False
+            self._lastfm_box.props.visible = False
             if self._lastfm_switcher_id is not None:
                 self._lastfm_switch.disconnect(self._lastfm_switcher_id)
                 self._lastfm_switcher_id = None
             return
 
-        self._lastfm_box.props.sensitive = True
+        self._lastfm_box.props.visible = True
         if self._lastfm_switcher_id is None:
             self._lastfm_switcher_id = self._lastfm_switch.connect(
                 "state-set", self._on_lastfm_switch_active)


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