From 48215d2590d12ffc3aa82313bd76640b0b58bdba Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Sun, 9 Jun 2013 20:06:54 +0200 Subject: [PATCH] Synchronise with v3.10-rc5 Version-bump only. Signed-off-by: "Yann E. MORIN" --- .version | 2 +- frontends/mconf/mconf.c | 11 ++++++----- libs/lxdialog/menubox.c | 9 +++++---- libs/parser/menu.c | 15 ++++++++++++++- scripts/ksync.log | 3 +++ utils/tweak.in | 2 +- 6 files changed, 30 insertions(+), 12 deletions(-) diff --git a/.version b/.version index 1b00586..be9cf34 100644 --- a/.version +++ b/.version @@ -1,2 +1,2 @@ -3.10.0-rc4 d683b96b072dc4680fc74964eca77e6a23d1fa6e Unicycling Gorilla +3.10.0-rc5 317ddd256b9c24b0d78fa8018f80f1e495481a10 Unicycling Gorilla git diff --git a/frontends/mconf/mconf.c b/frontends/mconf/mconf.c index 387dc8d..a69cbd7 100644 --- a/frontends/mconf/mconf.c +++ b/frontends/mconf/mconf.c @@ -670,11 +670,12 @@ static void conf(struct menu *menu, struct menu *active_menu) active_menu, &s_scroll); if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL) break; - if (!item_activate_selected()) - continue; - if (!item_tag()) - continue; - + if (item_count() != 0) { + if (!item_activate_selected()) + continue; + if (!item_tag()) + continue; + } submenu = item_data(); active_menu = item_data(); if (submenu) diff --git a/libs/lxdialog/menubox.c b/libs/lxdialog/menubox.c index 48d382e..38cd69c 100644 --- a/libs/lxdialog/menubox.c +++ b/libs/lxdialog/menubox.c @@ -303,10 +303,11 @@ do_resize: } } - if (i < max_choice || - key == KEY_UP || key == KEY_DOWN || - key == '-' || key == '+' || - key == KEY_PPAGE || key == KEY_NPAGE) { + if (item_count() != 0 && + (i < max_choice || + key == KEY_UP || key == KEY_DOWN || + key == '-' || key == '+' || + key == KEY_PPAGE || key == KEY_NPAGE)) { /* Remove highligt of current item */ print_item(scroll + choice, choice, FALSE); diff --git a/libs/parser/menu.c b/libs/parser/menu.c index b5c7d90..fd3f018 100644 --- a/libs/parser/menu.c +++ b/libs/parser/menu.c @@ -146,11 +146,24 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e struct menu *menu = current_entry; while ((menu = menu->parent) != NULL) { + struct expr *dup_expr; + if (!menu->visibility) continue; + /* + * Do not add a reference to the + * menu's visibility expression but + * use a copy of it. Otherwise the + * expression reduction functions + * will modify expressions that have + * multiple references which can + * cause unwanted side effects. + */ + dup_expr = expr_copy(menu->visibility); + prop->visible.expr = expr_alloc_and(prop->visible.expr, - menu->visibility); + dup_expr); } } diff --git a/scripts/ksync.log b/scripts/ksync.log index ec74752..162f63f 100644 --- a/scripts/ksync.log +++ b/scripts/ksync.log @@ -49,3 +49,6 @@ kconfig: fix randconfig tristate detection menuconfig: Add "breadcrumbs" navigation aid menuconfig: Fix memory leak introduced by jump keys feature merge_config.sh: Avoid creating unnessary source softlinks +57a9c76 scripts/config: fix assignment of parameters for short version of --*-after options +063f466 mconf: handle keys in empty dialogs +e983b7b kconfig/menu.c: fix multiple references to expressions in menu_add_prop() diff --git a/utils/tweak.in b/utils/tweak.in index 7734522..3434cbf 100644 --- a/utils/tweak.in +++ b/utils/tweak.in @@ -105,7 +105,7 @@ while [ "$1" != "" ] ; do ;; --refresh) ;; - --*-after) + --*-after|-E|-D|-M) checkarg "$1" A=$ARG checkarg "$2" -- 2.39.5