]> Pileus Git - lackey/commitdiff
Bug fixes
authorAndy Spencer <andy753421@gmail.com>
Mon, 22 Oct 2012 03:28:50 +0000 (03:28 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 22 Oct 2012 03:28:50 +0000 (03:28 +0000)
src/view.c
views/day.c
views/todo.c

index 3f1adb1659bcba89588d3c436bf6b4a54209f963..5c18d03a490684cf6f05eb03808741454f75cc61 100644 (file)
@@ -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;
index 4c21c67817f8111d99797cdec78d971e6fc2b45c..c72b1725afdc77edb16b63d6b1cdf619438d51fa 100644 (file)
@@ -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;
 }
 
index e4527946a31ddc67aa020c612eb10595eada62a0..47bea59855e20bb0b8f82536fd3d60e0712a60f9 100644 (file)
@@ -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)