From edfbd51827de465059d2290140aa053088c4854f Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 21 Jul 2000 23:46:24 +0000 Subject: /RELOAD still didn't work right. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@502 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/keyboard.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src') 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); } } -- cgit v1.2.3