user-status: Hide "Power off" option if shutdown is disabled

Due to lockdown settings or Polkit policy, shutdown may not be
available. If this is the case, the "Power off ..." action should
be hidden from the user status menu.

https://bugzilla.gnome.org/show_bug.cgi?id=652038
This commit is contained in:
Florian Müllner
2011-06-04 00:10:55 +02:00
parent ed8acefc00
commit 6b2b3475c8
2 changed files with 51 additions and 5 deletions

View File

@@ -109,7 +109,8 @@ const SessionManagerIface = {
name: 'org.gnome.SessionManager',
methods: [
{ name: 'Logout', inSignature: 'u', outSignature: '' },
{ name: 'Shutdown', inSignature: '', outSignature: '' }
{ name: 'Shutdown', inSignature: '', outSignature: '' },
{ name: 'CanShutdown', inSignature: '', outSignature: 'b' }
]
};