Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/screen.c @ 1573:ece4f26bf9ff
Add count parameter to roster up/down command
(Based on a patch from knyar in the issue tracker)
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Mon, 13 Apr 2009 00:26:56 +0200 |
parents | d64e0b2855fc |
children | a2dd83167bc9 |
comparison
equal
deleted
inserted
replaced
1572:8c0237c8c186 | 1573:ece4f26bf9ff |
---|---|
2251 set_current_buddy(g_list_last(buddylist)); | 2251 set_current_buddy(g_list_last(buddylist)); |
2252 if (chatmode) | 2252 if (chatmode) |
2253 scr_ShowBuddyWindow(); | 2253 scr_ShowBuddyWindow(); |
2254 } | 2254 } |
2255 | 2255 |
2256 // scr_RosterUp() | 2256 // scr_RosterUpDown(updown, n) |
2257 // Go to the previous buddy in the buddylist | 2257 // Go to the nth next buddy in the buddylist |
2258 void scr_RosterUp(void) | 2258 // (up if updown == -1, down if updown == 1) |
2259 { | 2259 void scr_RosterUpDown(int updown, unsigned int n) |
2260 set_current_buddy(g_list_previous(current_buddy)); | 2260 { |
2261 if (chatmode) | 2261 unsigned int i; |
2262 scr_ShowBuddyWindow(); | 2262 |
2263 } | 2263 if (updown < 0) { |
2264 | 2264 for (i = 0; i < n; i++) |
2265 // scr_RosterDown() | 2265 set_current_buddy(g_list_previous(current_buddy)); |
2266 // Go to the next buddy in the buddylist | 2266 } else { |
2267 void scr_RosterDown(void) | 2267 for (i = 0; i < n; i++) |
2268 { | 2268 set_current_buddy(g_list_next(current_buddy)); |
2269 set_current_buddy(g_list_next(current_buddy)); | 2269 } |
2270 if (chatmode) | 2270 if (chatmode) |
2271 scr_ShowBuddyWindow(); | 2271 scr_ShowBuddyWindow(); |
2272 } | 2272 } |
2273 | 2273 |
2274 // scr_RosterPrevGroup() | 2274 // scr_RosterPrevGroup() |