mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-30 05:12:40 +00:00
fix disabling of submenu items
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4956 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0b210f086d
commit
d5bf18637f
@ -1,3 +1,8 @@
|
|||||||
|
2002-08-13 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
|
||||||
|
|
||||||
|
* Menubar_pimpl.C (create_submenu): fix code to disable submenu
|
||||||
|
entries.
|
||||||
|
|
||||||
2002-08-12 Lars Gullik Bjønnes <larsbj@gullik.net>
|
2002-08-12 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||||
|
|
||||||
* FormDocument.C (saveParamsAsDefault): use proper constructment
|
* FormDocument.C (saveParamsAsDefault): use proper constructment
|
||||||
|
@ -237,6 +237,7 @@ int Menubar::Pimpl::create_submenu(Window win, XFormsView * view,
|
|||||||
|
|
||||||
it = extra_labels.begin();
|
it = extra_labels.begin();
|
||||||
size_type count = 0;
|
size_type count = 0;
|
||||||
|
all_disabled = true;
|
||||||
int curmenuid = menuid;
|
int curmenuid = menuid;
|
||||||
for (Menu::const_iterator i = menu.begin(); i != end; ++i, ++it) {
|
for (Menu::const_iterator i = menu.begin(); i != end; ++i, ++it) {
|
||||||
MenuItem const & item = (*i);
|
MenuItem const & item = (*i);
|
||||||
@ -318,14 +319,16 @@ int Menubar::Pimpl::create_submenu(Window win, XFormsView * view,
|
|||||||
}
|
}
|
||||||
|
|
||||||
case MenuItem::Submenu: {
|
case MenuItem::Submenu: {
|
||||||
|
bool sub_all_disabled;
|
||||||
int submenuid = create_submenu(win, view,
|
int submenuid = create_submenu(win, view,
|
||||||
*item.submenu(), smn,
|
*item.submenu(), smn,
|
||||||
all_disabled);
|
sub_all_disabled);
|
||||||
|
all_disabled &= sub_all_disabled;
|
||||||
if (submenuid == -1)
|
if (submenuid == -1)
|
||||||
return -1;
|
return -1;
|
||||||
string label = fixlabel(item.label());
|
string label = fixlabel(item.label());
|
||||||
label += extra_label + "%m";
|
label += extra_label + "%m";
|
||||||
if (all_disabled)
|
if (sub_all_disabled)
|
||||||
label += "%i";
|
label += "%i";
|
||||||
string shortcut = item.shortcut();
|
string shortcut = item.shortcut();
|
||||||
if (!shortcut.empty()) {
|
if (!shortcut.empty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user