aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/main.c b/main.c
index 87f9a4a..695498e 100644
--- a/main.c
+++ b/main.c
@@ -591,8 +591,6 @@ void update_total_timers(database_t *db) {
int64_t *d6 = &db->total_times[6];
memset(db->total_times, 7, sizeof(int64_t));
-// for (task_t *task = db->tasks; task < db->tasks + db->count; task++) {
-// int64_t *times = task->times;
for (size_t idx = 0; idx < db->count; idx++) {
int64_t *times = db->tasks[idx].times;
*d0 = add_time(*d0, times[0]);
@@ -603,7 +601,6 @@ void update_total_timers(database_t *db) {
*d5 = add_time(*d5, times[5]);
*d6 = add_time(*d6, times[6]);
}
-
}
@@ -727,6 +724,11 @@ void draw_tui(database_t *db) {
// Draw outer border.
box(stdscr, 0, 0);
+ // Draw edit symbol on title when in archive mode.
+ if (db == &archive) {
+ mvaddch(0, 0, ACS_DIAMOND);
+ }
+
// Draw column grids.
int x = 0;
for (int idx = 0; idx < NUM_OF_COLUMNS - 1; idx++) {
@@ -748,7 +750,7 @@ void draw_tui(database_t *db) {
if (idx_fdow > 0 && idx_fdow < 8) {
idx_fdow = ((idx - 1) + FIRST_DAY_OF_WEEK) % 7 + 1;
}
- int header_position = x + layout->alignment_offsets[idx_fdow];
+ int header_position = x + layout->alignment_offsets[idx_fdow];
mvaddstr(0, header_position, layout->table_headers[idx_fdow]);
x += layout->column_widths[idx_fdow];
}