shellDBus: Add ListExtensions() and GetExtensionInfo()
GetExtensionInfo() takes a UUID and returns a JSON object with information about that extension including their metadata, path and current state. ListExtensions() takes no arguments and returns a JSON object mapping UUIDs to the same information objects described above. https://bugzilla.gnome.org/show_bug.cgi?id=654770
This commit is contained in:
parent
ff983432d9
commit
fc59e222d2
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
const DBus = imports.dbus;
|
const DBus = imports.dbus;
|
||||||
|
|
||||||
|
const ExtensionSystem = imports.ui.extensionSystem;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
|
|
||||||
const GnomeShellIface = {
|
const GnomeShellIface = {
|
||||||
@ -9,7 +10,15 @@ const GnomeShellIface = {
|
|||||||
methods: [{ name: 'Eval',
|
methods: [{ name: 'Eval',
|
||||||
inSignature: 's',
|
inSignature: 's',
|
||||||
outSignature: 'bs'
|
outSignature: 'bs'
|
||||||
}
|
},
|
||||||
|
{ name: 'ListExtensions',
|
||||||
|
inSignature: '',
|
||||||
|
outSignature: 'a{sa{sv}}'
|
||||||
|
},
|
||||||
|
{ name: 'GetExtensionInfo',
|
||||||
|
inSignature: 's',
|
||||||
|
outSignature: 'a{sv}'
|
||||||
|
},
|
||||||
],
|
],
|
||||||
signals: [],
|
signals: [],
|
||||||
properties: [{ name: 'OverviewActive',
|
properties: [{ name: 'OverviewActive',
|
||||||
@ -56,6 +65,14 @@ GnomeShell.prototype = {
|
|||||||
return [success, returnValue];
|
return [success, returnValue];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
ListExtensions: function() {
|
||||||
|
return ExtensionSystem.extensionMeta;
|
||||||
|
},
|
||||||
|
|
||||||
|
GetExtensionInfo: function(uuid) {
|
||||||
|
return ExtensionSystem.extensionMeta[uuid] || {};
|
||||||
|
},
|
||||||
|
|
||||||
get OverviewActive() {
|
get OverviewActive() {
|
||||||
return Main.overview.visible;
|
return Main.overview.visible;
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user