-
- /* actually print items */
- for (i = TopBuffy, line=first_line; i < Incoming.len && line < last_line; i++) {
- tmp = Incoming.arr[i];
-
- if (i == CurBuffy)
- SETCOLOR (MT_COLOR_INDICATOR);
- else if (tmp->new > 0)
- SETCOLOR (MT_COLOR_NEW);
- else if (tmp->msg_flagged > 0)
- SETCOLOR (MT_COLOR_FLAGGED);
- else
- SETCOLOR (MT_COLOR_NORMAL);
-
- move (line, 0);
- line += make_sidebar_entry (tmp->path, i, SidebarWidth-delim_len);
- }
-
- SETCOLOR (MT_COLOR_NORMAL);
-
- /* fill with blanks to bottom */
- memset(&blank, ' ', sizeof(blank));
- for (; line < last_line; line++) {
- move (line, 0);
- addnstr (blank, SidebarWidth-delim_len);
- }
- return 0;
-}
-
-/* returns index of new item with new mail or -1 */
-static int exist_next_new () {
- int i = 0;
- if (!Incoming.len)
- return (-1);
- i = CurBuffy + 1;
- while (i < Incoming.len)
- if (Incoming.arr[i++]->new > 0)
- return (i-1);
- return (-1);
-}
-
-/* returns index of prev item with new mail or -1 */
-static int exist_prev_new () {
- int i = 0;
- if (!Incoming.len)
- return (-1);
- i = CurBuffy - 1;
- while (i >= 0)
- if (Incoming.arr[i--]->new > 0)
- return (i+1);
- return (-1);