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
This commit is contained in:
Florian Müllner 2019-07-24 01:30:04 +02:00
parent 7141c5be6d
commit 532acf4c4a
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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