[nanny: 1/7] nanny-desktop-blocker close session on user-space
- From: Roberto Majadas <telemaco src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nanny: 1/7] nanny-desktop-blocker close session on user-space
- Date: Sat, 4 Jun 2011 00:37:23 +0000 (UTC)
commit ce6e407ba504f351d8d49f98ac752f674d3d4394
Author: Roberto Majadas <roberto majadas openshine com>
Date: Fri Jun 3 23:26:50 2011 +0200
nanny-desktop-blocker close session on user-space
client/gnome/admin/src/DesktopBlocker.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/client/gnome/admin/src/DesktopBlocker.py b/client/gnome/admin/src/DesktopBlocker.py
index 0c62a04..8d276e8 100644
--- a/client/gnome/admin/src/DesktopBlocker.py
+++ b/client/gnome/admin/src/DesktopBlocker.py
@@ -102,6 +102,13 @@ class DesktopBlocker(gtk.Window):
def __close_button_clicked_cb(self, widget, data):
if os.name == "nt" :
windll.user32.ExitWindowsEx(0)
+ elif os.name == "posix" :
+ d = dbus.SessionBus()
+ session_manager = dbus.Interface(d.get_object("org.gnome.SessionManager",
+ "/org/gnome/SessionManager"),
+ "org.gnome.SessionManager")
+ session_manager.Logout(1)
+
sys.exit(0)
def __time_button_clicked_cb(self, widget, data):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]