Krolyxon
Commit 0262988

Branches

Refs →

nsxiv0262988

rename: keyhandler_abort -> KEYHANDLER_ABORT (#172)

with the exception of arrays, all other var names in config.h are in ALL
CAPS. since keyhandler_abort is an unreleased feature, it should be okay
to rename it for consistency.

though.. in the future we should be more careful about naming when
adding new vars to config.h (or the codebase in general.)
Author
N-R-K
Date
2021-11-24 17:38 +0600
Committer
GitHub · 2021-11-24 14:38 +0300
Parent
7d87e6e
Commit
0262988671d41a2828614822ebad645cf9b780b9

+3 −3

2 files changed

  1. M config.def.h +1 −1
  2. M main.c +2 −2
M config.def.h View
@@ -75,7 +75,7 @@ static const int THUMB_SIZE = 3;
7575 static const int ignore_mask = Mod2Mask | LockMask;
7676
7777 /* abort the keyhandler */
78−static const KeySym keyhandler_abort = XK_Escape;
78+static const KeySym KEYHANDLER_ABORT = XK_Escape;
7979
8080 /* keyboard mappings for image and thumbnail mode: */
8181 static const keymap_t keys[] = {
M main.c View
@@ -499,7 +499,7 @@ void handle_key_handler(bool init)
499499 if (init) {
500500 close_info();
501501 snprintf(win.bar.l.buf, win.bar.l.size, "Getting key handler input "
502− "(%s to abort)...", XKeysymToString(keyhandler_abort));
502+ "(%s to abort)...", XKeysymToString(KEYHANDLER_ABORT));
503503 } else { /* abort */
504504 open_info();
505505 update_info();
@@ -642,7 +642,7 @@ static void on_keypress(XKeyEvent *kev)
642642 }
643643 if (IsModifierKey(ksym))
644644 return;
645− if (extprefix && ksym == keyhandler_abort && MODMASK(kev->state) == 0) {
645+ if (extprefix && ksym == KEYHANDLER_ABORT && MODMASK(kev->state) == 0) {
646646 handle_key_handler(false);
647647 } else if (extprefix) {
648648 run_key_handler(XKeysymToString(ksym), kev->state & ~sh);