status/powerProfiles: Use newer DBus API

Since some time the power-profiles-daemon project has been moved under
the upower umbrella and renamed its API to follow that.

While the legacy name is still supported, there are plans to not support
it anymore in future [2]. So let's update gnome-shell code to use the
current main name instead.

[1] https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/merge_requests/148
[2] https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/merge_requests/166

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3629>
This commit is contained in:
Marco Trevisan (Treviño)
2025-02-07 00:38:14 +01:00
parent 5e2e6042a5
commit 71da3048a1
4 changed files with 151 additions and 80 deletions

View File

@ -8,10 +8,10 @@ import * as PopupMenu from '../popupMenu.js';
import {loadInterfaceXML} from '../../misc/fileUtils.js';
const BUS_NAME = 'net.hadess.PowerProfiles';
const OBJECT_PATH = '/net/hadess/PowerProfiles';
const BUS_NAME = 'org.freedesktop.UPower.PowerProfiles';
const OBJECT_PATH = '/org/freedesktop/UPower/PowerProfiles';
const PowerProfilesIface = loadInterfaceXML('net.hadess.PowerProfiles');
const PowerProfilesIface = loadInterfaceXML('org.freedesktop.UPower.PowerProfiles');
const PowerProfilesProxy = Gio.DBusProxy.makeProxyWrapper(PowerProfilesIface);
const PROFILE_PARAMS = {