Juergen Spitzmueller wrote:

> Angus Leeming wrote:
>> What you could do is "watch" packages.lst and read it again when it
>> changes. See RenderMonitoredPreview (src/insets/render_preview.[Ch]).
>>
>> Basically, you'd store a
>> // Check the file every 2 secs
>> lyx::support::FileMonitor monitor_(std::string(), 2000);
>>
>> Once you've invoked getAvailable() the first time, you'll want to
>> monitor any changes in packages.lst. You'll  want a change in the file
>> to trigger a call to getAvailable, so:
>> monitor_.connect(&LatexFeatures::getAvailable));
>> monitor_.reset("packages.lst");
> 
> Actually, I don't think it's worth it (people are used to restart LyX
> after reconfigure anyway).

Oh, if the file is meant to change only at predetermined times, then a
single line added to lyx_cb.C's Reconfigure would do the trick:

    LatexFeatures::getAvailable();

no?

But you're probably right. Not worth it. At the moment.

-- 
Angus

Reply via email to