aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarc Deslauriers <marc.deslauriers@canonical.com>2013-09-25 11:08:31 -0400
committerMarc Deslauriers <marc.deslauriers@canonical.com>2013-09-25 11:08:31 -0400
commitd06fba55214a2be1739d8ba993d10c1347dfafd4 (patch)
treee0a6f82d8a01b7cf20f9dbdbed10d5ca225bd0a4 /src
parentb2bbe57b420407c26ab470a797da55ca8ea17b6d (diff)
downloadayatana-indicator-session-d06fba55214a2be1739d8ba993d10c1347dfafd4.tar.gz
ayatana-indicator-session-d06fba55214a2be1739d8ba993d10c1347dfafd4.tar.bz2
ayatana-indicator-session-d06fba55214a2be1739d8ba993d10c1347dfafd4.zip
src/service.c: also switch to screensaver if there is more than one user
Diffstat (limited to 'src')
-rw-r--r--src/service.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/service.c b/src/service.c
index ca0c175..efcb04f 100644
--- a/src/service.c
+++ b/src/service.c
@@ -464,16 +464,15 @@ create_switch_section (IndicatorSessionService * self)
item = g_menu_item_new (ellipsis ? _("Switch Account…")
: _("Switch Account"), action);
}
- else if (g_hash_table_size (p->users) == 1)
- {
- const char * action = "indicator.switch-to-screensaver";
- item = g_menu_item_new (_("Lock"), action);
- }
else
{
- const char * action = "indicator.switch-to-greeter";
- item = g_menu_item_new (ellipsis ? _("Lock/Switch Account…")
- : _("Lock/Switch Account"), action);
+ const char * action = "indicator.switch-to-screensaver";
+
+ if (g_hash_table_size (p->users) == 1)
+ item = g_menu_item_new (_("Lock"), action);
+ else
+ item = g_menu_item_new (ellipsis ? _("Lock/Switch Account…")
+ : _("Lock/Switch Account"), action);
}
str = g_settings_get_string (p->keybinding_settings, "screensaver");
g_menu_item_set_attribute (item, "accel", "s", str);