From 1b656abc0f600af034dbbd68a929c1498f022fb6 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 10 Nov 2015 16:02:50 +0100 Subject: 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. --- inst/GUI/gmkin.R | 9 ++++++--- 1 file 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, ...) { -- cgit v1.2.1