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

@ -11,13 +11,14 @@ const PopupMenu = imports.ui.popupMenu;
const BUS_NAME = 'org.gnome.SettingsDaemon.Rfkill';
const OBJECT_PATH = '/org/gnome/SettingsDaemon/Rfkill';
const RfkillManagerInterface = '<node> \
<interface name="org.gnome.SettingsDaemon.Rfkill"> \
<property name="BluetoothAirplaneMode" type="b" access="readwrite" /> \
<property name="BluetoothHasAirplaneMode" type="b" access="read" /> \
<property name="BluetoothHardwareAirplaneMode" type="b" access="readwrite" /> \
</interface> \
</node>';
const RfkillManagerInterface = `
<node>
<interface name="org.gnome.SettingsDaemon.Rfkill">
<property name="BluetoothAirplaneMode" type="b" access="readwrite" />
<property name="BluetoothHasAirplaneMode" type="b" access="read" />
<property name="BluetoothHardwareAirplaneMode" type="b" access="readwrite" />
</interface>
</node>`;
const RfkillManagerProxy = Gio.DBusProxy.makeProxyWrapper(RfkillManagerInterface);