quit when PDF file no longer exists

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24478 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Joost Verburg 2008-04-23 20:40:46 +00:00
parent 8a74c33df1
commit 72c31a4e73
4 changed files with 11 additions and 4 deletions

Binary file not shown.

View File

@ -157,8 +157,15 @@ Section "View PDF file"
!insertmacro SystemCall "kernel32::WaitForSingleObject(i $ChangeNotification, i 10000) i.s"
Pop $WaitReturn
# Check whether a lock is still active.
# If not, Adode Reader is closed and we can close this application as well
# Check whether the PDF still exists (if not, LyX is being closed)
${IfNot} ${FileExists} $LockedFile
# Quit this application
!insertmacro SystemCall "kernel32::FindCloseChangeNotification(i $ChangeNotification)"
Quit
${EndIf}
# Check whether the lock is still active (if not, Adobe Reader being closed)
FileOpen $LockedFile $PDFFile a