From 44b773228cd6a23d93fcd60d9c81170a0b8d83fd Mon Sep 17 00:00:00 2001 From: Faheem Pervez <> Date: Thu, 22 Sep 2011 13:59:06 +1000 Subject: Use correct D-Bus and power interface in liblightdm-qt --- liblightdm-qt/power.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'liblightdm-qt') diff --git a/liblightdm-qt/power.cpp b/liblightdm-qt/power.cpp index 57f9fa38..8656c247 100644 --- a/liblightdm-qt/power.cpp +++ b/liblightdm-qt/power.cpp @@ -26,14 +26,14 @@ static QDBusInterface* consoleKitInterface = NULL; static bool setupPowerManagementInterface () { if (!powerManagementInterface) - powerManagementInterface = new QDBusInterface("org.freedesktop.PowerManagement","/org/freedesktop/PowerManagement", "org.freedesktop.PowerManagement"); + powerManagementInterface = new QDBusInterface("org.freedesktop.UPower","/org/freedesktop/UPower", "org.freedesktop.UPower", QDBusConnection::systemBus()); return powerManagementInterface != NULL; } static bool setupConsoleKitInterface () { if (!consoleKitInterface) - consoleKitInterface = new QDBusInterface("org.freedesktop.ConsoleKit", "/org/freedesktop/ConsoleKit/Manager", "org.freedesktop.ConsoleKit"); + consoleKitInterface = new QDBusInterface("org.freedesktop.ConsoleKit", "/org/freedesktop/ConsoleKit/Manager", "org.freedesktop.ConsoleKit.Manager", QDBusConnection::systemBus()); return consoleKitInterface != NULL; } @@ -42,7 +42,7 @@ bool QLightDM::canSuspend() if (!setupPowerManagementInterface()) return false; - QDBusReply reply = powerManagementInterface->call("CanSuspend"); + QDBusReply reply = powerManagementInterface->call("SuspendAllowed"); if (reply.isValid()) return reply.value(); else @@ -60,7 +60,7 @@ bool QLightDM::canHibernate() if (!setupPowerManagementInterface()) return false; - QDBusReply reply = powerManagementInterface->call("CanHibernate"); + QDBusReply reply = powerManagementInterface->call("HibernateAllowed"); if (reply.isValid()) return reply.value(); else @@ -88,7 +88,7 @@ bool QLightDM::canShutdown() void QLightDM::shutdown() { if (setupConsoleKitInterface()) - consoleKitInterface->call("stop"); + consoleKitInterface->call("Stop"); } bool QLightDM::canRestart() -- cgit v1.2.1