On Mon, 4 Aug 2003, Angus Leeming wrote:

> > What about the idea to just remember which one was used the last
> > time across sessions? I think that's much simpler to implement, and
> > it will work wonders.
>
> I think we have different notions of 'simple to implement'. I would
> have to create a new machinery to cache/retrieve such information.
> Now, I can certainly do that, but is it something we really want to
> have?

Well, you know about std::ifstream and std::ofstream, right?

Seriously, a feature to save such information in the .lyx directory
would be nice. It would also be nice to have for saving the last
cursor position in docs. We already store the lastfiles in a file, so it's
not entirely new territory.

Oh, you probably mean in the front-ends? Well, can't the front-ends
access global information? I would suggest to make a singleton class for
this stuff. On construction, it would load the file. On destruction,
it would save the file. Whenever the external dialog opens, it asks
for the last template. Whenever the external dialog changes, it tells
the singleton what happened.

It seems like something you can manage, you are a big boy now.

Regards,
Asger

Reply via email to