From 04f125d55c343fee27ef0c344451b626a13318a7 Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Mon, 22 Oct 2012 03:28:50 +0000 Subject: [PATCH] Bug fixes --- src/view.c | 8 +++++--- views/day.c | 2 +- views/todo.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/view.c b/src/view.c index 3f1adb1..5c18d03 100644 --- a/src/view.c +++ b/src/view.c @@ -50,7 +50,7 @@ view_t views[] = { { "Help", help_init, help_size, help_draw, help_run, {KEY_F(8), '8', '?'} }, }; -int active = 6; +int active = 0; /* Local functions */ static void draw_header(void) @@ -113,8 +113,10 @@ void event_line(WINDOW *win, event_t *event, int y, int x, int w, int full) if (color) wattroff(win, COLOR_PAIR(color)); if (full) { - mvwprintw(win, y, x, " %02d:%02d - ", event->start.hour, event->start.min); - x += 9; + mvwprintw(win, y, x, " %2d:%02d-%2d:%02d -", + event->start.hour, event->start.min, + event->end.hour, event->end.min); + x += 15; } if (event->name) { const char *label = event->name ?: event->desc; diff --git a/views/day.c b/views/day.c index 4c21c67..c72b172 100644 --- a/views/day.c +++ b/views/day.c @@ -36,7 +36,7 @@ static WINDOW *body; static void clear_old(event_t **list, int n, event_t *cur) { for (int i = 0; i < n; i++) - if (list[i] && compare(&list[i]->end, &cur->start) < 0) + if (list[i] && compare(&list[i]->end, &cur->start) <= 0) list[i] = NULL; } diff --git a/views/todo.c b/views/todo.c index e452794..47bea59 100644 --- a/views/todo.c +++ b/views/todo.c @@ -29,7 +29,7 @@ static int rows; static int show_new = 1; static int show_started = 1; -static int show_finished = 1; +static int show_finished = 0; /* Helper functions */ static int print_todos(WINDOW *win, int row, todo_t *todos, status_t low, status_t high) -- 2.43.2