[gnome-tweak-tool/gnome-3-16] Revert "Add a way to inhibit systemd's default behavior on lid close"
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool/gnome-3-16] Revert "Add a way to inhibit systemd's default behavior on lid close"
- Date: Thu, 16 Apr 2015 16:28:59 +0000 (UTC)
commit eae450ab8f58459b7f787f6bc96cbf5f1332d91c
Author: Rui Matos <tiagomatos gmail com>
Date: Thu Apr 16 16:45:20 2015 +0200
Revert "Add a way to inhibit systemd's default behavior on lid close"
This reverts commit 9e12b98a3e04555259e1690bfc38dcc44e0b5575. It
breaks string freeze and we didn't allow enough time for translators.
Makefile.am | 10 +--------
configure.ac | 1 -
gnome-tweak-tool | 5 +--
gnome-tweak-tool-lid-inhibitor.in | 39 -----------------------------------
gtweak/defs.py.in | 1 -
gtweak/tweaks/tweak_group_shell.py | 40 ++---------------------------------
6 files changed, 6 insertions(+), 90 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 89fa71b..82d0ca6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,13 +1,6 @@
bin_SCRIPTS = \
gnome-tweak-tool
-libexec_SCRIPTS = \
- gnome-tweak-tool-lid-inhibitor
-
-gnome-tweak-tool-lid-inhibitor: gnome-tweak-tool-lid-inhibitor.in Makefile
- $(AM_V_GEN)sed -e s!\ PYTHON\@! PYTHON@! < $< > $@
- chmod +x $@
-
#nobase means gtweak dir is preserved in site-packages
appdir = $(pythondir)
nobase_dist_app_PYTHON = \
@@ -17,8 +10,7 @@ nobase_dist_app_PYTHON = \
nobase_app_PYTHON = gtweak/defs.py
EXTRA_DIST = \
- $(bin_SCRIPTS) \
- gnome-tweak-tool-lid-inhibitor.in
+ $(bin_SCRIPTS)
CLEANFILES = \
$(wildcard $(srcdir)/gtweak/*.pyc) \
diff --git a/configure.ac b/configure.ac
index fb70864..731839c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,7 +25,6 @@ AS_AC_EXPAND(PKGDATADIR, "${datadir}/${PACKAGE}")
AS_AC_EXPAND(GSETTINGSSCHEMADIR, "${gsettingsschemadir}")
AS_AC_EXPAND(TWEAKDIR, "${pythondir}/gtweak/tweaks")
AS_AC_EXPAND(LOCALEDIR, "${localedir}")
-AS_AC_EXPAND(LIBEXECDIR, "${libexecdir}")
AC_CONFIG_FILES([ po/Makefile.in
Makefile
diff --git a/gnome-tweak-tool b/gnome-tweak-tool
index dc97b39..a47fa5c 100755
--- a/gnome-tweak-tool
+++ b/gnome-tweak-tool
@@ -40,10 +40,10 @@ if __name__ == '__main__':
options, args = parser.parse_args()
try:
- from gtweak.defs import GSETTINGS_SCHEMA_DIR, TWEAK_DIR, DATA_DIR, PKG_DATA_DIR, LOCALE_DIR,
LIBEXEC_DIR
+ from gtweak.defs import GSETTINGS_SCHEMA_DIR, TWEAK_DIR, DATA_DIR, PKG_DATA_DIR, LOCALE_DIR
_defs_present = True
except ImportError:
- GSETTINGS_SCHEMA_DIR = TWEAK_DIR = DATA_DIR = PKG_DATA_DIR = LOCALE_DIR = LIBEXEC_DIR = ""
+ GSETTINGS_SCHEMA_DIR = TWEAK_DIR = DATA_DIR = PKG_DATA_DIR = LOCALE_DIR = ""
_defs_present = False
#the supplied prefix always beats the contents of defs
@@ -61,7 +61,6 @@ if __name__ == '__main__':
gtweak.DATA_DIR = DATA_DIR
gtweak.PKG_DATA_DIR = PKG_DATA_DIR
gtweak.LOCALE_DIR = LOCALE_DIR
- gtweak.LIBEXEC_DIR = LIBEXEC_DIR
gtweak.ENABLE_TEST = options.test
gtweak.ALL_TWEAKS = options.load
gtweak.APP_NAME = "gnome-tweak-tool"
diff --git a/gtweak/defs.py.in b/gtweak/defs.py.in
index 6c8fdf8..12180db 100644
--- a/gtweak/defs.py.in
+++ b/gtweak/defs.py.in
@@ -4,4 +4,3 @@ GSETTINGS_SCHEMA_DIR = "@GSETTINGSSCHEMADIR@"
TWEAK_DIR = "@TWEAKDIR@"
VERSION = "@VERSION@"
LOCALE_DIR = "@LOCALEDIR@"
-LIBEXEC_DIR = "@LIBEXECDIR@"
diff --git a/gtweak/tweaks/tweak_group_shell.py b/gtweak/tweaks/tweak_group_shell.py
index b8dd497..9f3674a 100644
--- a/gtweak/tweaks/tweak_group_shell.py
+++ b/gtweak/tweaks/tweak_group_shell.py
@@ -15,14 +15,13 @@
# You should have received a copy of the GNU General Public License
# along with gnome-tweak-tool. If not, see <http://www.gnu.org/licenses/>.
-from gi.repository import Gtk, Gio, GLib
+from gi.repository import Gtk, Gio
-import gtweak
from gtweak.gsettings import GSettingsSetting, GSettingsMissingError, GSettingsFakeSetting
from gtweak.gshellwrapper import GnomeShellFactory
from gtweak.tweakmodel import TWEAK_GROUP_TOPBAR, TWEAK_GROUP_WORKSPACES, TWEAK_GROUP_POWER
from gtweak.widgets import ListBoxTweakGroup, GSettingsComboEnumTweak, GSettingsSwitchTweak,
GSettingsCheckTweak, GetterSetterSwitchTweak, adjust_schema_for_overrides, build_label_beside_widget,
build_horizontal_sizegroup, UI_BOX_SPACING, Title, _GSettingsTweak, build_combo_box_text,
GSettingsSpinButtonTweak
-from gtweak.utils import XSettingsOverrides, AutostartFile
+from gtweak.utils import XSettingsOverrides
_shell = GnomeShellFactory().get_shell()
_shell_loaded = _shell is not None
@@ -61,39 +60,7 @@ class StaticWorkspaceTweak(Gtk.Box, _GSettingsTweak):
value = combo.get_model().get_value(_iter, 0)
val = self.STATUS[value]
self.settings[self.key_name] = val
-
-class IgnoreLidSwitchTweak(GetterSetterSwitchTweak):
- def __init__(self, **options):
- self._inhibitor_name = "gnome-tweak-tool-lid-inhibitor"
- self._inhibitor_path = "%s/%s" % (gtweak.LIBEXEC_DIR, self._inhibitor_name)
-
- self._dfile = AutostartFile(None,
- autostart_desktop_filename = "ignore-lid-switch-tweak.desktop",
- exec_cmd = self._inhibitor_path)
-
- GetterSetterSwitchTweak.__init__(self, _("Don't suspend on lid close"), **options)
-
- def get_active(self):
- return self._sync_inhibitor()
-
- def set_active(self, v):
- self._dfile.update_start_at_login(v)
- self._sync_inhibitor()
-
- def _sync_inhibitor(self):
- if (self._dfile.is_start_at_login_enabled()):
- GLib.spawn_command_line_async(self._inhibitor_path)
- return True
- else:
- bus = Gio.bus_get_sync(Gio.BusType.SESSION, None)
- bus.call('org.gnome.tweak-tool.lid-inhibitor',
- '/org/gnome/tweak_tool/lid_inhibitor',
- 'org.gtk.Actions',
- 'Activate',
- GLib.Variant('(sava{sv})', ('quit', [], {})),
- None, 0, -1, None)
- return False
-
+
sg = build_horizontal_sizegroup()
sw = StaticWorkspaceTweak(size_group=sg, loaded=_shell_loaded)
depends_how = lambda x,kn: not(x.get_boolean(kn))
@@ -113,7 +80,6 @@ TWEAK_GROUPS = [
GSettingsComboEnumTweak(_("On Battery Power"),"org.gnome.settings-daemon.plugins.power",
"lid-close-battery-action", size_group=sg),
GSettingsComboEnumTweak(_("When plugged in"),"org.gnome.settings-daemon.plugins.power",
"lid-close-ac-action", size_group=sg),
GSettingsSwitchTweak(_("Suspend even if an external monitor is plugged
in"),"org.gnome.settings-daemon.plugins.power", "lid-close-suspend-with-external-monitor", size_group=sg),
- IgnoreLidSwitchTweak(),
),
ListBoxTweakGroup(TWEAK_GROUP_WORKSPACES,
sw,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]