Skip to content

gui: Fix change-view accelerators for GcalWindow

Commit 2d5b1aa9 removed the GCAL_WINDOW_VIEW_DAY variant of the GcalWindowView enum. Since then, the change-view accelerators to switch to GCAL_WINDOW_VIEW_{WEEK,MONTH,YEAR} were broken, as the accelerator setup was assuming GCAL_WINDOW_VIEW_WEEK==1, which isn't true anymore with GCAL_WINDOW_VIEW_DAY being gone.

This change fixes the enum values in the accelerator setup.

Fixes #706 (closed)

A second commit (not technically needed for the fix) cleans up a nested, and in my view unnecessary, CLAMP() call in the change-view action handler. Feel free to ignore this if my reasoning that it is unnecessary is wrong.

Edited by Johannes Maibaum

Merge request reports