From 244ee22522d4eed6472a145c1f2ad58eda8eb4b4 Mon Sep 17 00:00:00 2001 From: pier11 Date: Sat, 27 Mar 2010 13:11:50 +0000 Subject: [PATCH] access: move Blocked level to the botton of the menu list. Same as in the original client (as I remember). --- src/core/sipe.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/core/sipe.c b/src/core/sipe.c index 85e4b3fc..d4038f78 100644 --- a/src/core/sipe.c +++ b/src/core/sipe.c @@ -9946,10 +9946,15 @@ sipe_buddy_menu(PurpleBuddy *buddy) /* Access Level */ /* get current access level */ - for (i = 0; i < CONTAINERS_LEN; i++) { - act = purple_menu_action_new(sipe_get_access_level_name(containers[i]), + for (i = 1; i <= CONTAINERS_LEN; i++) { + /* to put Blocked level last in menu list. + * Blocked should remaim in the first place in the containers[] array. + */ + unsigned int j = (i == CONTAINERS_LEN) ? 0 : i; + + act = purple_menu_action_new(sipe_get_access_level_name(containers[j]), PURPLE_CALLBACK(sipe_buddy_menu_access_level_cb), - (gpointer)&(containers[i]), NULL); + (gpointer)&(containers[j]), NULL); menu_access_levels = g_list_prepend(menu_access_levels, act); } menu_access_levels = g_list_reverse(menu_access_levels); -- 2.11.4.GIT