dbus: Move all interface descriptions into the resource
https://gitlab.gnome.org/GNOME/gnome-shell/issues/537
This commit is contained in:

committed by
Jonas Ådahl

parent
f42d9df3e0
commit
94423151b2
@ -36,6 +36,8 @@ const ModalDialog = imports.ui.modalDialog;
|
||||
const Tweener = imports.ui.tweener;
|
||||
const UserWidget = imports.ui.userWidget;
|
||||
|
||||
const { loadInterfaceXML } = imports.misc.fileUtils;
|
||||
|
||||
let _endSessionDialog = null;
|
||||
|
||||
const _ITEM_ICON_SIZE = 48;
|
||||
@ -43,23 +45,7 @@ const _DIALOG_ICON_SIZE = 48;
|
||||
|
||||
var GSM_SESSION_MANAGER_LOGOUT_FORCE = 2;
|
||||
|
||||
const EndSessionDialogIface = `
|
||||
<node>
|
||||
<interface name="org.gnome.SessionManager.EndSessionDialog">
|
||||
<method name="Open">
|
||||
<arg type="u" direction="in" />
|
||||
<arg type="u" direction="in" />
|
||||
<arg type="u" direction="in" />
|
||||
<arg type="ao" direction="in" />
|
||||
</method>
|
||||
<method name="Close" />
|
||||
<signal name="ConfirmedLogout" />
|
||||
<signal name="ConfirmedReboot" />
|
||||
<signal name="ConfirmedShutdown" />
|
||||
<signal name="Canceled" />
|
||||
<signal name="Closed" />
|
||||
</interface>
|
||||
</node>`;
|
||||
const EndSessionDialogIface = loadInterfaceXML('org.gnome.SessionManager.EndSessionDialog');
|
||||
|
||||
const logoutDialogContent = {
|
||||
subjectWithUser: C_("title", "Log Out %s"),
|
||||
@ -169,43 +155,13 @@ const DialogContent = {
|
||||
|
||||
var MAX_USERS_IN_SESSION_DIALOG = 5;
|
||||
|
||||
const LogindSessionIface = `
|
||||
<node>
|
||||
<interface name="org.freedesktop.login1.Session">
|
||||
<property name="Id" type="s" access="read"/>
|
||||
<property name="Remote" type="b" access="read"/>
|
||||
<property name="Class" type="s" access="read"/>
|
||||
<property name="Type" type="s" access="read"/>
|
||||
<property name="State" type="s" access="read"/>
|
||||
</interface>
|
||||
</node>`;
|
||||
|
||||
const LogindSessionIface = loadInterfaceXML('org.freedesktop.login1.Session');
|
||||
const LogindSession = Gio.DBusProxy.makeProxyWrapper(LogindSessionIface);
|
||||
|
||||
const PkOfflineIface = `
|
||||
<node>
|
||||
<interface name="org.freedesktop.PackageKit.Offline">
|
||||
<property name="UpdatePrepared" type="b" access="read"/>
|
||||
<property name="UpdateTriggered" type="b" access="read"/>
|
||||
<property name="UpgradePrepared" type="b" access="read"/>
|
||||
<property name="UpgradeTriggered" type="b" access="read"/>
|
||||
<property name="PreparedUpgrade" type="a{sv}" access="read"/>
|
||||
<method name="Trigger">
|
||||
<arg type="s" name="action" direction="in"/>
|
||||
</method>
|
||||
<method name="Cancel"/>
|
||||
</interface>
|
||||
</node>`;
|
||||
|
||||
const PkOfflineIface = loadInterfaceXML('org.freedesktop.PackageKit.Offline');
|
||||
const PkOfflineProxy = Gio.DBusProxy.makeProxyWrapper(PkOfflineIface);
|
||||
|
||||
const UPowerIface = `
|
||||
<node>
|
||||
<interface name="org.freedesktop.UPower">
|
||||
<property name="OnBattery" type="b" access="read"/>
|
||||
</interface>
|
||||
</node>`;
|
||||
|
||||
const UPowerIface = loadInterfaceXML('org.freedesktop.UPower');
|
||||
const UPowerProxy = Gio.DBusProxy.makeProxyWrapper(UPowerIface);
|
||||
|
||||
function findAppFromInhibitor(inhibitor) {
|
||||
|
Reference in New Issue
Block a user