[gnome-tweak-tool/drop-old-compat] extensions: Drop compatibility code for pre-GNOME 3.6



commit 1aced6884e60ce19f1bf005f521795138aeca7ee
Author: Jeremy Bicha <jbicha ubuntu com>
Date:   Wed Jun 7 09:22:02 2017 -0400

    extensions: Drop compatibility code for pre-GNOME 3.6

 gtweak/egowrapper.py    |    2 +-
 gtweak/gshellwrapper.py |   36 ------------------------------------
 2 files changed, 1 insertions(+), 37 deletions(-)
---
diff --git a/gtweak/egowrapper.py b/gtweak/egowrapper.py
index ef4f124..c1f2755 100644
--- a/gtweak/egowrapper.py
+++ b/gtweak/egowrapper.py
@@ -105,7 +105,7 @@ if __name__ == "__main__":
 
     logging.basicConfig(format="%(levelname)-8s: %(message)s", level=logging.DEBUG)
 
-    e = ExtensionsDotGnomeDotOrg((3, 4, 1))
+    e = ExtensionsDotGnomeDotOrg((3, 6, 1))
 
     e.connect("got-extensions", _got_ext)
     e.connect("got-extension-info", _got_ext_info)
diff --git a/gtweak/gshellwrapper.py b/gtweak/gshellwrapper.py
index a887062..eb490ed 100644
--- a/gtweak/gshellwrapper.py
+++ b/gtweak/gshellwrapper.py
@@ -126,37 +126,6 @@ class GnomeShell:
     def version(self):
         return self._proxy.version
 
-class GnomeShell32(GnomeShell):
-
-    EXTENSION_ENABLED_KEY = "enabled-extensions"
-    SUPPORTS_EXTENSION_PREFS = False
-
-    def list_extensions(self):
-        return self._proxy.proxy.ListExtensions()
-
-    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)
-
-class GnomeShell34(GnomeShell32):
-
-    SUPPORTS_EXTENSION_PREFS = True
-
-    def restart(self):
-        logging.warning("Restarting Shell Not Supported")
-
-    def reload_theme(self):
-        logging.warning("Reloading Theme Not Supported")
-
-    def uninstall_extension(self, uuid):
-        return self._proxy.proxy.UninstallExtension('(s)', uuid)
-
 
 class GnomeShell36(GnomeShell34):
 
@@ -181,11 +150,6 @@ class GnomeShellFactory:
 
             if v >= [3, 5, 0]:
                 self.shell = GnomeShell36(proxy, settings)
-            elif v >= [3,3,2]:
-                self.shell = GnomeShell34(proxy, settings)
-            elif v >= [3,1,4]:
-                self.shell = GnomeShell32(proxy, settings)
-
             else:
                 logging.warn("Shell version not supported")
                 self.shell = None


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]