diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-07-17 21:08:55 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-07-17 21:08:55 +0200 |
commit | 76563c9b90ab01658779a1118e3a1b6f90bc370e (patch) | |
tree | f3acf5050f4b315252b65e0dfb9558e18f2b1c71 /src/notify.c | |
parent | 8f28b8f9cce55c23137e24132eaa9d110c7cdb39 (diff) | |
download | calcurse-76563c9b90ab01658779a1118e3a1b6f90bc370e.zip |
Rework key binding context switching
Store key binding contexts using another data structure to optimize
space usage and execution time.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/notify.c')
-rw-r--r-- | src/notify.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/notify.c b/src/notify.c index a83de0c..b8ba244 100644 --- a/src/notify.c +++ b/src/notify.c @@ -775,11 +775,9 @@ static void config_option_edit(int i) /* Notify-bar configuration. */ void notify_config_bar(void) { - struct binding quit = { _("Quit"), KEY_GENERIC_QUIT }; - struct binding up = { _("Up"), KEY_MOVE_UP }; - struct binding down = { _("Down"), KEY_MOVE_DOWN }; - struct binding edit = { _("Edit Itm"), KEY_EDIT_ITEM }; - struct binding *bindings[] = { &quit, &up, &down, &edit }; + static int bindings[] = { + KEY_GENERIC_QUIT, KEY_MOVE_UP, KEY_MOVE_DOWN, KEY_EDIT_ITEM + }; struct listbox lb; int ch; |