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

@ -436,38 +436,39 @@ var ShellProcessesDialog = new Lang.Class({
});
Signals.addSignalMethods(ShellProcessesDialog.prototype);
const GnomeShellMountOpIface = '<node> \
<interface name="org.Gtk.MountOperationHandler"> \
<method name="AskPassword"> \
<arg type="s" direction="in" name="object_id"/> \
<arg type="s" direction="in" name="message"/> \
<arg type="s" direction="in" name="icon_name"/> \
<arg type="s" direction="in" name="default_user"/> \
<arg type="s" direction="in" name="default_domain"/> \
<arg type="u" direction="in" name="flags"/> \
<arg type="u" direction="out" name="response"/> \
<arg type="a{sv}" direction="out" name="response_details"/> \
</method> \
<method name="AskQuestion"> \
<arg type="s" direction="in" name="object_id"/> \
<arg type="s" direction="in" name="message"/> \
<arg type="s" direction="in" name="icon_name"/> \
<arg type="as" direction="in" name="choices"/> \
<arg type="u" direction="out" name="response"/> \
<arg type="a{sv}" direction="out" name="response_details"/> \
</method> \
<method name="ShowProcesses"> \
<arg type="s" direction="in" name="object_id"/> \
<arg type="s" direction="in" name="message"/> \
<arg type="s" direction="in" name="icon_name"/> \
<arg type="ai" direction="in" name="application_pids"/> \
<arg type="as" direction="in" name="choices"/> \
<arg type="u" direction="out" name="response"/> \
<arg type="a{sv}" direction="out" name="response_details"/> \
</method> \
<method name="Close"/> \
</interface> \
</node>';
const GnomeShellMountOpIface = `
<node>
<interface name="org.Gtk.MountOperationHandler">
<method name="AskPassword">
<arg type="s" direction="in" name="object_id"/>
<arg type="s" direction="in" name="message"/>
<arg type="s" direction="in" name="icon_name"/>
<arg type="s" direction="in" name="default_user"/>
<arg type="s" direction="in" name="default_domain"/>
<arg type="u" direction="in" name="flags"/>
<arg type="u" direction="out" name="response"/>
<arg type="a{sv}" direction="out" name="response_details"/>
</method>
<method name="AskQuestion">
<arg type="s" direction="in" name="object_id"/>
<arg type="s" direction="in" name="message"/>
<arg type="s" direction="in" name="icon_name"/>
<arg type="as" direction="in" name="choices"/>
<arg type="u" direction="out" name="response"/>
<arg type="a{sv}" direction="out" name="response_details"/>
</method>
<method name="ShowProcesses">
<arg type="s" direction="in" name="object_id"/>
<arg type="s" direction="in" name="message"/>
<arg type="s" direction="in" name="icon_name"/>
<arg type="ai" direction="in" name="application_pids"/>
<arg type="as" direction="in" name="choices"/>
<arg type="u" direction="out" name="response"/>
<arg type="a{sv}" direction="out" name="response_details"/>
</method>
<method name="Close"/>
</interface>
</node>`;
var ShellMountOperationType = {
NONE: 0,