From 76563c9b90ab01658779a1118e3a1b6f90bc370e Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 17 Jul 2014 21:08:55 +0200 Subject: 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 --- src/notify.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/notify.c') 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; -- cgit v1.2.3