diff options
author | Timo Sirainen <cras@irssi.org> | 2000-07-21 23:46:24 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-07-21 23:46:24 +0000 |
commit | edfbd51827de465059d2290140aa053088c4854f (patch) | |
tree | b3fcfbece46944280d20bf16823cb62ff765a850 /src | |
parent | 8454f255616f0285c6d43766963477b13e82fa7f (diff) | |
download | irssi-edfbd51827de465059d2290140aa053088c4854f.zip |
/RELOAD still didn't work right.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@502 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-common/core/keyboard.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/fe-common/core/keyboard.c b/src/fe-common/core/keyboard.c index fbf1b665..7554bfa0 100644 --- a/src/fe-common/core/keyboard.c +++ b/src/fe-common/core/keyboard.c @@ -155,7 +155,8 @@ void key_unbind(const char *id, SIGNAL_FUNC func) } /* Configure new key */ -void key_configure_add(const char *id, const char *key, const char *data) +static void key_configure_create(const char *id, const char *key, + const char *data) { KEYINFO_REC *info; KEY_REC *rec; @@ -175,8 +176,16 @@ void key_configure_add(const char *id, const char *key, const char *data) rec->data = g_strdup(data); info->keys = g_slist_append(info->keys, rec); g_hash_table_insert(keys, rec->key, rec); +} + +/* Configure new key */ +void key_configure_add(const char *id, const char *key, const char *data) +{ + g_return_if_fail(id != NULL); + g_return_if_fail(key != NULL && *key != '\0'); - keyconfig_save(id, key, data); + key_configure_create(id, key, data); + keyconfig_save(id, key, data); } static void key_configure_destroy(KEY_REC *rec) @@ -245,7 +254,7 @@ void read_keyinfo(KEYINFO_REC *info, CONFIG_NODE *node) node = tmp->data; if (node->key != NULL) - key_configure_add(info->id, node->key, node->value); + key_configure_create(info->id, node->key, node->value); } } |