[gnome-tweaks] shellwrapper: Drop unused extensions support
- From: Evan Welsh <ewlsh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweaks] shellwrapper: Drop unused extensions support
- Date: Fri, 23 Oct 2020 23:57:12 +0000 (UTC)
commit 1119f56f73b89cd6788d6142559f8deab3b9bb9e
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Feb 7 22:34:35 2020 +0100
shellwrapper: Drop unused extensions support
Besides list_extensions() which is used from the appearance group
to check whether the user-themes extension is available and enabled,
all other extension-related methods/properties are now unused.
https://gitlab.gnome.org/GNOME/gnome-tweaks/issues/272
gtweak/gshellwrapper.py | 36 ------------------------------------
gtweak/utils.py | 14 --------------
2 files changed, 50 deletions(-)
---
diff --git a/gtweak/gshellwrapper.py b/gtweak/gshellwrapper.py
index 9174baf4..cfd478e9 100644
--- a/gtweak/gshellwrapper.py
+++ b/gtweak/gshellwrapper.py
@@ -56,25 +56,6 @@ class _ShellProxy:
class GnomeShell:
- EXTENSION_STATE = {
- "ENABLED" : 1,
- "DISABLED" : 2,
- "ERROR" : 3,
- "OUT_OF_DATE" : 4,
- "DOWNLOADING" : 5,
- "INITIALIZED" : 6,
- }
-
- EXTENSION_TYPE = {
- "SYSTEM" : 1,
- "PER_USER" : 2
- }
-
- DATA_DIR = os.path.join(GLib.get_user_data_dir(), "gnome-shell")
- EXTENSION_DIR = os.path.join(GLib.get_user_data_dir(), "gnome-shell", "extensions")
- EXTENSION_ENABLED_KEY = "enabled-extensions"
- SUPPORTS_EXTENSION_PREFS = True
-
def __init__(self, shellproxy, shellsettings):
self._proxy = shellproxy
self._settings = shellsettings
@@ -91,26 +72,9 @@ class GnomeShell:
def reload_theme(self):
self._execute_js('const Main = imports.ui.main; Main.loadTheme();')
- def extension_is_active(self, state, uuid):
- return state == GnomeShell.EXTENSION_STATE["ENABLED"] and \
- self._settings.setting_is_in_list(self.EXTENSION_ENABLED_KEY, uuid)
-
- def enable_extension(self, uuid):
- self._settings.setting_add_to_list(self.EXTENSION_ENABLED_KEY, uuid)
-
- def disable_extension(self, uuid):
- self._settings.setting_remove_from_list(self.EXTENSION_ENABLED_KEY, uuid)
-
def list_extensions(self):
return self._proxy.proxy_extensions.ListExtensions()
- def uninstall_extension(self, uuid):
- return self._proxy.proxy_extensions.UninstallExtension('(s)', uuid)
-
- def install_remote_extension(self, uuid, reply_handler, error_handler, user_data):
- self._proxy.proxy_extensions.InstallRemoteExtension('(s)', uuid,
- result_handler=reply_handler, error_handler=error_handler, user_data=user_data)
-
@property
def mode(self):
return self._proxy.mode
diff --git a/gtweak/utils.py b/gtweak/utils.py
index ae470048..af5fcf3a 100644
--- a/gtweak/utils.py
+++ b/gtweak/utils.py
@@ -251,20 +251,6 @@ class SchemaList:
s = Gio.Settings(i[1])
s.reset(i[0])
-@singleton
-class DisableExtension(GObject.GObject):
-
- __gsignals__ = {
- "disable-extension": (GObject.SignalFlags.RUN_FIRST, GObject.TYPE_NONE,()),
- }
-
- def __init__(self):
- GObject.GObject.__init__(self)
-
- def disable(self):
- self.emit("disable-extension")
-
-
@singleton
class XSettingsOverrides:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]