diff options
author | Iain Lane <iain@orangesquash.org.uk> | 2014-03-24 10:18:47 +0000 |
---|---|---|
committer | CI bot <ps-jenkins@lists.canonical.com> | 2014-03-24 10:18:47 +0000 |
commit | 1db25fd1b84bcc592b1da794e81592c2942ef84a (patch) | |
tree | 36a38fb7d5bab428a6b9b421916274cbdabfef91 /tests | |
parent | e99aa91c16bbbaed8b1546b8bdb7bec45c4a7bd0 (diff) | |
parent | 3453ded59cf41640373b48c098d2222e69bacf6f (diff) | |
download | ayatana-indicator-session-1db25fd1b84bcc592b1da794e81592c2942ef84a.tar.gz ayatana-indicator-session-1db25fd1b84bcc592b1da794e81592c2942ef84a.tar.bz2 ayatana-indicator-session-1db25fd1b84bcc592b1da794e81592c2942ef84a.zip |
Re-add the feature to hide the user list if com.canonical.indicator.session user-show-menu is false Fixes: 1211772
Diffstat (limited to 'tests')
-rw-r--r-- | tests/com.canonical.indicator.session.gschema.xml | 7 | ||||
-rw-r--r-- | tests/test-service.cc | 10 |
2 files changed, 16 insertions, 1 deletions
diff --git a/tests/com.canonical.indicator.session.gschema.xml b/tests/com.canonical.indicator.session.gschema.xml index 76b2be3..60e680b 100644 --- a/tests/com.canonical.indicator.session.gschema.xml +++ b/tests/com.canonical.indicator.session.gschema.xml @@ -26,7 +26,12 @@ <summary>Determine the visibility of the User's real name on the panel</summary> <description>Allow for the Removal of the users name from the panel</description> </key> + <key type="b" name="user-show-menu"> + <default>true</default> + <summary>Show the list of users</summary> + <description>Allow for the user menu to be hidden by the user.</description> + </key> </schema> -</schemalist>
\ No newline at end of file +</schemalist> diff --git a/tests/test-service.cc b/tests/test-service.cc index f14fe61..20c70f5 100644 --- a/tests/test-service.cc +++ b/tests/test-service.cc @@ -812,6 +812,16 @@ TEST_F (ServiceTest, User) check_label ("Third Doctor", switch_menu, 8); g_clear_object (&switch_menu); + /* Hide the user list */ + g_settings_set_boolean (indicator_settings, "user-show-menu", FALSE); + wait_for_menu_resync (); + // now there should be 2 menuitems: greeter + guest + ASSERT_TRUE (find_menu_item_for_action ("indicator.switch-to-screensaver", &switch_menu, &pos)); + ASSERT_EQ (0, pos); + ASSERT_EQ (2, g_menu_model_get_n_items (switch_menu)); + g_clear_object (&switch_menu); + g_settings_set_boolean (indicator_settings, "user-show-menu", TRUE); + // now switch to one of the doctors g_action_group_activate_action (G_ACTION_GROUP(action_group), "switch-to-user", |