]> git.lyx.org Git - features.git/commitdiff
Effectively disable the "Stop command?" dialog
authorScott Kostyshak <skostysh@lyx.org>
Fri, 25 Nov 2022 15:06:59 +0000 (10:06 -0500)
committerScott Kostyshak <skostysh@lyx.org>
Fri, 25 Nov 2022 15:25:40 +0000 (10:25 -0500)
We now allow the user to cancel the background process at any point
(via the red "x" in the status bar or Document > Cancel Export), so
we do not need to poll the user with the dialog.

The patch works by setting timeout to "-1" which is treated as a
special value to disable the poll.

Fix (by obviation) #12531 and #9953, which were about the dialog.

lib/RELEASE-NOTES
src/support/os.cpp

index d879510b449e26466bd9d8be69c6799b4071ae6d..d3f02890d0151da439fd5f3bdfa3abfa0de025a3 100644 (file)
@@ -3,10 +3,12 @@
 
 !!Interface changes
 
-* It is now possible to cancel background export processes. A menu entry
-  to do so will appear on the Document menu when such a process is underway.
-  The LFUN for this is export-cancel. One can also click on the red 'x' next
-  to the spinner to cancel export.
+* It is now possible to cancel background export processes at any time. A menu
+  entry to do so will appear on the Document menu when such a process is
+  underway.  The LFUN for this is export-cancel. One can also click on the red
+  'x' next to the spinner to cancel export. Thanks to this functionality, we now
+  remove the "Stop command?" prompt, which polled users whether to stop a long
+  process.
 
 * The items on the Edit menu have been reordered, and many of the shortcuts
   have been changed so that they are more intuitive in the case of often
index 8fd64920b848289cc35b40c6bd806393640e3e08..cafe4b1cb9dd6851db3ceda686de5d871919ebef 100644 (file)
@@ -47,9 +47,12 @@ namespace os {
 
 int timeout_ms()
 {
-       // return -1 to disable the timeout completely.
-       // (-1 is a special case in SystemcallPrivate::waitWhile()).
-       return 3 * 60 * 1000;
+       // Starting in 2.4.0, we allow the user to cancel the background
+       // process at any time with LFUN_EXPORT_CANCEL, so the timeout dialog
+       // is no longer useful.
+       // "-1" effectively disables the timeout (it is a special case in
+       // SystemcallPrivate::waitWhile()).
+       return -1;
 }