File: tweak_group_desktop.py

package info (click to toggle)
gnome-tweaks 42~beta-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,128 kB
  • sloc: python: 2,905; xml: 10; makefile: 5
file content (27 lines) | stat: -rw-r--r-- 1,450 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright (c) 2011 John Stowers
# SPDX-License-Identifier: GPL-3.0+
# License-Filename: LICENSES/GPL-3.0

from gtweak.widgets import ListBoxTweakGroup, GSettingsSwitchTweak, Title

dicons = GSettingsSwitchTweak(_("Show Icons"),"org.gnome.desktop.background","show-desktop-icons")

# show-desktop-icons is in gsettings-desktop-schemas, but it won't actually
# *work* unless we have a version of Nautilus that still has the ability to
# draw the desktop; use one of the settings that was present in that version
# to probe for it.
home = GSettingsSwitchTweak(_("Home"),"org.gnome.nautilus.desktop",
                            "home-icon-visible", depends_on=dicons,
                            schema_filename="org.gnome.nautilus.gschema.xml")

TWEAK_GROUPS = []

if home.loaded:
    TWEAK_GROUPS.append(ListBoxTweakGroup(_("Desktop"),
        Title(_("Icons on Desktop"), "", uid="title-theme", top=True),
        dicons,
        home,
        GSettingsSwitchTweak(_("Network Servers"),"org.gnome.nautilus.desktop", "network-icon-visible", depends_on=dicons, schema_filename="org.gnome.nautilus.gschema.xml"),
        GSettingsSwitchTweak(_("Trash"),"org.gnome.nautilus.desktop", "trash-icon-visible", depends_on=dicons, schema_filename="org.gnome.nautilus.gschema.xml"),
        GSettingsSwitchTweak(_("Mounted Volumes"),"org.gnome.nautilus.desktop", "volumes-visible", depends_on=dicons, schema_filename="org.gnome.nautilus.gschema.xml"),
    ))