From d4681a4c8a7833b773dfef32f56a70ee57fbc478 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Tue, 7 Apr 2015 16:20:26 +0200 Subject: [PATCH 5/8] ExtensionInstaller: load extension after installing it --- gtweak/gshellwrapper.py | 3 +++ gtweak/tweaks/tweak_group_shell_extensions.py | 9 +-------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/gtweak/gshellwrapper.py b/gtweak/gshellwrapper.py index 8c7e2ac..3212803 100644 --- a/gtweak/gshellwrapper.py +++ b/gtweak/gshellwrapper.py @@ -184,6 +184,9 @@ class GnomeShell36(GnomeShell34): 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) + def load_user_extension(self, uuid): + return self._proxy.proxy_extensions.LoadUserExtension('(s)', uuid) + def get_extension_info(self, uuid): return self._proxy.proxy_extensions.GetExtensionInfo('(s)', uuid) diff --git a/gtweak/tweaks/tweak_group_shell_extensions.py b/gtweak/tweaks/tweak_group_shell_extensions.py index c1f41d9..b791e4a 100644 --- a/gtweak/tweaks/tweak_group_shell_extensions.py +++ b/gtweak/tweaks/tweak_group_shell_extensions.py @@ -244,17 +244,10 @@ class _ShellExtensionInstallerTweak(Gtk.Box, Tweak): os.path.join(self._shell.EXTENSION_DIR, extension_uuid)) if ok: - if updated: - verb = _("%s extension updated successfully") % extension_uuid - else: - verb = _("%s extension installed successfully") % extension_uuid - - self.notify_logout() - + self._shell.load_user_extension(extension_uuid) else: self.notify_information(_("Error installing extension")) - except: #does not look like a valid theme self.notify_information(_("Invalid extension")) -- 2.9.3