[education/rkward] rkward/rbackend/rpackages/rkward/R: Avoid use of depreacted rk.show.question()
Thomas Friedrichsmeier
null at kde.org
Sun Jan 23 21:25:57 GMT 2022
Git commit 98342779ad220a11cb54658a1dd10d6750fc9033 by Thomas Friedrichsmeier.
Committed on 23/01/2022 at 21:25.
Pushed by tfry into branch 'master'.
Avoid use of depreacted rk.show.question()
M +6 -7 rkward/rbackend/rpackages/rkward/R/public_graphics.R
https://invent.kde.org/education/rkward/commit/98342779ad220a11cb54658a1dd10d6750fc9033
diff --git a/rkward/rbackend/rpackages/rkward/R/public_graphics.R b/rkward/rbackend/rpackages/rkward/R/public_graphics.R
index d7641881..3904d38e 100644
--- a/rkward/rbackend/rpackages/rkward/R/public_graphics.R
+++ b/rkward/rbackend/rpackages/rkward/R/public_graphics.R
@@ -592,8 +592,8 @@
else if (!.unsavedPlot$is.os)
ret <- TRUE
else
- ret <- rk.show.question ("Large plot!\nDo you still want to store it in the history?",
- "WARNING!", button.cancel = "")
+ ret <- rk.askYesNo ("Large plot!\nDo you still want to store it in the history?",
+ prompts = c("Yes", "No", ""), caption="Save large plot?")
ret
}
.check.identical <- function (.st., pkg=NA_character_) {
@@ -626,8 +626,8 @@
n <- len.sP + 1
} else if (len.sP == ml) {
if (.pop.notify)
- .pop.notify <<- rk.show.question ("History limit reached, removing the first plot. Limits can be changed at Settings > RKWard > Output.\n\nDo you want to be notified in future?",
- "WARNING!", button.cancel = "")
+ .pop.notify <<- rk.askYesNo ("History limit reached, removing the first plot. Limits can be changed at Settings > RKWard > Output.\n\nDo you want to be notified in future?",
+ prompts=c("Yes", "No", ""), caption="History limit reached")
remove (devId = NULL, pos = 1) # sP.length changes at this point
n <- len.sP
} else {
@@ -961,10 +961,9 @@
# this is called from settings/rksettingsmoduleoutput.cpp ~199
# Length restriction:
if (len.max < sP.length) {
- ans <- rk.show.question (paste ("Current plot history has more plots than the specified limit.\nIf you continue then _",
+ ans <- rk.askYesNo (paste ("Current plot history has more plots than the specified limit.\nIf you continue then _",
sP.length - len.max, "_ of the foremost plots will be removed.\nInstead, if you ignore then the new limit will be effective only after restarting RKWard.", sep =""),
- "WARNING!",
- button.yes = "Continue", button.no = "Ignore for this session", button.cancel = "")
+ prompts= c("Continue", "Ignore for this session", ""), caption="WARNING!")
if (ans) {
options ("rk.graphics.hist.max.length" = len.max)
remove (devId = NULL, pos = 1:(sP.length - len.max))
More information about the rkward-tracker
mailing list