[gnome-shell] extensions-tool: Adjust enable/disable commands to shell changes



commit 532acf4c4a7e31f835256f67c3b011eed038ba4f
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Jul 24 01:30:04 2019 +0200

    extensions-tool: Adjust enable/disable commands to shell changes
    
    Change both 'enabled-extensions' and 'disabled-extensions' keys as in
    commit ce1bee727. While those actions are now also exposed by the
    shell's D-Bus API, there is some value in allowing the tool to be used
    outside a running GNOME session (for example in setup scripts), so
    keep changing the GSettings keys directly.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/issues/1234

 src/extensions-tool/command-disable.c | 3 ++-
 src/extensions-tool/command-enable.c  | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/extensions-tool/command-disable.c b/src/extensions-tool/command-disable.c
index 9c50e1a3dd..aa8efab5bc 100644
--- a/src/extensions-tool/command-disable.c
+++ b/src/extensions-tool/command-disable.c
@@ -33,7 +33,8 @@ disable_extension (const char *uuid)
   if (settings == NULL)
     return FALSE;
 
-  return settings_list_remove (settings, "enabled-extensions", uuid);
+  return settings_list_remove (settings, "enabled-extensions", uuid) &&
+         settings_list_add (settings, "disabled-extensions", uuid);
 }
 
 int
diff --git a/src/extensions-tool/command-enable.c b/src/extensions-tool/command-enable.c
index 2358f8ba2a..c790ec95f3 100644
--- a/src/extensions-tool/command-enable.c
+++ b/src/extensions-tool/command-enable.c
@@ -33,7 +33,8 @@ enable_extension (const char *uuid)
   if (settings == NULL)
     return FALSE;
 
-  return settings_list_add (settings, "enabled-extensions", uuid);
+  return settings_list_add (settings, "enabled-extensions", uuid) &&
+         settings_list_remove (settings, "disabled-extensions", uuid);
 }
 
 int


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