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



commit c5e4add122bc674906118f55fb98fb3976360786
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 82168527..e3c5fc39 100644
--- a/data/ui/AppMenu.ui
+++ b/data/ui/AppMenu.ui
@@ -27,8 +27,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 4b3598c9..b1464162 100644
--- a/gnomemusic/widgets/appmenu.py
+++ b/gnomemusic/widgets/appmenu.py
@@ -63,13 +63,13 @@ class AppMenu(Gtk.PopoverMenu):
         self._lastfm_configure_action.props.enabled = 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]