Commit a52ef176 authored by John Stowers's avatar John Stowers

Move background options to desktop group

parent adb4e4f4
......@@ -19,7 +19,7 @@ from gi.repository import Gtk
import gtweak
from gtweak.utils import AutostartManager
from gtweak.widgets import ListBoxTweakGroup, GSettingsSwitchTweak, GSettingsComboEnumTweak, GSettingsFileChooserButtonTweak, GSettingsCheckTweak
from gtweak.widgets import ListBoxTweakGroup, GSettingsSwitchTweak, GSettingsComboEnumTweak, GSettingsFileChooserButtonTweak, GSettingsCheckTweak, Title
class DesktopIconTweak(GSettingsSwitchTweak):
def __init__(self, **options):
......@@ -54,5 +54,8 @@ TWEAK_GROUPS = [
GSettingsCheckTweak(_("Network Servers"),"org.gnome.nautilus.desktop", "network-icon-visible", depends_on=dicons, schema_filename="org.gnome.nautilus.gschema.xml"),
GSettingsCheckTweak(_("Trash"),"org.gnome.nautilus.desktop", "trash-icon-visible", depends_on=dicons, schema_filename="org.gnome.nautilus.gschema.xml"),
GSettingsCheckTweak(_("Mounted Volumes"),"org.gnome.nautilus.desktop", "volumes-visible", depends_on=dicons, schema_filename="org.gnome.nautilus.gschema.xml"),
Title(_("Background"), "", uid="title-theme"),
GSettingsComboEnumTweak(_("Mode"),"org.gnome.desktop.background", "picture-options"),
GSettingsFileChooserButtonTweak(_("Background Location"),"org.gnome.desktop.background", "picture-uri", local_only=True, mimetypes=["application/xml","image/png","image/jpeg"]),
)
]
......@@ -22,7 +22,7 @@ import logging
from gi.repository import Pango, Gtk, GnomeDesktop
from gtweak.gshellwrapper import GnomeShellFactory
from gtweak.tweakmodel import Tweak, TweakGroup, TWEAK_GROUP_WINDOWS, TWEAK_GROUP_TYPING, TWEAK_GROUP_MOUSE, TWEAK_GROUP_FILES, TWEAK_GROUP_DESKTOP, TWEAK_GROUP_FONTS, TWEAK_GROUP_POWER, TWEAK_GROUP_WORKSPACES, TWEAK_SORT_FIRST
from gtweak.widgets import GSettingsSwitchTweak, build_label_beside_widget, GSettingsFileChooserButtonTweak, GSettingsComboEnumTweak, GSettingsSpinButtonTweak, GSettingsComboTweak, build_horizontal_sizegroup, ListBoxTweakGroup, Title
from gtweak.widgets import GSettingsSwitchTweak, build_label_beside_widget, GSettingsComboEnumTweak, GSettingsSpinButtonTweak, GSettingsComboTweak, build_horizontal_sizegroup, ListBoxTweakGroup, Title
from gtweak.gsettings import GSettingsSetting, GSettingsMissingError, GSettingsFakeSetting
_shell = GnomeShellFactory().get_shell()
......@@ -143,9 +143,6 @@ TWEAK_GROUPS = [
),
ListBoxTweakGroup(_("Legacy"),
Title(_("Background"), "", uid="title-theme"),
GSettingsComboEnumTweak(_("Background options"),"org.gnome.desktop.background", "picture-options"),
GSettingsFileChooserButtonTweak("org.gnome.desktop.background", "picture-uri", local_only=True, mimetypes=["application/xml","image/png","image/jpeg"]),
Title(_("Files"), "", uid="title-theme"),
GSettingsSwitchTweak(_("Use location entry"), "org.gnome.nautilus.preferences", "always-use-location-entry",schema_filename="org.gnome.nautilus.gschema.xml"),
Title(_("Fonts"), "", uid="title-theme"),
......
......@@ -391,17 +391,17 @@ class FileChooserButton(Gtk.FileChooserButton):
self.set_action(Gtk.FileChooserAction.OPEN)
class GSettingsFileChooserButtonTweak(Gtk.Box, _GSettingsTweak, _DependableMixin):
def __init__(self, schema_name, key_name, local_only, mimetypes, **options):
def __init__(self, name, schema_name, key_name, local_only, mimetypes, **options):
Gtk.Box.__init__(self, orientation=Gtk.Orientation.HORIZONTAL)
_GSettingsTweak.__init__(self, schema_name, key_name, **options)
self.settings.connect('changed::'+self.key_name, self._on_setting_changed)
self.filechooser = FileChooserButton(self.name,local_only,mimetypes)
self.filechooser = FileChooserButton(name,local_only,mimetypes)
self.filechooser.set_uri(self.settings.get_string(self.key_name))
self.filechooser.connect("file-set", self._on_file_set)
build_label_beside_widget(self.name, self.filechooser, hbox=self)
build_label_beside_widget(name, self.filechooser, hbox=self)
self.widget_for_size_group = self.filechooser
def _values_are_different(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment