Bennett Helm wrote:
On May 4, 2007, at 11:57 AM, Abdelrazak Younes wrote:
I did notice when trying this patch that when I drag a file to the
dock icon that is already loaded via sessions, I get the "The
document foo.lyx is already loaded. Do you want to revert to the
saved version?" dialog. That should probably be suppressed.
Yes. Using the already existing framework for initial file loading
should solve this. But this is more work :-(
I'll see what I can do.
OK, I've done it. Please test (together with session).
With this patch, double-clicking a file when LyX isn't running will
start LyX and (apparently) ignore session information about what other
files to load. So the "revert" dialog gets properly suppressed.
But is this the behavior we want? (I'm not sure it isn't; I'm just
asking.) Would it be preferable to load the double-clicked file
*together with* all other files from the session file?
Yes, this behaviour was expected. It is consistent with the one when you
pass filenames at the command line. Extract from the source code:
void LyX::restoreGuiSession()
{
LyXView * view = newLyXView();
// if some files were specified at command-line we assume that the
// user wants to edit *these* files and not to restore the session.
if (!pimpl_->files_to_load_.empty()) {
If this behaviour is to be changed, we should change it for both opening
methods IMHO.
Anyway, I think this discussion is orthogonal to the patch. I am already
glad that it works :-)
I'll commit it.
Abdel.