js: use ES6 template strings for dbus interfaces

Use multiline template strings for dbus interfaces as they're easier to maintain
This commit is contained in:
Marco Trevisan (Treviño)
2018-08-23 02:55:02 +02:00
parent f77b3da74f
commit dbf993300a
37 changed files with 1006 additions and 945 deletions

View File

@ -51,25 +51,26 @@ var PortalHelperResult = {
RECHECK: 2
};
const PortalHelperIface = '<node> \
<interface name="org.gnome.Shell.PortalHelper"> \
<method name="Authenticate"> \
<arg type="o" direction="in" name="connection" /> \
<arg type="s" direction="in" name="url" /> \
<arg type="u" direction="in" name="timestamp" /> \
</method> \
<method name="Close"> \
<arg type="o" direction="in" name="connection" /> \
</method> \
<method name="Refresh"> \
<arg type="o" direction="in" name="connection" /> \
</method> \
<signal name="Done"> \
<arg type="o" name="connection" /> \
<arg type="u" name="result" /> \
</signal> \
</interface> \
</node>';
const PortalHelperIface = `
<node>
<interface name="org.gnome.Shell.PortalHelper">
<method name="Authenticate">
<arg type="o" direction="in" name="connection" />
<arg type="s" direction="in" name="url" />
<arg type="u" direction="in" name="timestamp" />
</method>
<method name="Close">
<arg type="o" direction="in" name="connection" />
</method>
<method name="Refresh">
<arg type="o" direction="in" name="connection" />
</method>
<signal name="Done">
<arg type="o" name="connection" />
<arg type="u" name="result" />
</signal>
</interface>
</node>`;
const PortalHelperProxy = Gio.DBusProxy.makeProxyWrapper(PortalHelperIface);
function signalToIcon(value) {