[chrome-gnome-shell/feature/extensions_sync] connector: allow to control multiple extensions in enableExtension action.
- From: Yuri Konotopov <ykonotopov src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chrome-gnome-shell/feature/extensions_sync] connector: allow to control multiple extensions in enableExtension action.
- Date: Thu, 11 Aug 2016 10:09:02 +0000 (UTC)
commit 1d8c74e82bc26c3b51a639903b6c42aba76e8afc
Author: Yuri Konotopov <ykonotopov gmail com>
Date: Wed Aug 10 19:29:15 2016 +0300
connector: allow to control multiple extensions in enableExtension action.
connector/chrome-gnome-shell.py | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/connector/chrome-gnome-shell.py b/connector/chrome-gnome-shell.py
index dbdfe18..7fa773b 100755
--- a/connector/chrome-gnome-shell.py
+++ b/connector/chrome-gnome-shell.py
@@ -161,16 +161,20 @@ def read_thread_func(proxy, mainLoop):
dbus_call_response("ListExtensions", None, "extensions")
elif request['execute'] == 'EnableExtension' or request['execute'] == 'enableExtension':
- uuid = request['uuid']
- enable = request['enable']
-
settings = Gio.Settings.new(SHELL_SCHEMA)
uuids = settings.get_strv(ENABLED_EXTENSIONS_KEY)
- if enable:
- uuids.append(uuid)
+ extensions = []
+ if 'extensions' in request:
+ extensions = request['extensions']
else:
- uuids.remove(uuid)
+ extensions.append({'uuid': request['uuid'], 'enable': request['enable'] })
+
+ for extension in extensions:
+ if extension['enable'] and isUUID(extension['uuid']):
+ uuids.append(extension['uuid'])
+ else:
+ uuids.remove(extension['uuid'])
settings.set_strv(ENABLED_EXTENSIONS_KEY, uuids)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]