From 0297d897f168a185394ef28fc39ca846b22d561a Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Sun, 18 Oct 2009 21:03:25 +0200 Subject: dragging column headers --- conf.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'conf.c') diff --git a/conf.c b/conf.c index 912db783..d3702457 100644 --- a/conf.c +++ b/conf.c @@ -216,13 +216,23 @@ conf_setchanged (int c) { void conf_remove_items (const char *key) { int l = strlen (key); - DB_conf_item_t *it = conf_find (key, NULL); + DB_conf_item_t *prev = NULL; + DB_conf_item_t *it; + for (it = conf_items; it; prev = it, it = it->next) { + if (!strncasecmp (key, it->key, l)) { + break; + } + } + DB_conf_item_t *next = NULL; while (it) { - DB_conf_item_t *next = it->next; + next = it->next; conf_item_free (it); it = next; - if (strncasecmp (key, it->key, l)) { + if (!it || strncasecmp (key, it->key, l)) { break; } } + if (prev) { + prev->next = next; + } } -- cgit v1.2.3