[gnome-tweak-tool] Drop useless constants for tweak groups
- From: Jeremy Bicha <jbicha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] Drop useless constants for tweak groups
- Date: Tue, 6 Jun 2017 21:31:30 +0000 (UTC)
commit 8d0d9a8861451163b5aefcd974991f24b3cd5618
Author: Jeremy Bicha <jbicha ubuntu com>
Date: Tue May 30 00:48:23 2017 -0400
Drop useless constants for tweak groups
gtweak/tweakmodel.py | 12 ------------
gtweak/tweaks/tweak_group_font.py | 3 +--
gtweak/tweaks/tweak_group_interface.py | 4 ++--
gtweak/tweaks/tweak_group_power.py | 3 +--
gtweak/tweaks/tweak_group_top_bar.py | 3 +--
gtweak/tweaks/tweak_group_windows.py | 4 ++--
gtweak/tweaks/tweak_group_workspaces.py | 3 +--
7 files changed, 8 insertions(+), 24 deletions(-)
---
diff --git a/gtweak/tweakmodel.py b/gtweak/tweakmodel.py
index f0e0e96..0676be4 100644
--- a/gtweak/tweakmodel.py
+++ b/gtweak/tweakmodel.py
@@ -25,18 +25,6 @@ from gi.repository import Gtk, GLib
def N_(x): return x
-TWEAK_GROUP_APPEARANCE = _("Appearance")
-TWEAK_GROUP_EXTENSION = _("Extensions")
-TWEAK_GROUP_FONTS = _("Fonts")
-TWEAK_GROUP_POWER = _("Power")
-TWEAK_GROUP_APPLICATION = _("Startup Applications")
-TWEAK_GROUP_TOPBAR = _("Top Bar")
-TWEAK_GROUP_WINDOWS = _("Windows")
-TWEAK_GROUP_WORKSPACES = _("Workspaces")
-
-TWEAK_GROUP_MOUSE = _("Mouse")
-TWEAK_GROUP_FILES = _("Files")
-
LOG = logging.getLogger(__name__)
def string_for_search(s):
diff --git a/gtweak/tweaks/tweak_group_font.py b/gtweak/tweaks/tweak_group_font.py
index eebd5c8..7dd7c70 100644
--- a/gtweak/tweaks/tweak_group_font.py
+++ b/gtweak/tweaks/tweak_group_font.py
@@ -17,11 +17,10 @@
from gi.repository import Gtk
-from gtweak.tweakmodel import TWEAK_GROUP_FONTS
from gtweak.widgets import ListBoxTweakGroup, GSettingsSpinButtonTweak, GSettingsFontButtonTweak,
GSettingsComboTweak
TWEAK_GROUPS = [
- ListBoxTweakGroup(TWEAK_GROUP_FONTS,
+ ListBoxTweakGroup(_("Fonts"),
GSettingsFontButtonTweak(_("Window Titles"),"org.gnome.desktop.wm.preferences", "titlebar-font"),
GSettingsFontButtonTweak(_("Interface"),"org.gnome.desktop.interface", "font-name"),
GSettingsFontButtonTweak(_("Documents"), "org.gnome.desktop.interface", "document-font-name"),
diff --git a/gtweak/tweaks/tweak_group_interface.py b/gtweak/tweaks/tweak_group_interface.py
index 400b67a..084e6d3 100644
--- a/gtweak/tweaks/tweak_group_interface.py
+++ b/gtweak/tweaks/tweak_group_interface.py
@@ -27,7 +27,7 @@ from gi.repository import GLib
import gtweak
from gtweak.utils import walk_directories, make_combo_list_with_default, extract_zip_file
-from gtweak.tweakmodel import Tweak, TWEAK_GROUP_APPEARANCE
+from gtweak.tweakmodel import Tweak
from gtweak.gshellwrapper import GnomeShellFactory
from gtweak.gsettings import GSettingsSetting
from gtweak.widgets import ListBoxTweakGroup, GSettingsSwitchTweak, GSettingsComboTweak, DarkThemeSwitcher,
Title, build_combo_box_text,build_label_beside_widget, FileChooserButton
@@ -254,7 +254,7 @@ class ShellThemeTweak(Gtk.Box, Tweak):
TWEAK_GROUPS = [
- ListBoxTweakGroup(TWEAK_GROUP_APPEARANCE,
+ ListBoxTweakGroup(_("Appearance"),
DarkThemeSwitcher(),
#GSettingsSwitchTweak("Buttons Icons","org.gnome.desktop.interface", "buttons-have-icons"),
#GSettingsSwitchTweak("Menu Icons","org.gnome.desktop.interface", "menus-have-icons"),
diff --git a/gtweak/tweaks/tweak_group_power.py b/gtweak/tweaks/tweak_group_power.py
index 35cf706..facb15e 100644
--- a/gtweak/tweaks/tweak_group_power.py
+++ b/gtweak/tweaks/tweak_group_power.py
@@ -19,7 +19,6 @@
from gi.repository import Gio, GLib
import gtweak
-from gtweak.tweakmodel import TWEAK_GROUP_POWER
from gtweak.widgets import ListBoxTweakGroup, GSettingsComboEnumTweak, GSettingsSwitchTweak,
GetterSetterSwitchTweak, build_horizontal_sizegroup, Title, _GSettingsTweak
from gtweak.utils import AutostartFile
@@ -58,7 +57,7 @@ class IgnoreLidSwitchTweak(GetterSetterSwitchTweak):
sg = build_horizontal_sizegroup()
TWEAK_GROUPS = [
- ListBoxTweakGroup(TWEAK_GROUP_POWER,
+ ListBoxTweakGroup(_("Power"),
IgnoreLidSwitchTweak(),
GSettingsComboEnumTweak(_("Power Button Behavior"), "org.gnome.settings-daemon.plugins.power",
"power-button-action", size_group=sg),
),
diff --git a/gtweak/tweaks/tweak_group_top_bar.py b/gtweak/tweaks/tweak_group_top_bar.py
index 7f875fd..085a607 100644
--- a/gtweak/tweaks/tweak_group_top_bar.py
+++ b/gtweak/tweaks/tweak_group_top_bar.py
@@ -18,7 +18,6 @@
import gtweak
from gtweak.gshellwrapper import GnomeShellFactory
-from gtweak.tweakmodel import TWEAK_GROUP_TOPBAR
from gtweak.widgets import ListBoxTweakGroup, GSettingsSwitchTweak, GetterSetterSwitchTweak, Title
from gtweak.utils import XSettingsOverrides
@@ -37,7 +36,7 @@ class ApplicationMenuTweak(GetterSetterSwitchTweak):
self._xsettings.set_shell_shows_app_menu(v)
TWEAK_GROUPS = [
- ListBoxTweakGroup(TWEAK_GROUP_TOPBAR,
+ ListBoxTweakGroup(_("Top Bar"),
ApplicationMenuTweak(),
Title(_("Clock"),""),
GSettingsSwitchTweak(_("Date"),"org.gnome.desktop.interface", "clock-show-date"),
diff --git a/gtweak/tweaks/tweak_group_windows.py b/gtweak/tweaks/tweak_group_windows.py
index f50040c..3ddd1d9 100644
--- a/gtweak/tweaks/tweak_group_windows.py
+++ b/gtweak/tweaks/tweak_group_windows.py
@@ -17,7 +17,7 @@
import gtweak
from gtweak.gshellwrapper import GnomeShellFactory
-from gtweak.tweakmodel import TWEAK_GROUP_WINDOWS, Tweak
+from gtweak.tweakmodel import Tweak
from gtweak.widgets import ListBoxTweakGroup, GSettingsComboEnumTweak, GSettingsComboTweak,
GSettingsSwitchTweak, Title, GSettingsSwitchTweakValue, build_label_beside_widget, _GSettingsTweak
from gtweak.utils import XSettingsOverrides
import gettext
@@ -182,7 +182,7 @@ Focus = GSettingsComboTweak(_("Focus Mode"), "org.gnome.desktop.wm.preferences"
depends_how = lambda x,kn: x.get_string(kn) in ("mouse", "sloppy")
TWEAK_GROUPS = [
- ListBoxTweakGroup(TWEAK_GROUP_WINDOWS,
+ ListBoxTweakGroup(_("Windows"),
GSettingsSwitchTweak(_("Attach Modal Dialogs"),"org.gnome.mutter", "attach-modal-dialogs",
desc=_("When on, modal dialog windows are attached to their parent windows, and
cannot be moved.")),
GSettingsSwitchTweak(_("Resize with Secondary-Click"),"org.gnome.desktop.wm.preferences",
"resize-with-right-button"),
diff --git a/gtweak/tweaks/tweak_group_workspaces.py b/gtweak/tweaks/tweak_group_workspaces.py
index 3f5793b..7626a79 100644
--- a/gtweak/tweaks/tweak_group_workspaces.py
+++ b/gtweak/tweaks/tweak_group_workspaces.py
@@ -21,7 +21,6 @@ from gi.repository import Gtk
import gtweak
from gtweak.gsettings import GSettingsSetting, GSettingsMissingError, GSettingsFakeSetting
from gtweak.gshellwrapper import GnomeShellFactory
-from gtweak.tweakmodel import TWEAK_GROUP_WORKSPACES
from gtweak.widgets import ListBoxTweakGroup, GSettingsSwitchTweak, build_label_beside_widget,
build_horizontal_sizegroup, Title, _GSettingsTweak, build_combo_box_text, GSettingsSpinButtonTweak
_shell = GnomeShellFactory().get_shell()
@@ -56,7 +55,7 @@ sw = StaticWorkspaceTweak(size_group=sg, loaded=_shell_loaded)
depends_how = lambda x,kn: not(x.get_boolean(kn))
TWEAK_GROUPS = [
- ListBoxTweakGroup(TWEAK_GROUP_WORKSPACES,
+ ListBoxTweakGroup(_("Workspaces"),
sw,
GSettingsSpinButtonTweak(_("Number of Workspaces"), "org.gnome.desktop.wm.preferences",
"num-workspaces", depends_on = sw, depends_how=depends_how, size_group=sg),
Title(_("Display Handling"), "", uid="title-theme"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]