Jean-Marc Lasgouttes wrote:
"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:
Yes, I'd prefer a single function that does the check in any case.
Abdelrazak> This is difficult to do for now without a cleanup of
Abdelrazak> LyXFunc or a reordering of object initialisation on start
Abdelrazak> up. This is because the MenuBackend is constructed and
Abdelrazak> initiliazed before any view is created.
You are right of course. We should do no checking when initially
reading the menus, but do some checking when doing expand.
In this case, it makes sense to have two methods add() and
addWithStatus(), or add a boolean parameter to add() indicating what
to do.
OK, I'll see what I can do over the week-end.
Actually, what this shows is that menus-before-expand and
menus-after-expand should be two different classes (the first one
should not know about status and the second one should not know about
special menuitem kinds), but I am not sure it is worth the hassle.
Don't know... we'll see if I feel brave enough...
Abdel.