deskbar-applet r2471 - in trunk: . deskbar/handlers
- From: sebp svn gnome org
- To: svn-commits-list gnome org
- Subject: deskbar-applet r2471 - in trunk: . deskbar/handlers
- Date: Tue, 4 Nov 2008 19:25:19 +0000 (UTC)
Author: sebp
Date: Tue Nov 4 19:25:19 2008
New Revision: 2471
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=2471&view=rev
Log:
Fixed bug #559169: gnome power manager has new dbus path (patch by Christian Assing)
Modified:
trunk/ChangeLog
trunk/deskbar/handlers/gdmactions.py
Modified: trunk/deskbar/handlers/gdmactions.py
==============================================================================
--- trunk/deskbar/handlers/gdmactions.py (original)
+++ trunk/deskbar/handlers/gdmactions.py Tue Nov 4 19:25:19 2008
@@ -102,8 +102,8 @@
def __init__(self):
deskbar.interfaces.Action.__init__(self, "")
bus = dbus.Bus(dbus.Bus.TYPE_SESSION)
- obj = bus.get_object('org.gnome.PowerManager', '/org/gnome/PowerManager')
- self._gpm = dbus.Interface (obj, "org.gnome.PowerManager")
+ obj = bus.get_object('org.freedesktop.PowerManagement', '/org/freedesktop/PowerManagement')
+ self._gpm = dbus.Interface (obj, "org.freedesktop.PowerManagement")
class SuspendAction(GpmAction):
@@ -195,7 +195,7 @@
class SuspendMatch(GpmMatch):
def __init__(self, **args):
- GpmMatch.__init__(self, category="actions", icon="gpm-suspend-to-ram.png")
+ GpmMatch.__init__(self, icon="gpm-suspend-to-ram.png")
self.add_action( SuspendAction() )
class HibernateMatch(GpmMatch):
@@ -354,13 +354,13 @@
def init_gpm_matches(self):
try:
bus = dbus.Bus(dbus.Bus.TYPE_SESSION)
- obj = bus.get_object('org.gnome.PowerManager', '/org/gnome/PowerManager')
- gpm = dbus.Interface (obj, "org.gnome.PowerManager")
- if gpm.canSuspend():
+ obj = bus.get_object('org.freedesktop.PowerManagement', '/org/freedesktop/PowerManagement')
+ gpm = dbus.Interface (obj, "org.freedesktop.PowerManagement")
+ if gpm.CanSuspend():
self.indexer.add(_("Suspend"), SuspendMatch())
- if gpm.canHibernate():
+ if gpm.CanHibernate():
self.indexer.add(_("Hibernate"), HibernateMatch())
- if gpm.canShutdown():
+ if gpm.CanShutdown():
self.indexer.add(_("Shutdown"), ShutdownMatch())
except dbus.DBusException:
return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]