aboutsummaryrefslogtreecommitdiff
path: root/display.c
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2011-06-21 00:57:08 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2011-06-21 00:57:08 +0200
commit372ffbae9733945769b75e7be748dc1358290440 (patch)
tree083fd0a213dc13012173614b5ab1ffecf176460c /display.c
parent653cb4a8300732cfcc4254a8cd84fc44f8ff23e6 (diff)
downloadpowerdebug-372ffbae9733945769b75e7be748dc1358290440.tar.gz
Optimize the display
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'display.c')
-rw-r--r--display.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/display.c b/display.c
index 43f3797..be78ce0 100644
--- a/display.c
+++ b/display.c
@@ -293,12 +293,12 @@ static int display_keystroke(int fd, void *data)
case KEY_RIGHT:
case '\t':
- display_next_panel();
+ display_show_header(display_next_panel());
break;
case KEY_LEFT:
case KEY_BTAB:
- display_prev_panel();
+ display_show_header(display_prev_panel());
break;
case KEY_DOWN:
@@ -429,21 +429,15 @@ int display_init(int wdefault)
return display_refresh(wdefault);
}
-int display_header_footer(int win, const char *line)
+int display_column_name(const char *line)
{
- int ret;
-
werase(main_win);
wattron(main_win, A_BOLD);
mvwprintw(main_win, 0, 0, "%s", line);
wattroff(main_win, A_BOLD);
wrefresh(main_win);
- ret = display_show_header(win);
- if (ret)
- return ret;
-
- return display_show_footer(win);
+ return 0;
}
int display_register(int win, struct display_ops *ops)