diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-03-20 19:17:10 +0000 |
---|---|---|
committer | CI bot <ps-jenkins@lists.canonical.com> | 2014-03-20 19:17:10 +0000 |
commit | 02ebe3f8b16c629be6aa27d74abd43da97a15ad5 (patch) | |
tree | d29b8bd76f04c499e1d18ce98424a1c0e81b1579 /src | |
parent | 574547d5b173aa5dc19e5e35207f02f72c9de629 (diff) | |
parent | 983f94444b53eb5e8886033fd5fb6d70fa0fbdaa (diff) | |
download | ayatana-indicator-session-02ebe3f8b16c629be6aa27d74abd43da97a15ad5.tar.gz ayatana-indicator-session-02ebe3f8b16c629be6aa27d74abd43da97a15ad5.tar.bz2 ayatana-indicator-session-02ebe3f8b16c629be6aa27d74abd43da97a15ad5.zip |
Don't show the lockscreen accelerator in switch-user mode. Fixes: 1241906
Diffstat (limited to 'src')
-rw-r--r-- | src/service.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/service.c b/src/service.c index 60ddae0..2321d0a 100644 --- a/src/service.c +++ b/src/service.c @@ -484,9 +484,9 @@ serialize_icon_file (const gchar * filename) static GMenuModel * create_switch_section (IndicatorSessionService * self, int profile) { - gchar * str; GMenu * menu; GMenuItem * item; + gboolean want_accel; guint i; gpointer guser; GHashTableIter iter; @@ -501,6 +501,7 @@ create_switch_section (IndicatorSessionService * self, int profile) { const char * action = "indicator.switch-to-screensaver"; item = g_menu_item_new (_("Start Screen Saver"), action); + want_accel = TRUE; } else if (profile == PROFILE_LOCKSCREEN || indicator_session_guest_is_active (p->backend_guest)) @@ -508,6 +509,7 @@ create_switch_section (IndicatorSessionService * self, int profile) const char * action = "indicator.switch-to-greeter"; item = g_menu_item_new (ellipsis ? _("Switch Account…") : _("Switch Account"), action); + want_accel = FALSE; } else { @@ -518,11 +520,13 @@ create_switch_section (IndicatorSessionService * self, int profile) else item = g_menu_item_new (ellipsis ? _("Lock/Switch Account…") : _("Lock/Switch Account"), action); + + want_accel = TRUE; } - if (profile != PROFILE_LOCKSCREEN) + if (want_accel) { - str = g_settings_get_string (p->keybinding_settings, "screensaver"); + gchar * str = g_settings_get_string (p->keybinding_settings, "screensaver"); g_menu_item_set_attribute (item, "accel", "s", str); g_free (str); } |