diff options
author | sabetts <sabetts> | 2001-09-05 07:48:49 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2001-09-05 07:48:49 +0000 |
commit | 3c255ea736cdb1e3d0bf77f1160b6d495cb090db (patch) | |
tree | 1d797050a54eaa6c73ab77e77e0e4f39ce33573c /src/actions.c | |
parent | f58ed0a036775c9090df75f3db7afc59058b4cff (diff) | |
download | ratpoison-3c255ea736cdb1e3d0bf77f1160b6d495cb090db.zip |
* src/messages.h (MESSAGE_WELCOME): The help keystroke is not
hardcoded.
* src/main.c (show_welcome_message): new function
(main): call show_welcome_message to show the welcome message.
* src/actions.h (find_keybinding_by_action): new prototype
* src/actions.c (key_actions): change to a static variable.
(key_actions_last): likewise
(key_actions_table_size): likewise
(find_keybinding_by_action): new function
Diffstat (limited to 'src/actions.c')
-rw-r--r-- | src/actions.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/actions.c b/src/actions.c index c68ae5e..74196d5 100644 --- a/src/actions.c +++ b/src/actions.c @@ -26,9 +26,25 @@ #include "ratpoison.h" -rp_action *key_actions; -int key_actions_last; -int key_actions_table_size; +static rp_action *key_actions; +static int key_actions_last; +static int key_actions_table_size; + +rp_action* +find_keybinding_by_action (char *action) +{ + int i; + + for (i=0; i<key_actions_last; i++) + { + if (!strcmp (key_actions[i].data, action)) + { + return &key_actions[i]; + } + } + + return NULL; +} rp_action* find_keybinding (KeySym keysym, int state) |