MousePerspective: do not show "Add profile" button

Previously, we would just make it insensitive (i.e., not clickable). But
why show it at all if it cannot be used anyway?
This commit is contained in:
Jente Hidskes
2019-02-20 13:16:49 +01:00
committed by Peter Hutterer
parent a9f4e80f2e
commit b76b2fc362

View File

@@ -100,7 +100,7 @@ class MousePerspective(Gtk.Overlay):
# Find the first profile that is enabled. If there is none, disable the
# add button.
left = next((p for p in device.profiles if not p.enabled), None)
self.add_profile_button.set_sensitive(left is not None)
self.add_profile_button.set_visible(left is not None)
self.listbox_profiles.foreach(Gtk.Widget.destroy)
for profile in device.profiles: