From 92b3fbafb7a4f43761dfc3469f20c7fad0cf99d0 Mon Sep 17 00:00:00 2001 From: John Stowers Date: Sun, 20 Nov 2011 22:54:58 +1300 Subject: [PATCH] Fix compatibility with gnome-shell master --- gtweak/gshellwrapper.py | 4 +++- gtweak/tweaks/tweak_shell_extensions.py | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gtweak/gshellwrapper.py b/gtweak/gshellwrapper.py index 4c4ef81..254d246 100644 --- a/gtweak/gshellwrapper.py +++ b/gtweak/gshellwrapper.py @@ -51,7 +51,9 @@ class GnomeShell: "ENABLED" : 1, "DISABLED" : 2, "ERROR" : 3, - "OUT_OF_DATE" : 4 + "OUT_OF_DATE" : 4, + "DOWNLOADING" : 5, + "INITIALIZED" : 6, } EXTENSION_TYPE = { diff --git a/gtweak/tweaks/tweak_shell_extensions.py b/gtweak/tweaks/tweak_shell_extensions.py index a453f33..7f883bc 100644 --- a/gtweak/tweaks/tweak_shell_extensions.py +++ b/gtweak/tweaks/tweak_shell_extensions.py @@ -24,11 +24,15 @@ class _ShellExtensionTweak(Tweak): sw.set_active(self._shell.extension_is_active(state, ext["uuid"])) sw.connect('notify::active', self._on_extension_toggled, ext["uuid"]) + info = None warning = None sensitive = False if state == GnomeShell.EXTENSION_STATE["ENABLED"] or \ - state == GnomeShell.EXTENSION_STATE["DISABLED"]: + state == GnomeShell.EXTENSION_STATE["DISABLED"] or \ + state == GnomeShell.EXTENSION_STATE["INITIALIZED"]: sensitive = True + elif state == GnomeShell.EXTENSION_STATE["DOWNLOADING"]: + info = _("Extension downloading") elif state == GnomeShell.EXTENSION_STATE["ERROR"]: warning = _("Error loading extension") elif state == GnomeShell.EXTENSION_STATE["OUT_OF_DATE"]: -- 1.7.8.3