From 94423151b2e1f5e2ee8ccc884c52f50673db5fb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 6 Sep 2018 02:55:20 +0200 Subject: [PATCH] dbus: Move all interface descriptions into the resource https://gitlab.gnome.org/GNOME/gnome-shell/issues/537 --- .../net.hadess.SensorProxy.xml | 5 + .../net.hadess.SwitcherooControl.xml | 5 + .../org.Gtk.MountOperationHandler.xml | 32 ++++++ .../org.freedesktop.Application.xml | 12 ++ data/dbus-interfaces/org.freedesktop.DBus.xml | 16 +++ .../org.freedesktop.GeoClue2.Agent.xml | 11 ++ .../org.freedesktop.GeoClue2.Manager.xml | 9 ++ ...rg.freedesktop.ModemManager.Modem.Cdma.xml | 13 +++ ...desktop.ModemManager.Modem.Gsm.Network.xml | 19 ++++ ...edesktop.ModemManager1.Modem.Modem3gpp.xml | 6 + ...edesktop.ModemManager1.Modem.ModemCdma.xml | 5 + .../org.freedesktop.ModemManager1.Modem.xml | 5 + .../org.freedesktop.Notifications.xml | 35 ++++++ .../org.freedesktop.PackageKit.Offline.xml | 13 +++ .../org.freedesktop.UPower.Device.xml | 11 ++ .../org.freedesktop.UPower.xml | 5 + .../org.freedesktop.bolt1.Device.xml | 18 +++ .../org.freedesktop.bolt1.Manager.xml | 15 +++ .../org.freedesktop.impl.portal.Access.xml | 15 +++ ...reedesktop.impl.portal.PermissionStore.xml | 24 ++++ .../org.freedesktop.impl.portal.Request.xml | 5 + .../org.freedesktop.login1.Manager.xml | 27 +++++ .../org.freedesktop.login1.Session.xml | 15 +++ .../org.freedesktop.login1.User.xml | 6 + .../org.freedesktop.realmd.Provider.xml | 13 +++ .../org.freedesktop.realmd.Realm.xml | 20 ++++ .../org.freedesktop.realmd.Service.xml | 15 +++ .../org.gnome.Magnifier.ZoomRegion.xml | 26 +++++ data/dbus-interfaces/org.gnome.Magnifier.xml | 54 +++++++++ .../dbus-interfaces/org.gnome.ScreenSaver.xml | 18 +++ ....gnome.SessionManager.EndSessionDialog.xml | 16 +++ .../org.gnome.SessionManager.Inhibitor.xml | 10 ++ .../org.gnome.SessionManager.Presence.xml | 11 ++ .../org.gnome.SessionManager.xml | 23 ++++ .../org.gnome.SettingsDaemon.Color.xml | 6 + .../org.gnome.SettingsDaemon.Power.Screen.xml | 5 + .../org.gnome.SettingsDaemon.Rfkill.xml | 10 ++ .../org.gnome.SettingsDaemon.Wacom.xml | 13 +++ .../org.gnome.Shell.AudioDeviceSelection.xml | 12 ++ .../org.gnome.Shell.HotplugSniffer.xml | 8 ++ .../org.gnome.Shell.PerfHelper.xml | 13 +++ .../org.gnome.Shell.PortalHelper.xml | 19 ++++ .../org.gnome.Shell.Wacom.PadOsd.xml | 8 ++ data/dbus-interfaces/org.gnome.Shell.xml | 44 +++++++ .../dbus-interfaces/org.gtk.Notifications.xml | 13 +++ .../org.mpris.MediaPlayer2.Player.xml | 12 ++ .../org.mpris.MediaPlayer2.xml | 7 ++ .../gnome-shell-dbus-interfaces.gresource.xml | 50 ++++++++ js/extensionPrefs/main.js | 13 +-- js/gdm/realmd.js | 56 +-------- js/misc/gnomeSession.js | 54 +-------- js/misc/loginManager.js | 53 +-------- js/misc/modemManager.js | 62 ++-------- js/misc/permissionStore.js | 27 +---- js/misc/systemActions.js | 9 +- js/portal-resources.gresource.xml | 1 + js/portalHelper/main.js | 22 +--- js/ui/accessDialog.js | 25 +--- js/ui/appDisplay.js | 10 +- js/ui/audioDeviceSelection.js | 16 +-- js/ui/components/autorunManager.js | 13 +-- js/ui/endSessionDialog.js | 56 +-------- js/ui/magnifierDBus.js | 86 +------------- js/ui/mpris.js | 39 +------ js/ui/notificationDaemon.js | 79 +------------ js/ui/padOsd.js | 12 +- js/ui/screencast.js | 27 +---- js/ui/screenshot.js | 48 +------- js/ui/scripting.js | 18 +-- js/ui/shellDBus.js | 107 +----------------- js/ui/shellMountOperation.js | 36 +----- js/ui/status/bluetooth.js | 12 +- js/ui/status/brightness.js | 10 +- js/ui/status/location.js | 27 +---- js/ui/status/network.js | 23 +--- js/ui/status/nightLight.js | 11 +- js/ui/status/power.js | 16 +-- js/ui/status/rfkill.js | 12 +- js/ui/status/thunderbolt.js | 40 +------ js/ui/windowManager.js | 18 +-- 80 files changed, 865 insertions(+), 926 deletions(-) create mode 100644 data/dbus-interfaces/net.hadess.SensorProxy.xml create mode 100644 data/dbus-interfaces/net.hadess.SwitcherooControl.xml create mode 100644 data/dbus-interfaces/org.Gtk.MountOperationHandler.xml create mode 100644 data/dbus-interfaces/org.freedesktop.Application.xml create mode 100644 data/dbus-interfaces/org.freedesktop.DBus.xml create mode 100644 data/dbus-interfaces/org.freedesktop.GeoClue2.Agent.xml create mode 100644 data/dbus-interfaces/org.freedesktop.GeoClue2.Manager.xml create mode 100644 data/dbus-interfaces/org.freedesktop.ModemManager.Modem.Cdma.xml create mode 100644 data/dbus-interfaces/org.freedesktop.ModemManager.Modem.Gsm.Network.xml create mode 100644 data/dbus-interfaces/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml create mode 100644 data/dbus-interfaces/org.freedesktop.ModemManager1.Modem.ModemCdma.xml create mode 100644 data/dbus-interfaces/org.freedesktop.ModemManager1.Modem.xml create mode 100644 data/dbus-interfaces/org.freedesktop.Notifications.xml create mode 100644 data/dbus-interfaces/org.freedesktop.PackageKit.Offline.xml create mode 100644 data/dbus-interfaces/org.freedesktop.UPower.Device.xml create mode 100644 data/dbus-interfaces/org.freedesktop.UPower.xml create mode 100644 data/dbus-interfaces/org.freedesktop.bolt1.Device.xml create mode 100644 data/dbus-interfaces/org.freedesktop.bolt1.Manager.xml create mode 100644 data/dbus-interfaces/org.freedesktop.impl.portal.Access.xml create mode 100644 data/dbus-interfaces/org.freedesktop.impl.portal.PermissionStore.xml create mode 100644 data/dbus-interfaces/org.freedesktop.impl.portal.Request.xml create mode 100644 data/dbus-interfaces/org.freedesktop.login1.Manager.xml create mode 100644 data/dbus-interfaces/org.freedesktop.login1.Session.xml create mode 100644 data/dbus-interfaces/org.freedesktop.login1.User.xml create mode 100644 data/dbus-interfaces/org.freedesktop.realmd.Provider.xml create mode 100644 data/dbus-interfaces/org.freedesktop.realmd.Realm.xml create mode 100644 data/dbus-interfaces/org.freedesktop.realmd.Service.xml create mode 100644 data/dbus-interfaces/org.gnome.Magnifier.ZoomRegion.xml create mode 100644 data/dbus-interfaces/org.gnome.Magnifier.xml create mode 100644 data/dbus-interfaces/org.gnome.ScreenSaver.xml create mode 100644 data/dbus-interfaces/org.gnome.SessionManager.EndSessionDialog.xml create mode 100644 data/dbus-interfaces/org.gnome.SessionManager.Inhibitor.xml create mode 100644 data/dbus-interfaces/org.gnome.SessionManager.Presence.xml create mode 100644 data/dbus-interfaces/org.gnome.SessionManager.xml create mode 100644 data/dbus-interfaces/org.gnome.SettingsDaemon.Color.xml create mode 100644 data/dbus-interfaces/org.gnome.SettingsDaemon.Power.Screen.xml create mode 100644 data/dbus-interfaces/org.gnome.SettingsDaemon.Rfkill.xml create mode 100644 data/dbus-interfaces/org.gnome.SettingsDaemon.Wacom.xml create mode 100644 data/dbus-interfaces/org.gnome.Shell.AudioDeviceSelection.xml create mode 100644 data/dbus-interfaces/org.gnome.Shell.HotplugSniffer.xml create mode 100644 data/dbus-interfaces/org.gnome.Shell.PerfHelper.xml create mode 100644 data/dbus-interfaces/org.gnome.Shell.PortalHelper.xml create mode 100644 data/dbus-interfaces/org.gnome.Shell.Wacom.PadOsd.xml create mode 100644 data/dbus-interfaces/org.gnome.Shell.xml create mode 100644 data/dbus-interfaces/org.gtk.Notifications.xml create mode 100644 data/dbus-interfaces/org.mpris.MediaPlayer2.Player.xml create mode 100644 data/dbus-interfaces/org.mpris.MediaPlayer2.xml diff --git a/data/dbus-interfaces/net.hadess.SensorProxy.xml b/data/dbus-interfaces/net.hadess.SensorProxy.xml new file mode 100644 index 000000000..2bf8ffa4d --- /dev/null +++ b/data/dbus-interfaces/net.hadess.SensorProxy.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/data/dbus-interfaces/net.hadess.SwitcherooControl.xml b/data/dbus-interfaces/net.hadess.SwitcherooControl.xml new file mode 100644 index 000000000..792af08f3 --- /dev/null +++ b/data/dbus-interfaces/net.hadess.SwitcherooControl.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/data/dbus-interfaces/org.Gtk.MountOperationHandler.xml b/data/dbus-interfaces/org.Gtk.MountOperationHandler.xml new file mode 100644 index 000000000..8b03a2eea --- /dev/null +++ b/data/dbus-interfaces/org.Gtk.MountOperationHandler.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.Application.xml b/data/dbus-interfaces/org.freedesktop.Application.xml new file mode 100644 index 000000000..55be7d79f --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.Application.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.DBus.xml b/data/dbus-interfaces/org.freedesktop.DBus.xml new file mode 100644 index 000000000..18ff2aa82 --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.DBus.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.GeoClue2.Agent.xml b/data/dbus-interfaces/org.freedesktop.GeoClue2.Agent.xml new file mode 100644 index 000000000..27736016c --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.GeoClue2.Agent.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.GeoClue2.Manager.xml b/data/dbus-interfaces/org.freedesktop.GeoClue2.Manager.xml new file mode 100644 index 000000000..28db3c637 --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.GeoClue2.Manager.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.ModemManager.Modem.Cdma.xml b/data/dbus-interfaces/org.freedesktop.ModemManager.Modem.Cdma.xml new file mode 100644 index 000000000..12a85e065 --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.ModemManager.Modem.Cdma.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.ModemManager.Modem.Gsm.Network.xml b/data/dbus-interfaces/org.freedesktop.ModemManager.Modem.Gsm.Network.xml new file mode 100644 index 000000000..7d8c25a6c --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.ModemManager.Modem.Gsm.Network.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml b/data/dbus-interfaces/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml new file mode 100644 index 000000000..41e6601a1 --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.ModemManager1.Modem.ModemCdma.xml b/data/dbus-interfaces/org.freedesktop.ModemManager1.Modem.ModemCdma.xml new file mode 100644 index 000000000..d02925275 --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.ModemManager1.Modem.ModemCdma.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.ModemManager1.Modem.xml b/data/dbus-interfaces/org.freedesktop.ModemManager1.Modem.xml new file mode 100644 index 000000000..204426b44 --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.ModemManager1.Modem.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.Notifications.xml b/data/dbus-interfaces/org.freedesktop.Notifications.xml new file mode 100644 index 000000000..0ed865743 --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.Notifications.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.PackageKit.Offline.xml b/data/dbus-interfaces/org.freedesktop.PackageKit.Offline.xml new file mode 100644 index 000000000..ff6116621 --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.PackageKit.Offline.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.UPower.Device.xml b/data/dbus-interfaces/org.freedesktop.UPower.Device.xml new file mode 100644 index 000000000..488228505 --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.UPower.Device.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.UPower.xml b/data/dbus-interfaces/org.freedesktop.UPower.xml new file mode 100644 index 000000000..a0fba2017 --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.UPower.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.bolt1.Device.xml b/data/dbus-interfaces/org.freedesktop.bolt1.Device.xml new file mode 100644 index 000000000..44b40dccf --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.bolt1.Device.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.bolt1.Manager.xml b/data/dbus-interfaces/org.freedesktop.bolt1.Manager.xml new file mode 100644 index 000000000..c98a94fc5 --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.bolt1.Manager.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.impl.portal.Access.xml b/data/dbus-interfaces/org.freedesktop.impl.portal.Access.xml new file mode 100644 index 000000000..802a2c15d --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.impl.portal.Access.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.impl.portal.PermissionStore.xml b/data/dbus-interfaces/org.freedesktop.impl.portal.PermissionStore.xml new file mode 100644 index 000000000..75fbc468a --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.impl.portal.PermissionStore.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.impl.portal.Request.xml b/data/dbus-interfaces/org.freedesktop.impl.portal.Request.xml new file mode 100644 index 000000000..a9d03ebe5 --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.impl.portal.Request.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.login1.Manager.xml b/data/dbus-interfaces/org.freedesktop.login1.Manager.xml new file mode 100644 index 000000000..647afc6cf --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.login1.Manager.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.login1.Session.xml b/data/dbus-interfaces/org.freedesktop.login1.Session.xml new file mode 100644 index 000000000..6fab81794 --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.login1.Session.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.login1.User.xml b/data/dbus-interfaces/org.freedesktop.login1.User.xml new file mode 100644 index 000000000..d6f10b072 --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.login1.User.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.realmd.Provider.xml b/data/dbus-interfaces/org.freedesktop.realmd.Provider.xml new file mode 100644 index 000000000..2fdb045af --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.realmd.Provider.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.realmd.Realm.xml b/data/dbus-interfaces/org.freedesktop.realmd.Realm.xml new file mode 100644 index 000000000..351066d2e --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.realmd.Realm.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.freedesktop.realmd.Service.xml b/data/dbus-interfaces/org.freedesktop.realmd.Service.xml new file mode 100644 index 000000000..4ffb7e742 --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.realmd.Service.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.gnome.Magnifier.ZoomRegion.xml b/data/dbus-interfaces/org.gnome.Magnifier.ZoomRegion.xml new file mode 100644 index 000000000..5db2734d0 --- /dev/null +++ b/data/dbus-interfaces/org.gnome.Magnifier.ZoomRegion.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.gnome.Magnifier.xml b/data/dbus-interfaces/org.gnome.Magnifier.xml new file mode 100644 index 000000000..2ade4dd34 --- /dev/null +++ b/data/dbus-interfaces/org.gnome.Magnifier.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.gnome.ScreenSaver.xml b/data/dbus-interfaces/org.gnome.ScreenSaver.xml new file mode 100644 index 000000000..5a2ca98b1 --- /dev/null +++ b/data/dbus-interfaces/org.gnome.ScreenSaver.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.gnome.SessionManager.EndSessionDialog.xml b/data/dbus-interfaces/org.gnome.SessionManager.EndSessionDialog.xml new file mode 100644 index 000000000..3a57aa4a3 --- /dev/null +++ b/data/dbus-interfaces/org.gnome.SessionManager.EndSessionDialog.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.gnome.SessionManager.Inhibitor.xml b/data/dbus-interfaces/org.gnome.SessionManager.Inhibitor.xml new file mode 100644 index 000000000..c745f8191 --- /dev/null +++ b/data/dbus-interfaces/org.gnome.SessionManager.Inhibitor.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/data/dbus-interfaces/org.gnome.SessionManager.Presence.xml b/data/dbus-interfaces/org.gnome.SessionManager.Presence.xml new file mode 100644 index 000000000..78bc6041e --- /dev/null +++ b/data/dbus-interfaces/org.gnome.SessionManager.Presence.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.gnome.SessionManager.xml b/data/dbus-interfaces/org.gnome.SessionManager.xml new file mode 100644 index 000000000..c81c90f08 --- /dev/null +++ b/data/dbus-interfaces/org.gnome.SessionManager.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.gnome.SettingsDaemon.Color.xml b/data/dbus-interfaces/org.gnome.SettingsDaemon.Color.xml new file mode 100644 index 000000000..1528f9032 --- /dev/null +++ b/data/dbus-interfaces/org.gnome.SettingsDaemon.Color.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/data/dbus-interfaces/org.gnome.SettingsDaemon.Power.Screen.xml b/data/dbus-interfaces/org.gnome.SettingsDaemon.Power.Screen.xml new file mode 100644 index 000000000..05e4b8dc0 --- /dev/null +++ b/data/dbus-interfaces/org.gnome.SettingsDaemon.Power.Screen.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/data/dbus-interfaces/org.gnome.SettingsDaemon.Rfkill.xml b/data/dbus-interfaces/org.gnome.SettingsDaemon.Rfkill.xml new file mode 100644 index 000000000..628b17ff9 --- /dev/null +++ b/data/dbus-interfaces/org.gnome.SettingsDaemon.Rfkill.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/data/dbus-interfaces/org.gnome.SettingsDaemon.Wacom.xml b/data/dbus-interfaces/org.gnome.SettingsDaemon.Wacom.xml new file mode 100644 index 000000000..13702141c --- /dev/null +++ b/data/dbus-interfaces/org.gnome.SettingsDaemon.Wacom.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.gnome.Shell.AudioDeviceSelection.xml b/data/dbus-interfaces/org.gnome.Shell.AudioDeviceSelection.xml new file mode 100644 index 000000000..28cc6da39 --- /dev/null +++ b/data/dbus-interfaces/org.gnome.Shell.AudioDeviceSelection.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.gnome.Shell.HotplugSniffer.xml b/data/dbus-interfaces/org.gnome.Shell.HotplugSniffer.xml new file mode 100644 index 000000000..b4373cc79 --- /dev/null +++ b/data/dbus-interfaces/org.gnome.Shell.HotplugSniffer.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/data/dbus-interfaces/org.gnome.Shell.PerfHelper.xml b/data/dbus-interfaces/org.gnome.Shell.PerfHelper.xml new file mode 100644 index 000000000..98fea27e9 --- /dev/null +++ b/data/dbus-interfaces/org.gnome.Shell.PerfHelper.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.gnome.Shell.PortalHelper.xml b/data/dbus-interfaces/org.gnome.Shell.PortalHelper.xml new file mode 100644 index 000000000..8c6a13ebd --- /dev/null +++ b/data/dbus-interfaces/org.gnome.Shell.PortalHelper.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.gnome.Shell.Wacom.PadOsd.xml b/data/dbus-interfaces/org.gnome.Shell.Wacom.PadOsd.xml new file mode 100644 index 000000000..5e046c76c --- /dev/null +++ b/data/dbus-interfaces/org.gnome.Shell.Wacom.PadOsd.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/data/dbus-interfaces/org.gnome.Shell.xml b/data/dbus-interfaces/org.gnome.Shell.xml new file mode 100644 index 000000000..233c5e105 --- /dev/null +++ b/data/dbus-interfaces/org.gnome.Shell.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.gtk.Notifications.xml b/data/dbus-interfaces/org.gtk.Notifications.xml new file mode 100644 index 000000000..e2461fff8 --- /dev/null +++ b/data/dbus-interfaces/org.gtk.Notifications.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.mpris.MediaPlayer2.Player.xml b/data/dbus-interfaces/org.mpris.MediaPlayer2.Player.xml new file mode 100644 index 000000000..550cb4c5f --- /dev/null +++ b/data/dbus-interfaces/org.mpris.MediaPlayer2.Player.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/data/dbus-interfaces/org.mpris.MediaPlayer2.xml b/data/dbus-interfaces/org.mpris.MediaPlayer2.xml new file mode 100644 index 000000000..5febaf90b --- /dev/null +++ b/data/dbus-interfaces/org.mpris.MediaPlayer2.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/data/gnome-shell-dbus-interfaces.gresource.xml b/data/gnome-shell-dbus-interfaces.gresource.xml index bc637eefd..5183672c9 100644 --- a/data/gnome-shell-dbus-interfaces.gresource.xml +++ b/data/gnome-shell-dbus-interfaces.gresource.xml @@ -1,5 +1,55 @@ + net.hadess.SensorProxy.xml + net.hadess.SwitcherooControl.xml + org.freedesktop.Application.xml + org.freedesktop.bolt1.Device.xml + org.freedesktop.bolt1.Manager.xml + org.freedesktop.DBus.xml + org.freedesktop.GeoClue2.Agent.xml + org.freedesktop.GeoClue2.Manager.xml + org.freedesktop.impl.portal.Access.xml + org.freedesktop.impl.portal.PermissionStore.xml + org.freedesktop.impl.portal.Request.xml + org.freedesktop.login1.Manager.xml + org.freedesktop.login1.Session.xml + org.freedesktop.login1.User.xml + org.freedesktop.ModemManager1.Modem.Modem3gpp.xml + org.freedesktop.ModemManager1.Modem.ModemCdma.xml + org.freedesktop.ModemManager1.Modem.xml + org.freedesktop.ModemManager.Modem.Cdma.xml + org.freedesktop.ModemManager.Modem.Gsm.Network.xml + org.freedesktop.Notifications.xml + org.freedesktop.PackageKit.Offline.xml + org.freedesktop.realmd.Provider.xml + org.freedesktop.realmd.Realm.xml + org.freedesktop.realmd.Service.xml + org.freedesktop.UPower.Device.xml + org.freedesktop.UPower.xml + org.gnome.Magnifier.xml + org.gnome.Magnifier.ZoomRegion.xml + org.gnome.ScreenSaver.xml + org.gnome.SessionManager.EndSessionDialog.xml + org.gnome.SessionManager.Inhibitor.xml + org.gnome.SessionManager.Presence.xml + org.gnome.SessionManager.xml + org.gnome.SettingsDaemon.Color.xml + org.gnome.SettingsDaemon.Power.Screen.xml + org.gnome.SettingsDaemon.Rfkill.xml + org.gnome.SettingsDaemon.Wacom.xml + org.gnome.Shell.AudioDeviceSelection.xml + org.gnome.Shell.Extensions.xml + org.gnome.Shell.HotplugSniffer.xml + org.gnome.Shell.PerfHelper.xml + org.gnome.Shell.PortalHelper.xml + org.gnome.Shell.Screencast.xml + org.gnome.Shell.Screenshot.xml + org.gnome.Shell.Wacom.PadOsd.xml + org.gnome.Shell.xml + org.Gtk.MountOperationHandler.xml + org.gtk.Notifications.xml + org.mpris.MediaPlayer2.Player.xml + org.mpris.MediaPlayer2.xml diff --git a/js/extensionPrefs/main.js b/js/extensionPrefs/main.js index 80b8d5cda..7660856f5 100644 --- a/js/extensionPrefs/main.js +++ b/js/extensionPrefs/main.js @@ -13,18 +13,9 @@ const _ = Gettext.gettext; const Config = imports.misc.config; const ExtensionUtils = imports.misc.extensionUtils; +const { loadInterfaceXML } = imports.misc.fileUtils; -const GnomeShellIface = ` - - - - - - - - -`; - +const GnomeShellIface = loadInterfaceXML('org.gnome.Shell.Extensions'); const GnomeShellProxy = Gio.DBusProxy.makeProxyWrapper(GnomeShellIface); function stripPrefix(string, prefix) { diff --git a/js/gdm/realmd.js b/js/gdm/realmd.js index ae87aa193..7b1fb907d 100644 --- a/js/gdm/realmd.js +++ b/js/gdm/realmd.js @@ -5,61 +5,15 @@ const Lang = imports.lang; const Shell = imports.gi.Shell; const Signals = imports.signals; -const ProviderIface = ` - - - - - - - - - - - - -`; +const { loadInterfaceXML } = imports.misc.fileUtils; + +const ProviderIface = loadInterfaceXML("org.freedesktop.realmd.Provider"); const Provider = Gio.DBusProxy.makeProxyWrapper(ProviderIface); -const ServiceIface = ` - - - - - - - - - - - - - - -`; +const ServiceIface = loadInterfaceXML("org.freedesktop.realmd.Service"); const Service = Gio.DBusProxy.makeProxyWrapper(ServiceIface); -const RealmIface = ` - - - - - - - - - - - - - - - - - - - -`; +const RealmIface = loadInterfaceXML("org.freedesktop.realmd.Realm"); const Realm = Gio.DBusProxy.makeProxyWrapper(RealmIface); var Manager = new Lang.Class({ diff --git a/js/misc/gnomeSession.js b/js/misc/gnomeSession.js index 15a22023b..d747aadf6 100644 --- a/js/misc/gnomeSession.js +++ b/js/misc/gnomeSession.js @@ -4,18 +4,9 @@ const Gio = imports.gi.Gio; const Lang = imports.lang; const Signals = imports.signals; -const PresenceIface = ` - - - - - - - - - - -`; +const { loadInterfaceXML } = imports.misc.fileUtils; + +const PresenceIface = loadInterfaceXML('org.gnome.SessionManager.Presence'); var PresenceStatus = { AVAILABLE: 0, @@ -33,49 +24,14 @@ function Presence(initCallback, cancellable) { // Note inhibitors are immutable objects, so they don't // change at runtime (changes always come in the form // of new inhibitors) -const InhibitorIface = ` - - - - - - - - - -`; - +const InhibitorIface = loadInterfaceXML('org.gnome.SessionManager.Inhibitor'); var InhibitorProxy = Gio.DBusProxy.makeProxyWrapper(InhibitorIface); function Inhibitor(objectPath, initCallback, cancellable) { return new InhibitorProxy(Gio.DBus.session, 'org.gnome.SessionManager', objectPath, initCallback, cancellable); } // Not the full interface, only the methods we use -const SessionManagerIface = ` - - - - - - - - - - - - - - - - - - - - - - -`; - +const SessionManagerIface = loadInterfaceXML('org.gnome.SessionManager'); var SessionManagerProxy = Gio.DBusProxy.makeProxyWrapper(SessionManagerIface); function SessionManager(initCallback, cancellable) { return new SessionManagerProxy(Gio.DBus.session, 'org.gnome.SessionManager', '/org/gnome/SessionManager', initCallback, cancellable); diff --git a/js/misc/loginManager.js b/js/misc/loginManager.js index b5891a383..d3868184e 100644 --- a/js/misc/loginManager.js +++ b/js/misc/loginManager.js @@ -7,56 +7,11 @@ const Mainloop = imports.mainloop; const Shell = imports.gi.Shell; const Signals = imports.signals; -const SystemdLoginManagerIface = ` - - - - - - - - - - - - - - - - - - - - - - - - - - -`; +const { loadInterfaceXML } = imports.misc.fileUtils; -const SystemdLoginSessionIface = ` - - - - - - - - - - - -`; - -const SystemdLoginUserIface = ` - - - - - -`; +const SystemdLoginManagerIface = loadInterfaceXML('org.freedesktop.login1.Manager'); +const SystemdLoginSessionIface = loadInterfaceXML('org.freedesktop.login1.Session'); +const SystemdLoginUserIface = loadInterfaceXML('org.freedesktop.login1.User'); const SystemdLoginManager = Gio.DBusProxy.makeProxyWrapper(SystemdLoginManagerIface); const SystemdLoginSession = Gio.DBusProxy.makeProxyWrapper(SystemdLoginSessionIface); diff --git a/js/misc/modemManager.js b/js/misc/modemManager.js index c47393781..f57057848 100644 --- a/js/misc/modemManager.js +++ b/js/misc/modemManager.js @@ -5,6 +5,8 @@ const Lang = imports.lang; const NMA = imports.gi.NMA; const Signals = imports.signals; +const { loadInterfaceXML } = imports.misc.fileUtils; + // _getMobileProvidersDatabase: // // Gets the database of mobile providers, with references between MCCMNC/SID and @@ -92,44 +94,10 @@ function _findProviderForSid(sid) { // The following are not the complete interfaces, just the methods we need // (or may need in the future) -const ModemGsmNetworkInterface = ` - - - - - - - - - - - - - - - - - - -`; - +const ModemGsmNetworkInterface = loadInterfaceXML('org.freedesktop.ModemManager.Modem.Gsm.Network'); const ModemGsmNetworkProxy = Gio.DBusProxy.makeProxyWrapper(ModemGsmNetworkInterface); -const ModemCdmaInterface = ` - - - - - - - - - - - - -`; - +const ModemCdmaInterface = loadInterfaceXML('org.freedesktop.ModemManager.Modem.Cdma'); const ModemCdmaProxy = Gio.DBusProxy.makeProxyWrapper(ModemCdmaInterface); var ModemGsm = new Lang.Class({ @@ -224,29 +192,13 @@ Signals.addSignalMethods(ModemCdma.prototype); // Support for the new ModemManager1 interface (MM >= 0.7) //------------------------------------------------------------------------------ -const BroadbandModemInterface = ` - - - - -`; +const BroadbandModemInterface = loadInterfaceXML('org.freedesktop.ModemManager1.Modem'); const BroadbandModemProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModemInterface); -const BroadbandModem3gppInterface = ` - - - - - -`; +const BroadbandModem3gppInterface = loadInterfaceXML('org.freedesktop.ModemManager1.Modem.Modem3gpp'); const BroadbandModem3gppProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModem3gppInterface); -const BroadbandModemCdmaInterface = ` - - - - -`; +const BroadbandModemCdmaInterface = loadInterfaceXML('org.freedesktop.ModemManager1.Modem.ModemCdma'); const BroadbandModemCdmaProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModemCdmaInterface); var BroadbandModem = new Lang.Class({ diff --git a/js/misc/permissionStore.js b/js/misc/permissionStore.js index 6126e1fe4..9118d4d3f 100644 --- a/js/misc/permissionStore.js +++ b/js/misc/permissionStore.js @@ -2,32 +2,9 @@ const Gio = imports.gi.Gio; -const PermissionStoreIface = ` - - - - - - - - - - - - - - - - - - - - - - - -`; +const { loadInterfaceXML } = imports.misc.fileUtils; +const PermissionStoreIface = loadInterfaceXML('org.freedesktop.impl.portal.PermissionStore'); const PermissionStoreProxy = Gio.DBusProxy.makeProxyWrapper(PermissionStoreIface); function PermissionStore(initCallback, cancellable) { diff --git a/js/misc/systemActions.js b/js/misc/systemActions.js index 434dd9555..3c1713745 100644 --- a/js/misc/systemActions.js +++ b/js/misc/systemActions.js @@ -11,6 +11,8 @@ const GnomeSession = imports.misc.gnomeSession; const LoginManager = imports.misc.loginManager; const Main = imports.ui.main; +const { loadInterfaceXML } = imports.misc.fileUtils; + const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown'; const LOGIN_SCREEN_SCHEMA = 'org.gnome.login-screen'; const DISABLE_USER_SWITCH_KEY = 'disable-user-switching'; @@ -22,12 +24,7 @@ const ALWAYS_SHOW_LOG_OUT_KEY = 'always-show-log-out'; const SENSOR_BUS_NAME = 'net.hadess.SensorProxy'; const SENSOR_OBJECT_PATH = '/net/hadess/SensorProxy'; -const SensorProxyInterface = ` - - - - -`; +const SensorProxyInterface = loadInterfaceXML('net.hadess.SensorProxy'); const POWER_OFF_ACTION_ID = 'power-off'; const LOCK_SCREEN_ACTION_ID = 'lock-screen'; diff --git a/js/portal-resources.gresource.xml b/js/portal-resources.gresource.xml index 3a06747b0..7961c755f 100644 --- a/js/portal-resources.gresource.xml +++ b/js/portal-resources.gresource.xml @@ -2,6 +2,7 @@ misc/config.js + misc/fileUtils.js portalHelper/main.js diff --git a/js/portalHelper/main.js b/js/portalHelper/main.js index e112f820f..a788b7479 100644 --- a/js/portalHelper/main.js +++ b/js/portalHelper/main.js @@ -12,6 +12,7 @@ const WebKit = imports.gi.WebKit2; const _ = Gettext.gettext; const Config = imports.misc.config; +const { loadInterfaceXML } = imports.misc.fileUtils; const PortalHelperResult = { CANCELLED: 0, @@ -30,26 +31,7 @@ const CONNECTIVITY_CHECK_HOST = 'nmcheck.gnome.org'; const CONNECTIVITY_CHECK_URI = 'http://' + CONNECTIVITY_CHECK_HOST; const CONNECTIVITY_RECHECK_RATELIMIT_TIMEOUT = 30 * GLib.USEC_PER_SEC; -const HelperDBusInterface = ` - - - - - - - - - - - - - - - - - - -`; +const HelperDBusInterface = loadInterfaceXML('org.gnome.Shell.PortalHelper'); var PortalHeaderBar = new Lang.Class({ Name: 'PortalHeaderBar', diff --git a/js/ui/accessDialog.js b/js/ui/accessDialog.js index bb59ee5ce..ca0ff54a5 100644 --- a/js/ui/accessDialog.js +++ b/js/ui/accessDialog.js @@ -10,29 +10,10 @@ const CheckBox = imports.ui.checkBox; const Dialog = imports.ui.dialog; const ModalDialog = imports.ui.modalDialog; -const RequestIface = ` - - - - -`; +const { loadInterfaceXML } = imports.misc.fileUtils; -const AccessIface = ` - - - - - - - - - - - - - - -`; +const RequestIface = loadInterfaceXML('org.freedesktop.impl.portal.Request'); +const AccessIface = loadInterfaceXML('org.freedesktop.impl.portal.Access'); var DialogResponse = { OK: 0, diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 623dc6f38..67b796a26 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -30,6 +30,8 @@ const Params = imports.misc.params; const Util = imports.misc.util; const SystemActions = imports.misc.systemActions; +const { loadInterfaceXML } = imports.misc.fileUtils; + var MAX_APPLICATION_WORK_MILLIS = 75; var MENU_POPUP_TIMEOUT = 600; var MAX_COLUMNS = 6; @@ -66,13 +68,7 @@ var PAGE_SWITCH_TIME = 0.3; const SWITCHEROO_BUS_NAME = 'net.hadess.SwitcherooControl'; const SWITCHEROO_OBJECT_PATH = '/net/hadess/SwitcherooControl'; -const SwitcherooProxyInterface = ` - - - - -`; - +const SwitcherooProxyInterface = loadInterfaceXML('net.hadess.SwitcherooControl'); const SwitcherooProxy = Gio.DBusProxy.makeProxyWrapper(SwitcherooProxyInterface); let discreteGpuAvailable = false; diff --git a/js/ui/audioDeviceSelection.js b/js/ui/audioDeviceSelection.js index 8010ec12c..3f4b9bcc7 100644 --- a/js/ui/audioDeviceSelection.js +++ b/js/ui/audioDeviceSelection.js @@ -9,25 +9,15 @@ const St = imports.gi.St; const Main = imports.ui.main; const ModalDialog = imports.ui.modalDialog; +const { loadInterfaceXML } = imports.misc.fileUtils; + var AudioDevice = { HEADPHONES: 1 << 0, HEADSET: 1 << 1, MICROPHONE: 1 << 2 }; -const AudioDeviceSelectionIface = ` - - - - - - - - - - - -`; +const AudioDeviceSelectionIface = loadInterfaceXML('org.gnome.Shell.AudioDeviceSelection'); var AudioDeviceSelectionDialog = new Lang.Class({ Name: 'AudioDeviceSelectionDialog', diff --git a/js/ui/components/autorunManager.js b/js/ui/components/autorunManager.js index 37c774c53..68a1643f2 100644 --- a/js/ui/components/autorunManager.js +++ b/js/ui/components/autorunManager.js @@ -8,6 +8,8 @@ const GnomeSession = imports.misc.gnomeSession; const Main = imports.ui.main; const MessageTray = imports.ui.messageTray; +const { loadInterfaceXML } = imports.misc.fileUtils; + // GSettings keys const SETTINGS_SCHEMA = 'org.gnome.desktop.media-handling'; const SETTING_DISABLE_AUTORUN = 'autorun-never'; @@ -74,16 +76,7 @@ function startAppForMount(app, mount) { /******************************************/ -const HotplugSnifferIface = ` - - - - - - - -`; - +const HotplugSnifferIface = loadInterfaceXML('org.gnome.Shell.HotplugSniffer'); const HotplugSnifferProxy = Gio.DBusProxy.makeProxyWrapper(HotplugSnifferIface); function HotplugSniffer() { return new HotplugSnifferProxy(Gio.DBus.session, diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js index a6b928ce2..23ed69769 100644 --- a/js/ui/endSessionDialog.js +++ b/js/ui/endSessionDialog.js @@ -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 = ` - - - - - - - - - - - - - - - -`; +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 = ` - - - - - - - - -`; - +const LogindSessionIface = loadInterfaceXML('org.freedesktop.login1.Session'); const LogindSession = Gio.DBusProxy.makeProxyWrapper(LogindSessionIface); -const PkOfflineIface = ` - - - - - - - - - - - - -`; - +const PkOfflineIface = loadInterfaceXML('org.freedesktop.PackageKit.Offline'); const PkOfflineProxy = Gio.DBusProxy.makeProxyWrapper(PkOfflineIface); -const UPowerIface = ` - - - - -`; - +const UPowerIface = loadInterfaceXML('org.freedesktop.UPower'); const UPowerProxy = Gio.DBusProxy.makeProxyWrapper(UPowerIface); function findAppFromInhibitor(inhibitor) { diff --git a/js/ui/magnifierDBus.js b/js/ui/magnifierDBus.js index c796d0735..210c5e337 100644 --- a/js/ui/magnifierDBus.js +++ b/js/ui/magnifierDBus.js @@ -4,96 +4,18 @@ const Gio = imports.gi.Gio; const Lang = imports.lang; const Main = imports.ui.main; +const { loadInterfaceXML } = imports.misc.fileUtils; + const MAG_SERVICE_PATH = '/org/gnome/Magnifier'; const ZOOM_SERVICE_PATH = '/org/gnome/Magnifier/ZoomRegion'; // Subset of gnome-mag's Magnifier dbus interface -- to be expanded. See: // http://git.gnome.org/browse/gnome-mag/tree/xml/...Magnifier.xml -const MagnifierIface = ` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`; +const MagnifierIface = loadInterfaceXML('org.gnome.Magnifier'); // Subset of gnome-mag's ZoomRegion dbus interface -- to be expanded. See: // http://git.gnome.org/browse/gnome-mag/tree/xml/...ZoomRegion.xml -const ZoomRegionIface = ` - - - - - - - - - - - - - - - - - - - - - - - - - -`; +const ZoomRegionIface = loadInterfaceXML('org.gnome.Magnifier.ZoomRegion'); // For making unique ZoomRegion DBus proxy object paths of the form: // '/org/gnome/Magnifier/ZoomRegion/zoomer0', diff --git a/js/ui/mpris.js b/js/ui/mpris.js index a3b369ce2..3b5521265 100644 --- a/js/ui/mpris.js +++ b/js/ui/mpris.js @@ -8,44 +8,15 @@ const Calendar = imports.ui.calendar; const Main = imports.ui.main; const MessageList = imports.ui.messageList; -const DBusIface = ` - - - - - - - - - - - -`; +const { loadInterfaceXML } = imports.misc.fileUtils; + +const DBusIface = loadInterfaceXML('org.freedesktop.DBus'); const DBusProxy = Gio.DBusProxy.makeProxyWrapper(DBusIface); -const MprisIface = ` - - - - - - -`; +const MprisIface = loadInterfaceXML('org.mpris.MediaPlayer2'); const MprisProxy = Gio.DBusProxy.makeProxyWrapper(MprisIface); -const MprisPlayerIface = ` - - - - - - - - - - - -`; +const MprisPlayerIface = loadInterfaceXML('org.mpris.MediaPlayer2.Player'); const MprisPlayerProxy = Gio.DBusProxy.makeProxyWrapper(MprisPlayerIface); const MPRIS_PLAYER_PREFIX = 'org.mpris.MediaPlayer2.'; diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index 19d23da14..81d3e3ae3 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -16,58 +16,16 @@ const MessageTray = imports.ui.messageTray; const Params = imports.misc.params; const Util = imports.misc.util; -// Should really be defined in Gio.js -const BusIface = ` - - - - - - - -`; +const { loadInterfaceXML } = imports.misc.fileUtils; +// Should really be defined in Gio.js +const BusIface = loadInterfaceXML('org.freedesktop.DBus'); var BusProxy = Gio.DBusProxy.makeProxyWrapper(BusIface); function Bus() { return new BusProxy(Gio.DBus.session, 'org.freedesktop.DBus', '/org/freedesktop/DBus'); } -const FdoNotificationsIface = ` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`; +const FdoNotificationsIface = loadInterfaceXML('org.freedesktop.Notifications'); var NotificationClosedReason = { EXPIRED: 1, @@ -656,19 +614,7 @@ var GtkNotificationDaemonNotification = new Lang.Class({ }, }); -const FdoApplicationIface = ` - - - - - - - - - - - -`; +const FdoApplicationIface = loadInterfaceXML('org.freedesktop.Application'); const FdoApplicationProxy = Gio.DBusProxy.makeProxyWrapper(FdoApplicationIface); function objectPathFromAppId(appId) { @@ -777,20 +723,7 @@ var GtkNotificationDaemonAppSource = new Lang.Class({ }, }); -const GtkNotificationsIface = ` - - - - - - - - - - - - -`; +const GtkNotificationsIface = loadInterfaceXML('org.gtk.Notifications'); var GtkNotificationDaemon = new Lang.Class({ Name: 'GtkNotificationDaemon', diff --git a/js/ui/padOsd.js b/js/ui/padOsd.js index 76321f5f5..48219026c 100644 --- a/js/ui/padOsd.js +++ b/js/ui/padOsd.js @@ -19,6 +19,8 @@ const Main = imports.ui.main; const PopupMenu = imports.ui.popupMenu; const Layout = imports.ui.layout; +const { loadInterfaceXML } = imports.misc.fileUtils; + const ACTIVE_COLOR = "#729fcf"; const LTR = 0; @@ -962,15 +964,7 @@ var PadOsd = new Lang.Class({ }); Signals.addSignalMethods(PadOsd.prototype); -const PadOsdIface = ` - - - - - - - -`; +const PadOsdIface = loadInterfaceXML('org.gnome.Shell.Wacom.PadOsd'); var PadOsdService = new Lang.Class({ Name: 'PadOsdService', diff --git a/js/ui/screencast.js b/js/ui/screencast.js index 91514e3a0..e57b0ef7d 100644 --- a/js/ui/screencast.js +++ b/js/ui/screencast.js @@ -8,30 +8,9 @@ const Signals = imports.signals; const Main = imports.ui.main; -const ScreencastIface = ` - - - - - - - - - - - - - - - - - - - - - - -`; +const { loadInterfaceXML } = imports.misc.fileUtils; + +const ScreencastIface = loadInterfaceXML('org.gnome.Shell.Screencast'); var ScreencastService = new Lang.Class({ Name: 'ScreencastService', diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index 653454256..edfac1dd9 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -16,51 +16,9 @@ const Lightbox = imports.ui.lightbox; const Main = imports.ui.main; const Tweener = imports.ui.tweener; -const ScreenshotIface = ` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`; +const { loadInterfaceXML } = imports.misc.fileUtils; + +const ScreenshotIface = loadInterfaceXML('org.gnome.Shell.Screenshot'); var ScreenshotService = new Lang.Class({ Name: 'ScreenshotService', diff --git a/js/ui/scripting.js b/js/ui/scripting.js index b325eb10d..495319591 100644 --- a/js/ui/scripting.js +++ b/js/ui/scripting.js @@ -9,6 +9,8 @@ const Shell = imports.gi.Shell; const Main = imports.ui.main; const Params = imports.misc.params; +const { loadInterfaceXML } = imports.misc.fileUtils; + // This module provides functionality for driving the shell user interface // in an automated fashion. The primary current use case for this is // automated performance testing (see runPerfScript()), but it could @@ -68,21 +70,7 @@ function waitLeisure() { return callback => { cb = callback; }; } -const PerfHelperIface = ` - - - - - - - - - - - - -`; - +const PerfHelperIface = loadInterfaceXML('org.gnome.Shell.PerfHelper'); var PerfHelperProxy = Gio.DBusProxy.makeProxyWrapper(PerfHelperIface); function PerfHelper() { return new PerfHelperProxy(Gio.DBus.session, 'org.gnome.Shell.PerfHelper', '/org/gnome/Shell/PerfHelper'); diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js index 871fe9924..a200a1bdd 100644 --- a/js/ui/shellDBus.js +++ b/js/ui/shellDBus.js @@ -14,72 +14,10 @@ const Main = imports.ui.main; const Screenshot = imports.ui.screenshot; const ViewSelector = imports.ui.viewSelector; -const GnomeShellIface = ` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`; +const { loadInterfaceXML } = imports.misc.fileUtils; -const ScreenSaverIface = ` - - - - - - - - - - - - - - - - - - -`; +const GnomeShellIface = loadInterfaceXML('org.gnome.Shell'); +const ScreenSaverIface = loadInterfaceXML('org.gnome.ScreenSaver'); var GnomeShell = new Lang.Class({ Name: 'GnomeShellDBus', @@ -295,44 +233,7 @@ var GnomeShell = new Lang.Class({ ShellVersion: Config.PACKAGE_VERSION }); -const GnomeShellExtensionsIface = ` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`; +const GnomeShellExtensionsIface = loadInterfaceXML('org.gnome.Shell.Extensions'); var GnomeShellExtensions = new Lang.Class({ Name: 'GnomeShellExtensionsDBus', diff --git a/js/ui/shellMountOperation.js b/js/ui/shellMountOperation.js index 9be0a4650..4b03490d5 100644 --- a/js/ui/shellMountOperation.js +++ b/js/ui/shellMountOperation.js @@ -18,6 +18,8 @@ const ModalDialog = imports.ui.modalDialog; const Params = imports.misc.params; const ShellEntry = imports.ui.shellEntry; +const { loadInterfaceXML } = imports.misc.fileUtils; + var LIST_ITEM_ICON_SIZE = 48; const REMEMBER_MOUNT_PASSWORD_KEY = 'remember-mount-password'; @@ -436,39 +438,7 @@ var ShellProcessesDialog = new Lang.Class({ }); Signals.addSignalMethods(ShellProcessesDialog.prototype); -const GnomeShellMountOpIface = ` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`; +const GnomeShellMountOpIface = loadInterfaceXML('org.Gtk.MountOperationHandler'); var ShellMountOperationType = { NONE: 0, diff --git a/js/ui/status/bluetooth.js b/js/ui/status/bluetooth.js index c81f8362e..69347ba38 100644 --- a/js/ui/status/bluetooth.js +++ b/js/ui/status/bluetooth.js @@ -8,18 +8,12 @@ const Main = imports.ui.main; const PanelMenu = imports.ui.panelMenu; const PopupMenu = imports.ui.popupMenu; +const { loadInterfaceXML } = imports.misc.fileUtils; + const BUS_NAME = 'org.gnome.SettingsDaemon.Rfkill'; const OBJECT_PATH = '/org/gnome/SettingsDaemon/Rfkill'; -const RfkillManagerInterface = ` - - - - - - -`; - +const RfkillManagerInterface = loadInterfaceXML('org.gnome.SettingsDaemon.Rfkill'); const RfkillManagerProxy = Gio.DBusProxy.makeProxyWrapper(RfkillManagerInterface); const HAD_BLUETOOTH_DEVICES_SETUP = 'had-bluetooth-devices-setup'; diff --git a/js/ui/status/brightness.js b/js/ui/status/brightness.js index 50640d2db..a1fb976d8 100644 --- a/js/ui/status/brightness.js +++ b/js/ui/status/brightness.js @@ -8,16 +8,12 @@ const PanelMenu = imports.ui.panelMenu; const PopupMenu = imports.ui.popupMenu; const Slider = imports.ui.slider; +const { loadInterfaceXML } = imports.misc.fileUtils; + const BUS_NAME = 'org.gnome.SettingsDaemon.Power'; const OBJECT_PATH = '/org/gnome/SettingsDaemon/Power'; -const BrightnessInterface = ` - - - - -`; - +const BrightnessInterface = loadInterfaceXML('org.gnome.SettingsDaemon.Power.Screen'); const BrightnessProxy = Gio.DBusProxy.makeProxyWrapper(BrightnessInterface); var Indicator = new Lang.Class({ diff --git a/js/ui/status/location.js b/js/ui/status/location.js index b5d6c7dd3..ed4863eca 100644 --- a/js/ui/status/location.js +++ b/js/ui/status/location.js @@ -15,6 +15,8 @@ const Shell = imports.gi.Shell; const Signals = imports.signals; const St = imports.gi.St; +const { loadInterfaceXML } = imports.misc.fileUtils; + const LOCATION_SCHEMA = 'org.gnome.system.location'; const MAX_ACCURACY_LEVEL = 'max-accuracy-level'; const ENABLED = 'enabled'; @@ -40,31 +42,10 @@ function accuracyLevelToString(accuracyLevel) { return 'NONE'; } -var GeoclueIface = ` - - - - - - - - -`; - +var GeoclueIface = loadInterfaceXML('org.freedesktop.GeoClue2.Manager'); const GeoclueManager = Gio.DBusProxy.makeProxyWrapper(GeoclueIface); -var AgentIface = ` - - - - - - - - - - -`; +var AgentIface = loadInterfaceXML('org.freedesktop.GeoClue2.Agent'); var Indicator = new Lang.Class({ Name: 'LocationIndicator', diff --git a/js/ui/status/network.js b/js/ui/status/network.js index d4a09bc32..b575a726d 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -21,6 +21,8 @@ const ModemManager = imports.misc.modemManager; const Rfkill = imports.ui.status.rfkill; const Util = imports.misc.util; +const { loadInterfaceXML } = imports.misc.fileUtils; + const NMConnectionCategory = { INVALID: 'invalid', WIRED: 'wired', @@ -51,26 +53,7 @@ var PortalHelperResult = { RECHECK: 2 }; -const PortalHelperIface = ` - - - - - - - - - - - - - - - - - - -`; +const PortalHelperIface = loadInterfaceXML('org.gnome.Shell.PortalHelper'); const PortalHelperProxy = Gio.DBusProxy.makeProxyWrapper(PortalHelperIface); function signalToIcon(value) { diff --git a/js/ui/status/nightLight.js b/js/ui/status/nightLight.js index f369d3df2..d4a2fef93 100644 --- a/js/ui/status/nightLight.js +++ b/js/ui/status/nightLight.js @@ -7,17 +7,12 @@ const Main = imports.ui.main; const PanelMenu = imports.ui.panelMenu; const PopupMenu = imports.ui.popupMenu; +const { loadInterfaceXML } = imports.misc.fileUtils; + const BUS_NAME = 'org.gnome.SettingsDaemon.Color'; const OBJECT_PATH = '/org/gnome/SettingsDaemon/Color'; -const ColorInterface = ` - - - - - -`; - +const ColorInterface = loadInterfaceXML('org.gnome.SettingsDaemon.Color'); const ColorProxy = Gio.DBusProxy.makeProxyWrapper(ColorInterface); var Indicator = new Lang.Class({ diff --git a/js/ui/status/power.js b/js/ui/status/power.js index cf57d8cf1..f21693f53 100644 --- a/js/ui/status/power.js +++ b/js/ui/status/power.js @@ -10,22 +10,12 @@ const Main = imports.ui.main; const PanelMenu = imports.ui.panelMenu; const PopupMenu = imports.ui.popupMenu; +const { loadInterfaceXML } = imports.misc.fileUtils; + const BUS_NAME = 'org.freedesktop.UPower'; const OBJECT_PATH = '/org/freedesktop/UPower/devices/DisplayDevice'; -const DisplayDeviceInterface = ` - - - - - - - - - - -`; - +const DisplayDeviceInterface = loadInterfaceXML('org.freedesktop.UPower.Device'); const PowerManagerProxy = Gio.DBusProxy.makeProxyWrapper(DisplayDeviceInterface); const SHOW_BATTERY_PERCENTAGE = 'show-battery-percentage'; diff --git a/js/ui/status/rfkill.js b/js/ui/status/rfkill.js index ecc874596..8022fb94b 100644 --- a/js/ui/status/rfkill.js +++ b/js/ui/status/rfkill.js @@ -8,18 +8,12 @@ const Main = imports.ui.main; const PanelMenu = imports.ui.panelMenu; const PopupMenu = imports.ui.popupMenu; +const { loadInterfaceXML } = imports.misc.fileUtils; + const BUS_NAME = 'org.gnome.SettingsDaemon.Rfkill'; const OBJECT_PATH = '/org/gnome/SettingsDaemon/Rfkill'; -const RfkillManagerInterface = ` - - - - - - -`; - +const RfkillManagerInterface = loadInterfaceXML('org.gnome.SettingsDaemon.Rfkill'); const RfkillManagerProxy = Gio.DBusProxy.makeProxyWrapper(RfkillManagerInterface); var RfkillManager = new Lang.Class({ diff --git a/js/ui/status/thunderbolt.js b/js/ui/status/thunderbolt.js index efb401a16..4584748ed 100644 --- a/js/ui/status/thunderbolt.js +++ b/js/ui/status/thunderbolt.js @@ -12,44 +12,12 @@ const Main = imports.ui.main; const MessageTray = imports.ui.messageTray; const PanelMenu = imports.ui.panelMenu; +const { loadInterfaceXML } = imports.misc.fileUtils; + /* Keep in sync with data/org.freedesktop.bolt.xml */ -const BoltClientInterface = ` - - - - - - - - - - - - - - -`; - -const BoltDeviceInterface = ` - - - - - - - - - - - - - - - - - -`; +const BoltClientInterface = loadInterfaceXML('org.freedesktop.bolt1.Manager'); +const BoltDeviceInterface = loadInterfaceXML('org.freedesktop.bolt1.Device'); const BoltDeviceProxy = Gio.DBusProxy.makeProxyWrapper(BoltDeviceInterface); diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index 0c6ab1be0..cfcfa3fcb 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -25,6 +25,8 @@ const EdgeDragAction = imports.ui.edgeDragAction; const CloseDialog = imports.ui.closeDialog; const SwitchMonitor = imports.ui.switchMonitor; +const { loadInterfaceXML } = imports.misc.fileUtils; + var SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings'; var MINIMIZE_WINDOW_ANIMATION_TIME = 0.2; var SHOW_WINDOW_ANIMATION_TIME = 0.15; @@ -42,21 +44,7 @@ var ONE_SECOND = 1000; // in ms const GSD_WACOM_BUS_NAME = 'org.gnome.SettingsDaemon.Wacom'; const GSD_WACOM_OBJECT_PATH = '/org/gnome/SettingsDaemon/Wacom'; -const GsdWacomIface = ` - - - - - - - - - - - - -`; - +const GsdWacomIface = loadInterfaceXML('org.gnome.SettingsDaemon.Wacom'); const GsdWacomProxy = Gio.DBusProxy.makeProxyWrapper(GsdWacomIface); var DisplayChangeDialog = new Lang.Class({