summaryrefslogtreecommitdiff
path: root/src/calcurse.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-06-12 22:42:28 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2012-06-13 00:12:27 +0200
commit42c486d30d8e6f82d27651e19029e332af86cba3 (patch)
treec02b65cdda719ca0f1f30a85696737071c2b798c /src/calcurse.c
parent844d35e851b5ef51bc8c0822dbd699b619ddd194 (diff)
downloadcalcurse-42c486d30d8e6f82d27651e19029e332af86cba3.zip
Rename displacement enumeration elements
* Rename "LEFT" to "DAY_PREV", "RIGHT" to "DAY_NEXT", "UP" to "WEEK_PREV" and "DOWN" to "WEEK_NEXT" to reflect the semantics of these operations. Remove the unneeded "MOVES" element. * Reorder code to improve consistency. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/calcurse.c')
-rw-r--r--src/calcurse.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/calcurse.c b/src/calcurse.c
index 9e42eee..e80e9dc 100644
--- a/src/calcurse.c
+++ b/src/calcurse.c
@@ -398,19 +398,19 @@ int main(int argc, char **argv)
wins_update(FLAG_ALL);
break;
- case KEY_GENERIC_NEXT_DAY:
- case KEY_MOVE_RIGHT:
- if (wins_slctd() == CAL || key == KEY_GENERIC_NEXT_DAY) {
- calendar_move(RIGHT, count);
+ case KEY_GENERIC_PREV_DAY:
+ case KEY_MOVE_LEFT:
+ if (wins_slctd() == CAL || key == KEY_GENERIC_PREV_DAY) {
+ calendar_move(DAY_PREV, count);
inday = do_storage(1);
wins_update(FLAG_CAL | FLAG_APP);
}
break;
- case KEY_GENERIC_PREV_DAY:
- case KEY_MOVE_LEFT:
- if (wins_slctd() == CAL || key == KEY_GENERIC_PREV_DAY) {
- calendar_move(LEFT, count);
+ case KEY_GENERIC_NEXT_DAY:
+ case KEY_MOVE_RIGHT:
+ if (wins_slctd() == CAL || key == KEY_GENERIC_NEXT_DAY) {
+ calendar_move(DAY_NEXT, count);
inday = do_storage(1);
wins_update(FLAG_CAL | FLAG_APP);
}
@@ -419,7 +419,7 @@ int main(int argc, char **argv)
case KEY_GENERIC_PREV_WEEK:
case KEY_MOVE_UP:
if (wins_slctd() == CAL || key == KEY_GENERIC_PREV_WEEK) {
- calendar_move(UP, count);
+ calendar_move(WEEK_PREV, count);
inday = do_storage(1);
wins_update(FLAG_CAL | FLAG_APP);
} else if (wins_slctd() == APP) {
@@ -441,7 +441,7 @@ int main(int argc, char **argv)
case KEY_GENERIC_NEXT_WEEK:
case KEY_MOVE_DOWN:
if (wins_slctd() == CAL || key == KEY_GENERIC_NEXT_WEEK) {
- calendar_move(DOWN, count);
+ calendar_move(WEEK_NEXT, count);
inday = do_storage(1);
wins_update(FLAG_CAL | FLAG_APP);
} else if (wins_slctd() == APP) {