> 1/ we do not get the underlined shortcuts

That belongs to shortcut:LFUN.

> 2/ we do not get the nice triangle between levels

That will not be configurable, but I can certainly use triangles.

> 3/ there is no line breaking possible of the inset and the result will
>    look bad on screen.

That is right.

> I understand they are difficult to solve, but it is an example of a
> loss of UI for the sake of implementation.

A UI can not solve any of the problem. What you want is arg2, like
separator of menu, and maybe default values.

> > Note that all such GUI-related information is only available in GUI
> > mode, when shortcuts and menus are available in memory. In non-GUI
> > mode, these inset will print out 'GUI Only Info'. This problem can be
> > fixed by loading Menu and shortcut backends (not the frontends) in
> > batch mode though.
>
> We have to make sure that they are available in GUI mode. Since this
> inset is intended for documentation, we have to ensure that it works
> when documentation is generated in batch mode. OTOH, I do not think it
> would be a real problem to load bindings and ui files in non_gui mode.

OK.

> > +             os << _("Information regarding ");
> > +             switch (type_) {
> > +             case UNKNOWN_INFO:
> > +                     os << _("unknown");
> > +                     break;
> > +             case SHORTCUT_INFO:
> > +                     os << _("shortcut");
> > +                     break;
>
> There are several places where this enum<->string thing is done, I
> think it should be factorized. You may want to look at the Translator
> template in support.
>
> > +void InsetInfo::setInfo(string const & name)
> > +{
> > +     if (name.empty())
> > +             return;
> > +     if (prefixIs(name, "shortcut:")) {
> > +             type_ = SHORTCUT_INFO;
> > +             name_ = name.substr(9);
>
> I do not think it make sense to keep this foo:bar syntax. "foo bar" is
> just as easy and simplifies your code.

Yes.

> > +bool searchSubmenu(Menu & menu, FuncRequest & func, stack<docstring> & 
> > names)
> > +{
> > +     Menu::const_iterator m = menu.begin();
> > +     Menu::const_iterator end = menu.end();
> > +     for (; m != end; ++m) {
> > +             if (m->kind() == MenuItem::Command && m->func() == func) {
> > +                     names.push(m->label());
> > +                     return true;
> > +             } else if (m->kind() == MenuItem::Submenu) {
> > +                     names.push(m->label());
> > +                     Menu submenu = menubackend.getMenu(m->submenuname());
> > +                     if (searchSubmenu(submenu, func, names))
> > +                             return true;
> > +                     else
> > +                             names.pop();
> > +             }
> > +     }
> > +     return false;
> > +}
>
> This could be renamed to searchFunc and moved to MenuBackend.

Yes.

> > +     case PACKAGE_INFO:
> > +             // check in packages.lst
> > +             info_ = LaTeXFeatures::isAvailable(name_) ? _("yes") : 
> > _("no");
>
> The translation shall be done in the language of the document, to be
> correct. It will not matter most of the time, but still...

But translators can not change this inset in LaTeXConfig.lyx...

Bo

Reply via email to