Mercurial > ~mikael > mcabber > hg
diff mcabber/src/screen.c @ 1086:5e2e647e781b
Add command /roster group_prev|group_next and update documentation
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Wed, 06 Dec 2006 22:14:41 +0100 |
parents | 07941d7feee9 |
children | a61c3311a5bb |
line wrap: on
line diff
--- a/mcabber/src/screen.c Tue Dec 05 22:41:33 2006 +0100 +++ b/mcabber/src/screen.c Wed Dec 06 22:14:41 2006 +0100 @@ -1557,6 +1557,44 @@ scr_ShowBuddyWindow(); } +// scr_RosterPrevGroup() +// Go to the previous group in the buddylist +void scr_RosterPrevGroup(void) +{ + GList *bud; + + for (bud = current_buddy ; bud ; ) { + bud = g_list_previous(bud); + if (!bud) + break; + if (buddy_gettype(BUDDATA(bud)) & ROSTER_TYPE_GROUP) { + set_current_buddy(bud); + if (chatmode) + scr_ShowBuddyWindow(); + break; + } + } +} + +// scr_RosterNextGroup() +// Go to the next group in the buddylist +void scr_RosterNextGroup(void) +{ + GList *bud; + + for (bud = current_buddy ; bud ; ) { + bud = g_list_next(bud); + if (!bud) + break; + if (buddy_gettype(BUDDATA(bud)) & ROSTER_TYPE_GROUP) { + set_current_buddy(bud); + if (chatmode) + scr_ShowBuddyWindow(); + break; + } + } +} + // scr_RosterSearch(str) // Look forward for a buddy with jid/name containing str. void scr_RosterSearch(char *str)