Georg Baum wrote:

> Am Montag, 5. April 2004 17:31 schrieb Angus Leeming:
>> Georg Baum wrote:
>> >> Ok. 'EditCommand'. I'm happy to kill that...
>> > 
>> > This is easy. I have added an editor (similar to the viewer) to
>> > the formats mechanism in my 1.3 source.
>> 
>> > I can adapt the patch to 1.4 if you like. I always planned to
>> > propose this, but was busy with other stuff...
>> 
>> Sounds good also, but there's no rush.
> 
> Ok, here it is. Some notes:
> 
> - I left the graphics inset stuff in for reference (and who knows
> how long the graphics inset still lives?)
> - It is not much more than a proof of concept and may need some
> polishing (although I use it since some months without problems).

Ok, some little questions:

Question 1
==========
Is this safe? Ie, will it work if $FIG is empty?
+if test "$FIG" = "xfig"; then

The usual strategy is:
+if test "x$FIG" = "xxfig"; then

which is guaranteed to work with all versions of sh.


Question 2
==========
Is this safe? What happens if command.size() < 50?

+       bformat(_("An error occurred whilst running %1$s"),
+               command.substr(0, 50)));

Question 3
==========
The Formats::edit code is vastly different to the equivalent executed
by the external inset. You seem to substitute only for lyxsocket
data. Can you explain?

Question 4
==========
Why is LyXRC::RC_EDITOR needed? Isn't this just part of the format
definition? Ie, why not extend RC_FORMAT? (And ditch RC_VIEWER also.)

Other than that, everything looks very reasonable.

> - The "Edit" button for the graphics inset is not very well placed.
> - I did not change the external inset, but you probably get the idea
> if you look at InsetGraphics::editGraphics().

Sure. We can play with the look at our leisure.

Nice work.
-- 
Angus

Reply via email to