extensionSystem: Always enable an extension for a user
When the user installs an extension, we always enable it. Change the 'enabled-extensions' key, if necessary, to reflect this. https://bugzilla.gnome.org/show_bug.cgi?id=658612
This commit is contained in:
parent
7928f90cf6
commit
02b8804b96
@ -184,6 +184,14 @@ function gotExtensionZipFile(session, message, uuid) {
|
|||||||
|
|
||||||
GLib.child_watch_add(GLib.PRIORITY_DEFAULT, pid, function(pid, status) {
|
GLib.child_watch_add(GLib.PRIORITY_DEFAULT, pid, function(pid, status) {
|
||||||
GLib.spawn_close_pid(pid);
|
GLib.spawn_close_pid(pid);
|
||||||
|
|
||||||
|
// Add extension to 'enabled-extensions' for the user, always...
|
||||||
|
let enabledExtensions = global.settings.get_strv(ENABLED_EXTENSIONS_KEY);
|
||||||
|
if (enabledExtensions.indexOf(uuid) == -1) {
|
||||||
|
enabledExtensions.push(uuid);
|
||||||
|
global.settings.set_strv(ENABLED_EXTENSIONS_KEY, enabledExtensions);
|
||||||
|
}
|
||||||
|
|
||||||
loadExtension(dir, true, ExtensionType.PER_USER);
|
loadExtension(dir, true, ExtensionType.PER_USER);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user