diff options
| author | dam <dam@gudinoff> | 2022-09-20 23:49:16 +0000 |
|---|---|---|
| committer | dam <dam@gudinoff> | 2022-09-20 23:49:16 +0000 |
| commit | 48e32f34ecaab1bbe653cc84557f01b09a7f9efe (patch) | |
| tree | ef072e04a35ab748b814c58e68f46ef919213397 /main.c | |
| parent | 4d7f6246b796352f87d4e62a1aec9a7eae283e43 (diff) | |
| download | task-time-tracker-48e32f34ecaab1bbe653cc84557f01b09a7f9efe.tar.zst task-time-tracker-48e32f34ecaab1bbe653cc84557f01b09a7f9efe.zip | |
Show symbol when viewing the archive.
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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]; } |
