Jean-Marc Lasgouttes wrote:
Abdelrazak Younes <[EMAIL PROTECTED]> writes:
Edwin Leuven wrote:
Richard Heck wrote:
Well, toolbars have not been designed for several dozens of entries.
calling this a design is very nice
I didn't dare to say it ;-)
FWIW, I agree that the toolbar design is awkward, and that a rewrite
would be welcome.
The first thing to do would be to move *all* code related to toolbar and
menubar handling to the frontend. We should do the toolbar/menubar
Action unification we were talking about back before 1.4.0 (in Christmas
2005?), basically:
We have *one* file describing all actions. Each action would have the
following fields:
- the translatable name: mandatory for looking up the action
- the associated LFUN: mandatory.
- the relevant option(s): optional
- the associated icon: optional, LyX would look up for a proper icon
based on the lfun name and option (as it does now) if not present. If
really not present, construct an icon with "name" if needed on a toolbar.
- the associated default bindings: optional. These would be overridden
by any bind file in use.
If XML were chosen, something like that (from the top of my head could
do the job:
<action name="Square root">
<LFUN name="math-insert">
<option>\sqrt</option>
</LFUN>
<icon>math-insert-sqrt</icon>
<binding>A-M-s</binding>
</action>
However, I would be surprised to see someone come up
with a proper alternative to the general idea of polling getStatus
No but we could add an option for not polling getStatus and return early
in case when the LFUN is disabled. The later should be done anyway. The
only effect would be then that the icon/menu item will not be disabled.
Abdel.