diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 19a584d86d..f927cc22e8 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,8 @@ +2002-08-13 Jean-Marc Lasgouttes + + * Menubar_pimpl.C (create_submenu): fix code to disable submenu + entries. + 2002-08-12 Lars Gullik Bjønnes * FormDocument.C (saveParamsAsDefault): use proper constructment diff --git a/src/frontends/xforms/Menubar_pimpl.C b/src/frontends/xforms/Menubar_pimpl.C index 9538925585..e4d261a39e 100644 --- a/src/frontends/xforms/Menubar_pimpl.C +++ b/src/frontends/xforms/Menubar_pimpl.C @@ -237,6 +237,7 @@ int Menubar::Pimpl::create_submenu(Window win, XFormsView * view, it = extra_labels.begin(); size_type count = 0; + all_disabled = true; int curmenuid = menuid; for (Menu::const_iterator i = menu.begin(); i != end; ++i, ++it) { MenuItem const & item = (*i); @@ -318,14 +319,16 @@ int Menubar::Pimpl::create_submenu(Window win, XFormsView * view, } case MenuItem::Submenu: { + bool sub_all_disabled; int submenuid = create_submenu(win, view, *item.submenu(), smn, - all_disabled); + sub_all_disabled); + all_disabled &= sub_all_disabled; if (submenuid == -1) return -1; string label = fixlabel(item.label()); label += extra_label + "%m"; - if (all_disabled) + if (sub_all_disabled) label += "%i"; string shortcut = item.shortcut(); if (!shortcut.empty()) {