aboutsummaryrefslogtreecommitdiff
path: root/src/service.c
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-07-09 23:25:12 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-07-09 23:25:12 -0500
commit6c4e44173ea46125697ed33e989f23db1f36b744 (patch)
tree5cfef78594e4d47eee07fb13f56c1971666ebf33 /src/service.c
parentc93aa9f9fcd46561e56198eab084122072a99da8 (diff)
downloadayatana-indicator-session-6c4e44173ea46125697ed33e989f23db1f36b744.tar.gz
ayatana-indicator-session-6c4e44173ea46125697ed33e989f23db1f36b744.tar.bz2
ayatana-indicator-session-6c4e44173ea46125697ed33e989f23db1f36b744.zip
in the desktop greeter, skip the logout menuitem
Diffstat (limited to 'src/service.c')
-rw-r--r--src/service.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/service.c b/src/service.c
index 6cb9123..166f729 100644
--- a/src/service.c
+++ b/src/service.c
@@ -519,7 +519,7 @@ create_switch_section (IndicatorSessionService * self)
}
static GMenuModel *
-create_session_section (IndicatorSessionService * self)
+create_session_section (IndicatorSessionService * self, int profile)
{
GMenu * menu;
const priv_t * const p = self->priv;
@@ -528,10 +528,11 @@ create_session_section (IndicatorSessionService * self)
menu = g_menu_new ();
- if (indicator_session_actions_can_logout (p->backend_actions) && !g_settings_get_boolean (s, "suppress-logout-menuitem"))
+ if ((profile == PROFILE_DESKTOP) &&
+ (indicator_session_actions_can_logout (p->backend_actions)) &&
+ (!g_settings_get_boolean (s, "suppress-logout-menuitem")))
{
const char * label = ellipsis ? _("Log Out…") : _("Log Out");
- label = "Logggg outttt.....";
g_menu_append (menu, label, "indicator.logout");
}
@@ -576,11 +577,11 @@ create_menu (IndicatorSessionService * self, int profile)
sections[n++] = create_admin_section ();
sections[n++] = create_settings_section (self);
sections[n++] = create_switch_section (self);
- sections[n++] = create_session_section (self);
+ sections[n++] = create_session_section (self, profile);
}
else if (profile == PROFILE_GREETER)
{
- sections[n++] = create_session_section (self);
+ sections[n++] = create_session_section (self, profile);
}
/* add sections to the submenu */
@@ -811,8 +812,8 @@ rebuild_now (IndicatorSessionService * self, int sections)
if (sections & SECTION_SESSION)
{
- rebuild_section (desktop->submenu, 3, create_session_section(self));
- rebuild_section (greeter->submenu, 0, create_session_section(self));
+ rebuild_section (desktop->submenu, 3, create_session_section(self, PROFILE_DESKTOP));
+ rebuild_section (greeter->submenu, 0, create_session_section(self, PROFILE_GREETER));
}
}