Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/screen.c @ 330:a9013124ede6
Add "/roster alternate"
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 17 Jul 2005 21:17:52 +0100 |
parents | 7c53bf62a2a2 |
children | a1901741890e |
comparison
equal
deleted
inserted
replaced
329:7c53bf62a2a2 | 330:a9013124ede6 |
---|---|
821 if (!current_buddy || !newbuddy) return; | 821 if (!current_buddy || !newbuddy) return; |
822 if (newbuddy == current_buddy) return; | 822 if (newbuddy == current_buddy) return; |
823 | 823 |
824 prev_st = buddy_getstatus(BUDDATA(current_buddy)); | 824 prev_st = buddy_getstatus(BUDDATA(current_buddy)); |
825 buddy_setflags(BUDDATA(current_buddy), ROSTER_FLAG_LOCK, FALSE); | 825 buddy_setflags(BUDDATA(current_buddy), ROSTER_FLAG_LOCK, FALSE); |
826 if (chatmode) | |
827 alternate_buddy = current_buddy; | |
826 current_buddy = newbuddy; | 828 current_buddy = newbuddy; |
827 // Lock the buddy in the buddylist if we're in chat mode | 829 // Lock the buddy in the buddylist if we're in chat mode |
828 if (chatmode) | 830 if (chatmode) |
829 buddy_setflags(BUDDATA(current_buddy), ROSTER_FLAG_LOCK, TRUE); | 831 buddy_setflags(BUDDATA(current_buddy), ROSTER_FLAG_LOCK, TRUE); |
830 // We should rebuild the buddylist but not everytime | 832 // We should rebuild the buddylist but not everytime |
909 nbuddy = g_list_find(buddylist, unread_ptr); | 911 nbuddy = g_list_find(buddylist, unread_ptr); |
910 if (nbuddy) { | 912 if (nbuddy) { |
911 set_current_buddy(nbuddy); | 913 set_current_buddy(nbuddy); |
912 if (chatmode) scr_ShowBuddyWindow(); | 914 if (chatmode) scr_ShowBuddyWindow(); |
913 } else scr_LogPrint("Error: nbuddy == NULL"); | 915 } else scr_LogPrint("Error: nbuddy == NULL"); |
916 } | |
917 | |
918 // scr_RosterJumpAlternate() | |
919 // Try to jump to alternate (== previous) buddy | |
920 void scr_RosterJumpAlternate(void) | |
921 { | |
922 if (!alternate_buddy || g_list_position(buddylist, alternate_buddy) == -1) | |
923 return; | |
924 set_current_buddy(alternate_buddy); | |
925 if (chatmode) | |
926 scr_ShowBuddyWindow(); | |
914 } | 927 } |
915 | 928 |
916 // scr_ScrollUp() | 929 // scr_ScrollUp() |
917 // Scroll up the current buddy window, half a screen. | 930 // Scroll up the current buddy window, half a screen. |
918 void scr_ScrollUp(void) | 931 void scr_ScrollUp(void) |