[gnome-tweaks] general: Don't show Over-Amplification in Ubuntu session
- From: Jeremy Bicha <jbicha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweaks] general: Don't show Over-Amplification in Ubuntu session
- Date: Fri, 17 Aug 2018 20:58:03 +0000 (UTC)
commit 3367aaddc26cb95907f9263dcb1a022e7aeeb2c4
Author: Jeremy Bicha <jbicha ubuntu com>
Date: Fri Aug 17 16:50:52 2018 -0400
general: Don't show Over-Amplification in Ubuntu session
In the Ubuntu session, the Over-Amplification setting is
in the GNOME Settings app. But in the "vanilla" GNOME session —
even on Ubuntu — there is no Over-Amplification setting there.
Closes: https://gitlab.gnome.org/GNOME/gnome-tweaks/issues/127
gtweak/tweaks/tweak_group_general.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/gtweak/tweaks/tweak_group_general.py b/gtweak/tweaks/tweak_group_general.py
index 0e0130b..2124691 100644
--- a/gtweak/tweaks/tweak_group_general.py
+++ b/gtweak/tweaks/tweak_group_general.py
@@ -5,10 +5,13 @@
from gi.repository import Gio, GLib, Gtk
import gtweak
+from gtweak.gshellwrapper import GnomeShellFactory
from gtweak.tweakmodel import Tweak
from gtweak.widgets import ListBoxTweakGroup, GetterSetterSwitchTweak, GSettingsSwitchTweak
from gtweak.utils import AutostartFile
+_shell = GnomeShellFactory().get_shell()
+_shell_not_ubuntu = _shell.mode != 'ubuntu'
class IgnoreLidSwitchTweak(GetterSetterSwitchTweak):
def __init__(self, **options):
@@ -42,11 +45,13 @@ class IgnoreLidSwitchTweak(GetterSetterSwitchTweak):
None, 0, -1, None)
return False
+
TWEAK_GROUPS = [
ListBoxTweakGroup(_("General"),
GSettingsSwitchTweak(_("Animations"), "org.gnome.desktop.interface", "enable-animations"),
IgnoreLidSwitchTweak(),
+ # Don't show this setting in the Ubuntu session since this setting is in gnome-control-center there
GSettingsSwitchTweak(_("Over-Amplification"), "org.gnome.desktop.sound",
"allow-volume-above-100-percent",
- desc=_("Allows raising the volume above 100%. This can result in a loss of audio quality; it is
better to increase application volume settings, if possible.")),
+ desc=_("Allows raising the volume above 100%. This can result in a loss of audio quality; it is
better to increase application volume settings, if possible."), loaded=_shell_not_ubuntu),
),
]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]