summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0f19ec9)
raw | patch | inline | side by side (parent: 0f19ec9)
author | Kalle Wallin <kaw@linux.se> | |
Wed, 31 Mar 2004 14:05:43 +0000 (14:05 +0000) | ||
committer | Kalle Wallin <kaw@linux.se> | |
Wed, 31 Mar 2004 14:05:43 +0000 (14:05 +0000) |
list_window.h | patch | blob | history | |
screen.c | patch | blob | history |
diff --git a/list_window.h b/list_window.h
index c53f381a7f9771921444873f9dc9a144b3fbdae5..9e91703824205e6854ce213074337a6d1f6c812f 100644 (file)
--- a/list_window.h
+++ b/list_window.h
#ifndef LIST_WINDOW_H
#define LIST_WINDOW_H
+#define LW_ROW(lw) (lw ? lw->selected-lw->start : 0)
+
typedef char * (*list_window_callback_fn_t) (int index,
int *highlight,
void *data);
diff --git a/screen.c b/screen.c
index 30bf9f34418ac290a58d4153684c67e18489e342..aabc6f0334b5b53e3a2fd46cef6730f832ec9e20 100644 (file)
--- a/screen.c
+++ b/screen.c
{
static int repeat = -1;
static int random = -1;
+ list_window_t *lw = NULL;
if( !screen->painted )
return screen_paint(c);
case SCREEN_PLAY_WINDOW:
paint_top_window(TOP_HEADER_PLAY, c->status->volume, 0);
play_update(screen, c);
+ lw = screen->playlist;
break;
case SCREEN_FILE_WINDOW:
paint_top_window(file_get_header(c), c->status->volume, 0);
file_update(screen, c);
+ lw = screen->filelist;
break;
case SCREEN_SEARCH_WINDOW:
paint_top_window(TOP_HEADER_SEARCH, c->status->volume, 0);
case SCREEN_HELP_WINDOW:
paint_top_window(TOP_HEADER_HELP, c->status->volume, 0);
help_update(screen, c);
+ lw = screen->helplist;
break;
}
paint_progress_window(c);
paint_status_window(c);
- wmove(screen->main_window.w, 0, 0); wnoutrefresh(screen->main_window.w);
+ wmove(screen->main_window.w, LW_ROW(lw), 0);
+ wnoutrefresh(screen->main_window.w);
doupdate();
}