---Reply to mail from Michael Nordstrom about Auto-starting a document in the viewer
> On Sun, Mar 14, 2004, Michael Nordstrom wrote: >> Since we always have to update the doclist (using InitializeDocInfoList) > > This will be too slow for normal use; I guess it should be enough to > just get the the number of documents using GetNumOfDocuments. If a > user removes documents using some external tool or ejects an external > card with Plucker documents before starting the viewer then they are > not the kind of users that this "feature" is intended for... Turns out the other 2 documents were UnitTest and his brother UnitTestDOC. I guess I had deleted them from the launcher a while back. So far it appears to work. --- viewer.c.orig Fri Mar 12 19:42:09 2004 +++ viewer.c Sun Mar 14 17:10:30 2004 @@ -220,6 +220,19 @@ FrmDeleteForm( frm ); } } + else { + MemHandle handle; + DocumentData* dataPtr; + + InitializeDocInfoList(); + if ( GetNumOfDocuments() == 1 ) { + handle = ReturnDocInfoHandle( 0 ); + dataPtr = MemHandleLock( handle ); + StrCopy( Prefs()->docName, dataPtr->name ); + Prefs()->lastForm = GetMainFormId(); + MemHandleUnlock( handle ); + } + } formId = GetValidForm( frmLibrary ); ---End reply Christopher R. Hawks HAWKSoft ------------------------------------------------------------------------- Windows without the X is like making love without a partner. win-nt from the people who invented edlin. Linux, the way to get rid of boot viruses -- MaDsen Wikholm, [EMAIL PROTECTED] _______________________________________________ plucker-dev mailing list [EMAIL PROTECTED] http://lists.rubberchicken.org/mailman/listinfo/plucker-dev