[gnome-tweak-tool] extensions: Bail out early when not running under GNOME
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] extensions: Bail out early when not running under GNOME
- Date: Thu, 8 Jun 2017 20:52:59 +0000 (UTC)
commit 1e9b9efb6a54bac3e3bcb5300a89f725fec718a6
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Jun 8 20:24:35 2017 +0200
extensions: Bail out early when not running under GNOME
GNOME Shell extensions aren't useful in non-GNOME environments,
so return right after initializing the empty tweak group to make
sure it is kept hidden in that case.
https://bugzilla.gnome.org/show_bug.cgi?id=783563
gtweak/tweaks/tweak_group_shell_extensions.py | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gtweak/tweaks/tweak_group_shell_extensions.py b/gtweak/tweaks/tweak_group_shell_extensions.py
index 266dfce..b0ed587 100644
--- a/gtweak/tweaks/tweak_group_shell_extensions.py
+++ b/gtweak/tweaks/tweak_group_shell_extensions.py
@@ -237,12 +237,14 @@ class ShellExtensionTweakGroup(ListBoxTweakGroup):
_("Extensions"),
*extension_tweaks)
+ if shell is None:
+ return # we're done
+
self.props.valign = Gtk.Align.FILL
self.titlebar_widget = Gtk.Switch(visible=True)
- if shell is not None:
- shell._settings.bind("disable-user-extensions", self.titlebar_widget,
- "active", Gio.SettingsBindFlags.INVERT_BOOLEAN)
+ shell._settings.bind("disable-user-extensions", self.titlebar_widget,
+ "active", Gio.SettingsBindFlags.INVERT_BOOLEAN)
self.set_header_func(self._list_header_func, None)
self.connect("row-activated", self._on_row_activated, None);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]