Mercurial > hg
comparison mcabber/src/screen.c @ 715:be9f6224c3ca
Do not show the roster when it is hidden and we're moving in the roster
The currently selected buddy is now shown in the chat status line, so
there is no reason to automatically reenable the roster anymore.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 04 Mar 2006 22:16:39 +0100 |
parents | 4bcd48f6ca5f |
children | ba1137a01078 |
comparison
equal
deleted
inserted
replaced
714:4bcd48f6ca5f | 715:be9f6224c3ca |
---|---|
934 else | 934 else |
935 roster_hidden = !roster_hidden; | 935 roster_hidden = !roster_hidden; |
936 | 936 |
937 if (roster_hidden != old_roster_status) { | 937 if (roster_hidden != old_roster_status) { |
938 if (roster_hidden) { | 938 if (roster_hidden) { |
939 // The requested status is hidden. | |
940 // Let's check it makes sense... | |
941 if ((!current_buddy) || | |
942 ((buddy_gettype(BUDDATA(current_buddy)) & | |
943 (ROSTER_TYPE_USER|ROSTER_TYPE_ROOM|ROSTER_TYPE_AGENT)) == 0)) { | |
944 // We should not hide the roster. | |
945 roster_hidden = FALSE; | |
946 return; // No need to refresh, a priori. | |
947 } | |
948 // Enter chat mode | 939 // Enter chat mode |
949 scr_set_chatmode(TRUE); | 940 scr_set_chatmode(TRUE); |
950 scr_ShowBuddyWindow(); | 941 scr_ShowBuddyWindow(); |
951 } | 942 } |
952 // Recalculate windows size and redraw | 943 // Recalculate windows size and redraw |
1046 * buddy_getstatus() call. | 1037 * buddy_getstatus() call. |
1047 */ | 1038 */ |
1048 | 1039 |
1049 if (!current_buddy || !newbuddy) return; | 1040 if (!current_buddy || !newbuddy) return; |
1050 if (newbuddy == current_buddy) return; | 1041 if (newbuddy == current_buddy) return; |
1051 | |
1052 // We're changing the selected buddy, the roster must be displayed. | |
1053 scr_RosterVisibility(1); | |
1054 | 1042 |
1055 prev_st = buddy_getstatus(BUDDATA(current_buddy), NULL); | 1043 prev_st = buddy_getstatus(BUDDATA(current_buddy), NULL); |
1056 buddy_setflags(BUDDATA(current_buddy), ROSTER_FLAG_LOCK, FALSE); | 1044 buddy_setflags(BUDDATA(current_buddy), ROSTER_FLAG_LOCK, FALSE); |
1057 if (chatmode) | 1045 if (chatmode) |
1058 alternate_buddy = current_buddy; | 1046 alternate_buddy = current_buddy; |