I like the approach in general. Some comments:

- In the Listings dialog, the "Bypass validation" checkbox should go to 
the "Avanced" tab. Furthermore, it lacks an accelerator and a tooltip (in all 
three dialogs).

- toggling this checkbox doesn't have an immediate effect (in alle three 
dialogs). You have to type something first. You'll need to add a slot 
on_bypassCB_stateChanged(int state) that does the necessary things.

> +               if (msg.empty())
> +                       return msg;
> +               else
> +                       return bformat(_("Parameter %1$s: "),
> from_utf8(name)) + msg;

return bformat(_("Parameter %1$s: %2$s"), from_utf8(name), msg);

> +               // otherwise, produce a meaningful error message.
> +               string matching_names;
> +               ListingsParams::const_iterator end = all_params_.end();
> +               for (it = all_params_.begin(); it != end; ++it) {
> +                       if (prefixIs(it->first, name)) {
> +                               if (!matching_names.empty())
> +                                       matching_names += ", ";
> +                               matching_names += it->first;
> +                       }
>                 }
> +               if (matching_names.empty())
> +                       return bformat(_("Unknown listing parameter name:
> %1$s"),
> +                                                               from_utf8(n
>ame));
> +               else 
> +                       return bformat(_("Parameters starting with '%1$s':
> %2$s"),
> +                                                               from_utf8(n
>ame), from_utf8(matching_names)); }

indendation and line length (in the original patch).

> Index: src/frontends/qt4/QDocument.cpp
> ===================================================================
> --- src/frontends/qt4/QDocument.cpp     (revision 18733)
> +++ src/frontends/qt4/QDocument.cpp     (working copy)

[...]

> +                       qt_("Input listings parameters on the right. Enter
> ? for a list of parameters.")); 

I think we can ditch this message completely. The same message is given as 
tooltip, where it makes more sense IMHO.


> Index: lib/lyx2lyx/lyx_1_5.py
> ===================================================================
> --- lib/lyx2lyx/lyx_1_5.py      (revision 18733)
> +++ lib/lyx2lyx/lyx_1_5.py      (working copy)
> @@ -1687,10 +1687,12 @@
>             [268, []],
>             [269, []],
>             [270, []],
> -           [271, [convert_ext_font_sizes]]
> +           [271, [convert_ext_font_sizes]],
> +           [272, []],
>            ]
>  
>  revert =  [
> +           [271, [revert_preamble_listings_params, revert_listings_inset,
> revert_include_listings]], [270, [revert_ext_font_sizes]],
>             [269, [revert_beamer_alert, revert_beamer_structure]],
>             [268, [revert_preamble_listings_params, revert_listings_inset,

Hm, that's not exactly what I had in mind. But if you're too lazy and José is 
fine with it, I can live with that.

Jürgen

Reply via email to