core: Allow disabling preferences

main
mirkobrombin 2 years ago
parent 0f4b793502
commit f79ea0c811

@ -0,0 +1,2 @@
misc:Depends=dconf-gsettings-backend | gsettings-backend
misc:Pre-Depends=

@ -59,7 +59,8 @@
{
"id": "snap",
"title": "Snap",
"subtitle": "Manage and configure Snaps and the Snapcraft repository."
"subtitle": "Manage and configure Snaps and the Snapcraft repository.",
"disabled": true
},
{
"id": "appimage",

@ -58,6 +58,11 @@ class VanillaLayoutPreferences(Adw.Bin):
_switcher.set_valign(Gtk.Align.CENTER)
_action_row.add_suffix(_switcher)
if item.get("disabled"):
_action_row.set_visible(False)
_action_row.set_sensitive(False)
_switcher.set_sensitive(False)
self.prefs_list.add(_action_row)
self.__register_widgets.append((item["id"], _switcher))

Loading…
Cancel
Save