Mercurial > hg
comparison mcabber/src/screen.c @ 265:49e9e02dd6d0
Add "/roster search" command
author | mikael@frmp8452 |
---|---|
date | Sat, 02 Jul 2005 19:23:45 +0100 |
parents | 1bcc3eec08f0 |
children | 8d3d5bd52da3 |
comparison
equal
deleted
inserted
replaced
264:b7dd4c337888 | 265:49e9e02dd6d0 |
---|---|
841 | 841 |
842 if (chatmode) | 842 if (chatmode) |
843 scr_ShowBuddyWindow(); | 843 scr_ShowBuddyWindow(); |
844 } | 844 } |
845 | 845 |
846 // scr_RosterSearch(str) | |
847 // Look forward for a buddy with jid/name containing str. | |
848 void scr_RosterSearch(char *str) | |
849 { | |
850 GList *matching_buddy; | |
851 enum imstatus prev_st = imstatus_size; // undef | |
852 | |
853 if (current_buddy) { | |
854 matching_buddy = buddy_search(str); | |
855 if (matching_buddy) { | |
856 prev_st = buddy_getstatus(BUDDATA(current_buddy)); | |
857 buddy_setflags(BUDDATA(current_buddy), ROSTER_FLAG_LOCK, FALSE); | |
858 current_buddy = matching_buddy; | |
859 if (chatmode) | |
860 buddy_setflags(BUDDATA(current_buddy), ROSTER_FLAG_LOCK, TRUE); | |
861 // We should rebuild the buddylist but not everytime | |
862 // Here we check if we were locking a buddy who is actually offline, | |
863 // and hide_offline_buddies is TRUE. In which case we need to rebuild. | |
864 if (prev_st == offline && buddylist_get_hide_offline_buddies()) | |
865 buddylist_build(); | |
866 update_roster = TRUE; | |
867 } | |
868 } | |
869 | |
870 if (chatmode) | |
871 scr_ShowBuddyWindow(); | |
872 } | |
873 | |
846 // scr_RosterUnreadMessage(next) | 874 // scr_RosterUnreadMessage(next) |
847 // Go to a new message. If next is not null, try to go to the next new | 875 // Go to a new message. If next is not null, try to go to the next new |
848 // message. If it is not possible or if next is NULL, go to the first new | 876 // message. If it is not possible or if next is NULL, go to the first new |
849 // message from unread_list. | 877 // message from unread_list. |
850 void scr_RosterUnreadMessage(int next) | 878 void scr_RosterUnreadMessage(int next) |