net/wavemon: update to version 0.7.2, include some upstream patches
[openwrt/svn-archive/archive.git] / net / wavemon / patches / 000-upstream-config_menu.patch
1 From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
2 Date: Sat, 12 Mar 2011 19:32:56 +0000 (+0100)
3 Subject: Configuration screen: memorize last active line
4 X-Git-Url: http://eden-feed.erg.abdn.ac.uk/cgi-bin/gitweb.cgi?p=wavemon.git;a=commitdiff_plain;h=094538edab8a590ffb14af2101725563d2453104
5
6 Configuration screen: memorize last active line
7
8 This fixes a bug in the configuration menu - the last active line was not
9 reset properly when switching back from another window. Changed it in such
10 a way that it now memorizes the last active position, which is handy when
11 trying out different values for a given parameter.
12 ---
13
14 diff --git a/conf_scr.c b/conf_scr.c
15 index b9aba23..a338771 100644
16 --- a/conf_scr.c
17 +++ b/conf_scr.c
18 @@ -165,9 +165,11 @@ void scr_conf_init(void)
19 w_conf = newwin_title(0, WAV_HEIGHT, "Preferences", false);
20 w_confpad = newpad(num_items + 1, CONF_SCREEN_WIDTH);
21
22 - while ((item = ll_get(conf_items, active_item)) && item->type == t_sep)
23 - active_item++;
24 - first_item = active_item;
25 + if (first_item) /* already initialized */
26 + return;
27 + while ((item = ll_get(conf_items, first_item)) && item->type == t_sep)
28 + first_item++;
29 + active_item = first_item;
30 }
31
32 int scr_conf_loop(WINDOW *w_menu)