Commit 2caa696e authored by Alex Muñoz's avatar Alex Muñoz Committed by John Stowers

using GDBus for the logout

parent 27dd59e9
......@@ -326,9 +326,14 @@ class Notification:
self.notification.show()
def logout(self, btn, action, unknown):
bus = dbus.SessionBus()
serviceManager = bus.get_object('org.gnome.SessionManager', '/org/gnome/SessionManager')
serviceManager.Logout(dbus.UInt32(0))
d = Gio.bus_get_sync(Gio.BusType.SESSION, None)
proxy = Gio.DBusProxy.new_sync(
d,Gio.DBusProxyFlags.NONE, None,
'org.gnome.SessionManager',
'/org/gnome/SessionManager',
'org.gnome.SessionManager',
None)
proxy.Logout('(u)', 0)
if __name__ == "__main__":
gtweak.DATA_DIR = "/usr/share"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment