mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-14 09:32:20 +00:00
quit when PDF file no longer exists
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@24479 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0abbee54ce
commit
f7a99220f2
@ -92,7 +92,7 @@ Var CurrentTimeLow
|
|||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
#--------------------------------
|
#--------------------------------
|
||||||
# PDF vieweing
|
# PDF viewing
|
||||||
|
|
||||||
Section "View PDF file"
|
Section "View PDF file"
|
||||||
|
|
||||||
@ -157,8 +157,15 @@ Section "View PDF file"
|
|||||||
!insertmacro SystemCall "kernel32::WaitForSingleObject(i $ChangeNotification, i 10000) i.s"
|
!insertmacro SystemCall "kernel32::WaitForSingleObject(i $ChangeNotification, i 10000) i.s"
|
||||||
Pop $WaitReturn
|
Pop $WaitReturn
|
||||||
|
|
||||||
# Check whether a lock is still active.
|
# Check whether the PDF still exists (if not, LyX is being closed)
|
||||||
# If not, Adode Reader is closed and we can close this application as well
|
|
||||||
|
${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
|
FileOpen $LockedFile $PDFFile a
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user