Juergen Spitzmueller wrote:

> Angus Leeming wrote:
>> ..and what's a PackagesList? Is the compiler looking for
>>
>> LaTeXFeatures::PackagesList LaTeXFeatures::packages_;
>>
>> perhaps?
> 
> Umm. Thank you both.
> The static list works now. The only drawback (vs. non-static) is that you
> have to restart LyX to get packages.lst reparsed. But I think we can live
> with that.

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");

> Attached is the final patch, including Georg's lyx2lyx changes (thanks!).
> I will apply soon.
> 
> Regards,
> Jürgen

-- 
Angus

Reply via email to