aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-06-03 15:53:46 -0500
committerCharles Kerr <charles.kerr@canonical.com>2012-06-03 15:53:46 -0500
commit45af879206b20e704c985a33f93e88f329842352 (patch)
tree30649ad9a0aa6fbd87619bb014828f1190ba3ff4 /src
parent266693a41107c25fb87f099eb3b96d3eb8d73747 (diff)
downloadayatana-indicator-session-45af879206b20e704c985a33f93e88f329842352.tar.gz
ayatana-indicator-session-45af879206b20e704c985a33f93e88f329842352.tar.bz2
ayatana-indicator-session-45af879206b20e704c985a33f93e88f329842352.zip
simplify is_this_guest_session()
Diffstat (limited to 'src')
-rw-r--r--src/user-menu-mgr.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/user-menu-mgr.c b/src/user-menu-mgr.c
index 0070188..1f3755b 100644
--- a/src/user-menu-mgr.c
+++ b/src/user-menu-mgr.c
@@ -364,17 +364,13 @@ user_mgr_get_root_item (UserMenuMgr* self)
return self->root_item;
}
-/* Checks to see if we should show the guest suession item */
+/* Checks to see if we should show the guest session item.
+ System users shouldn't have guest account shown.
+ Mostly this would be the case of the guest user itself. */
static gboolean
is_this_guest_session (void)
{
- if (geteuid() < 500) {
- /* System users shouldn't have guest account shown. Mostly
- this would be the case of the guest user itself. */
- return TRUE;
- }
-
- return FALSE;
+ return geteuid() < 500;
}
/* Called when someone clicks on the guest session item. */