diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2015-11-10 16:02:50 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2015-11-10 16:02:50 +0100 |
commit | 1b656abc0f600af034dbbd68a929c1498f022fb6 (patch) | |
tree | 66f1e18e622ef3857231c33e9c2ffcbb36315ce2 /inst/GUI/gmkin.R | |
parent | b6f8103d705f8519edbedaf45e8881b7a13054ed (diff) |
Adapt the "run fit" information message to other use cases
In an interactive R terminal under Windows, Ctrl-C stops a running
process. If R is started with the --slave option, the fits can not
be stopped manually.
Diffstat (limited to 'inst/GUI/gmkin.R')
-rw-r--r-- | inst/GUI/gmkin.R | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/inst/GUI/gmkin.R b/inst/GUI/gmkin.R index 08c4150..d93e296 100644 --- a/inst/GUI/gmkin.R +++ b/inst/GUI/gmkin.R @@ -891,9 +891,12 @@ show_m_spec() f.config <- gframe("", horizontal = FALSE, cont = center,
label = "Configuration")
# Handler functions {{{2
-run_confirm_message <- paste("The progress of the fit is shown in the R console.",
- "To cancel, switch to the window of the R console and press Esc (on Windows)",
- "or Ctrl-C (on Linux/Unix). Proceed to start the fit?")
+run_confirm_message <- paste("The progress of the fit is shown in the R console. ",
+ if (interactive()) { paste("You can cancel",
+ "the optimisation by switching to the window running R",
+ "and pressing Ctrl-C (in terminals) or Escape (in",
+ "the Windows R GUI). " ) } else "",
+ "Proceed to start the fit?", sep = "")
run_fit_handler <- function(h, ...) { #{{{3
gconfirm(run_confirm_message, handler = function(h, ...)
{
|