[rkward] /: Add parameter "default.button" to rk.show.message().
Thomas Friedrichsmeier
null at kde.org
Tue May 8 08:37:31 UTC 2018
Git commit 810d6d981d9d9008b00f105b3119f5de5b87337b by Thomas Friedrichsmeier.
Committed on 08/05/2018 at 08:35.
Pushed by tfry into branch 'master'.
Add parameter "default.button" to rk.show.message().
This means quite a bit of internal rewrites, as KMessageBox does not support this.
Also, improve documentation.
M +1 -0 ChangeLog
M +7 -6 rkward/rbackend/rkrbackend.cpp
M +40 -31 rkward/rbackend/rkrinterface.cpp
M +1 -1 rkward/rbackend/rpackages/rkward/DESCRIPTION
M +17 -10 rkward/rbackend/rpackages/rkward/R/rk.KDE_GUI-functions.R
M +0 -1 rkward/rbackend/rpackages/rkward/man/RKdevice.Rd
M +3 -3 rkward/rbackend/rpackages/rkward/man/rk.assign.preview.data.Rd
M +5 -6 rkward/rbackend/rpackages/rkward/man/rk.call.plugin.Rd
M +3 -4 rkward/rbackend/rpackages/rkward/man/rk.demo.Rd
M +6 -4 rkward/rbackend/rpackages/rkward/man/rk.edit.Rd
M +0 -1 rkward/rbackend/rpackages/rkward/man/rk.embed.device.Rd
M +8 -6 rkward/rbackend/rpackages/rkward/man/rk.get.tempfile.name.Rd
M +5 -5 rkward/rbackend/rpackages/rkward/man/rk.graph.on.Rd
M +8 -4 rkward/rbackend/rpackages/rkward/man/rk.label.Rd
M +4 -4 rkward/rbackend/rpackages/rkward/man/rk.list.plugins.Rd
M +3 -4 rkward/rbackend/rpackages/rkward/man/rk.load.pluginmaps.Rd
M +4 -3 rkward/rbackend/rpackages/rkward/man/rk.misc.Rd
M +0 -1 rkward/rbackend/rpackages/rkward/man/rk.old.packages.Rd
M +3 -4 rkward/rbackend/rpackages/rkward/man/rk.printer.device.Rd
M +0 -1 rkward/rbackend/rpackages/rkward/man/rk.record.commands.Rd
M +3 -4 rkward/rbackend/rpackages/rkward/man/rk.replace.function.Rd
M +10 -6 rkward/rbackend/rpackages/rkward/man/rk.results.Rd
M +0 -1 rkward/rbackend/rpackages/rkward/man/rk.screen.device.Rd
M +3 -4 rkward/rbackend/rpackages/rkward/man/rk.sessionInfo.Rd
M +24 -15 rkward/rbackend/rpackages/rkward/man/rk.show.messages.Rd
M +0 -1 rkward/rbackend/rpackages/rkward/man/rk.switch.frontend.language.Rd
M +4 -4 rkward/rbackend/rpackages/rkward/man/rk.sync.Rd
M +0 -1 rkward/rbackend/rpackages/rkward/man/rk.with.window.hints.Rd
M +0 -1 rkward/rbackend/rpackages/rkward/man/rk.without.plot.history.Rd
M +5 -5 rkward/rbackend/rpackages/rkward/man/rk.workplace.Rd
M +0 -1 rkward/rbackend/rpackages/rkward/man/rkward-package.Rd
https://commits.kde.org/rkward/810d6d981d9d9008b00f105b3119f5de5b87337b
diff --git a/ChangeLog b/ChangeLog
index d01639a2..cee7bb2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
--- Version 0.7.1 - UNRELEASED
+- rk.show.message() gains a parameter to allow setting a default button other than "yes"
- Compile in ui definitions, instead of providing them as separate files
- Fix printing of strings with R 3.5.0 on Windows in the console
- Offer R_LIBS_USER, instead of ~/.rkward/library as standard library installation location
diff --git a/rkward/rbackend/rkrbackend.cpp b/rkward/rbackend/rkrbackend.cpp
index 3ce1f71f..6754d0ad 100644
--- a/rkward/rbackend/rkrbackend.cpp
+++ b/rkward/rbackend/rkrbackend.cpp
@@ -734,7 +734,7 @@ int RShowFiles (int nfile, const char **file, const char **headers, const char *
/* FROM R_ext/RStartup.h: "Return value here is expected to be 1 for Yes, -1 for No and 0 for Cancel:
symbolic constants in graphapp.h" */
-int doDialogHelper (QString caption, QString message, QString button_yes, QString button_no, QString button_cancel, bool wait) {
+int doDialogHelper (QString caption, QString message, QString button_yes, QString button_no, QString button_cancel, QString default_button, bool wait) {
RK_TRACE (RBACKEND);
RBackendRequest request (wait, RBackendRequest::ShowMessage);
@@ -743,6 +743,7 @@ int doDialogHelper (QString caption, QString message, QString button_yes, QStrin
request.params["button_yes"] = QVariant (button_yes);
request.params["button_no"] = QVariant (button_no);
request.params["button_cancel"] = QVariant (button_cancel);
+ request.params["default"] = QVariant (default_button);
RKRBackend::this_pointer->handleRequest (&request);
@@ -754,10 +755,10 @@ int doDialogHelper (QString caption, QString message, QString button_yes, QStrin
return 0;
}
-SEXP doDialog (SEXP caption, SEXP message, SEXP button_yes, SEXP button_no, SEXP button_cancel, SEXP wait) {
+SEXP doDialog (SEXP caption, SEXP message, SEXP button_yes, SEXP button_no, SEXP button_cancel, SEXP default_button, SEXP wait) {
RK_TRACE (RBACKEND);
- int result = doDialogHelper (RKRSupport::SEXPToString (caption), RKRSupport::SEXPToString (message), RKRSupport::SEXPToString (button_yes), RKRSupport::SEXPToString (button_no), RKRSupport::SEXPToString (button_cancel), RKRSupport::SEXPToInt (wait));
+ int result = doDialogHelper (RKRSupport::SEXPToString (caption), RKRSupport::SEXPToString (message), RKRSupport::SEXPToString (button_yes), RKRSupport::SEXPToString (button_no), RKRSupport::SEXPToString (button_cancel), RKRSupport::SEXPToString (default_button), RKRSupport::SEXPToInt (wait));
SEXP ret = Rf_allocVector(INTSXP, 1);
INTEGER (ret)[0] = result;
@@ -767,7 +768,7 @@ SEXP doDialog (SEXP caption, SEXP message, SEXP button_yes, SEXP button_no, SEXP
void RShowMessage (const char* message) {
RK_TRACE (RBACKEND);
- doDialogHelper (i18n ("Message from the R backend"), message, "ok", QString (), QString (), true);
+ doDialogHelper (i18n ("Message from the R backend"), message, "ok", QString (), QString (), "ok", true);
}
// TODO: currently used on windows, only!
@@ -775,7 +776,7 @@ int RAskYesNoCancel (const char* message) {
RK_TRACE (RBACKEND);
if (RKRBackend::this_pointer->killed) return -1; // HACK: At this point R asks whether to save the workspace. We have already handled that. So return -1 for "no"
- return doDialogHelper (i18n ("Question from the R backend"), message, "yes", "no", "cancel", true);
+ return doDialogHelper (i18n ("Question from the R backend"), message, "yes", "no", "cancel", "yes", true);
}
void RBusy (int busy) {
@@ -1107,7 +1108,7 @@ bool RKRBackend::startR () {
{ "rk.copy.no.eval", (DL_FUNC) &doCopyNoEval, 4 },
{ "rk.edit.files", (DL_FUNC) &doEditFiles, 4 },
{ "rk.show.files", (DL_FUNC) &doShowFiles, 5 },
- { "rk.dialog", (DL_FUNC) &doDialog, 6 },
+ { "rk.dialog", (DL_FUNC) &doDialog, 7 },
{ "rk.update.locale", (DL_FUNC) &doUpdateLocale, 0 },
{ "rk.locale.name", (DL_FUNC) &doLocaleName, 0 },
{ "rk.graphics.device", (DL_FUNC) &RKStartGraphicsDevice, 7},
diff --git a/rkward/rbackend/rkrinterface.cpp b/rkward/rbackend/rkrinterface.cpp
index 39de8a93..2ef9e4ec 100644
--- a/rkward/rbackend/rkrinterface.cpp
+++ b/rkward/rbackend/rkrinterface.cpp
@@ -61,6 +61,7 @@
#include <stdlib.h>
#include <QFileDialog>
#include <QApplication>
+#include <QPushButton>
// flush new pieces of output after this period of time:
#define FLUSH_INTERVAL 100
@@ -781,6 +782,15 @@ void RInterface::processHistoricalSubstackRequest (const QStringList &calllist,
closeChain (in_chain);
}
+int addButtonToBox (QDialog *dialog, QDialogButtonBox *box, QDialogButtonBox::StandardButton which, const QString &text, const QString &def_text, bool is_default) {
+ if (text.isEmpty ()) return 0;
+ QPushButton *button = box->addButton (which);
+ if (text != def_text) button->setText (text);
+ if (is_default) button->setDefault (true);
+ QObject::connect (button, &QPushButton::clicked, [dialog, which]() { dialog->done (which); });
+ return 1;
+}
+
void RInterface::processRBackendRequest (RBackendRequest *request) {
RK_TRACE (RBACKEND);
@@ -801,41 +811,40 @@ void RInterface::processRBackendRequest (RBackendRequest *request) {
QString button_yes = request->params["button_yes"].toString ();;
QString button_no = request->params["button_no"].toString ();;
QString button_cancel = request->params["button_cancel"].toString ();;
-
- KGuiItem button_yes_item = KStandardGuiItem::yes ();
- if (button_yes != "yes") button_yes_item.setText (button_yes);
- KGuiItem button_no_item = KStandardGuiItem::no ();
- if (button_no != "no") button_no_item.setText (button_no);
- KGuiItem button_cancel_item = KStandardGuiItem::cancel ();
- if (button_cancel != "cancel") button_cancel_item.setText (button_cancel);
-
- KMessageBox::DialogType dialog_type = KMessageBox::QuestionYesNoCancel;
- if (button_cancel.isEmpty ()) dialog_type = KMessageBox::QuestionYesNo;
- if (button_no.isEmpty () && button_cancel.isEmpty ()) {
- dialog_type = KMessageBox::Information;
- if (!request->synchronous) { // non-modal dialogs are not supported out of the box by KMessageBox;
- QDialog* dialog = new QDialog ();
- QDialogButtonBox *buttonBox = new QDialogButtonBox (dialog);
- buttonBox->setStandardButtons (QDialogButtonBox::Ok);
- KMessageBox::createKMessageBox (dialog, buttonBox, QMessageBox::Information, message, QStringList (), QString (), 0, KMessageBox::Notify | KMessageBox::NoExec);
- dialog->setWindowTitle (caption);
- dialog->setAttribute (Qt::WA_DeleteOnClose);
- dialog->show();
-
- RKRBackendProtocolFrontend::setRequestCompleted (request);
- return;
- }
+ QString def_button = request->params["default"].toString ();;
+
+ // NOTE: In order to support non-modal (information) dialogs, we cannot use KMessageBox or QMessgaeBox, below.
+ QDialog* dialog = new QDialog ();
+ dialog->setResult (-1); // We use this to stand for cancelled
+ QDialogButtonBox *button_box = new QDialogButtonBox (dialog);
+ QPushButton *button;
+ int button_count = 0;
+ button_count += addButtonToBox (dialog, button_box, QDialogButtonBox::Yes, button_yes, "yes", def_button == button_yes);
+ button_count += addButtonToBox (dialog, button_box, QDialogButtonBox::No, button_no, "no", def_button == button_no);
+ button_count += addButtonToBox (dialog, button_box, QDialogButtonBox::Cancel, button_cancel, "cancel", def_button == button_cancel);
+ if (!button_count) { // cannot have no button defined at all
+ button_count += addButtonToBox (dialog, button_box, QDialogButtonBox::Ok, "ok", "ok", true);
}
- int result = KMessageBox::messageBox (0, dialog_type, message, caption, button_yes_item, button_no_item, button_cancel_item);
+ bool synchronous = request->synchronous || (button_count > 1);
+ KMessageBox::createKMessageBox (dialog, button_box, button_count < 2 ? QMessageBox::Information : QMessageBox::Question, message, QStringList (), QString (), 0, KMessageBox::Notify | KMessageBox::NoExec);
+ dialog->setWindowTitle (caption);
- QString result_string;
- if ((result == KMessageBox::Yes) || (result == KMessageBox::Ok)) result_string = "yes";
- else if (result == KMessageBox::No) result_string = "no";
- else if (result == KMessageBox::Cancel) result_string = "cancel";
- else RK_ASSERT (false);
+ if (!synchronous) {
+ dialog->setAttribute (Qt::WA_DeleteOnClose);
+ dialog->show();
- request->params["result"] = result_string;
+ RKRBackendProtocolFrontend::setRequestCompleted (request);
+ return;
+ } else {
+ int result = dialog->exec ();
+ QString result_string;
+ if (result == QDialogButtonBox::Yes || result == QDialogButtonBox::Ok) result_string = "yes";
+ else if (result == QDialogButtonBox::No) result_string = "no";
+ else result_string = "cancel";
+ request->params["result"] = result_string;
+ delete dialog;
+ }
} else if (type == RBackendRequest::ReadLine) {
QString result;
diff --git a/rkward/rbackend/rpackages/rkward/DESCRIPTION b/rkward/rbackend/rpackages/rkward/DESCRIPTION
index f32ce516..80585be0 100644
--- a/rkward/rbackend/rpackages/rkward/DESCRIPTION
+++ b/rkward/rbackend/rpackages/rkward/DESCRIPTION
@@ -41,4 +41,4 @@ Collate:
'rk.workspace-functions.R'
'rkward-package.R'
'ver.R'
-RoxygenNote: 5.0.1
+RoxygenNote: 6.0.1
diff --git a/rkward/rbackend/rpackages/rkward/R/rk.KDE_GUI-functions.R b/rkward/rbackend/rpackages/rkward/R/rk.KDE_GUI-functions.R
index 8092ea20..3cdd4b1e 100644
--- a/rkward/rbackend/rpackages/rkward/R/rk.KDE_GUI-functions.R
+++ b/rkward/rbackend/rpackages/rkward/R/rk.KDE_GUI-functions.R
@@ -18,11 +18,17 @@
#' @param caption a string for title of the message box.
#' @param button.yes a string for the text label of the \bold{Yes} button. Can
#' be an empty string (\code{""}), in which case the button is not displayed
-#' at all.
-#' @param button.no a string used for the text label of the \bold{No} button,
-#' similar to \code{button.yes}.
-#' @param button.canel a string used for the text label of the \bold{Cancel}
-#' button, similar to \code{button.yes}.
+#' at all. Note that the default value of "yes" (lower case) means to use a default
+#' rendering of a "Yes" button, which may or may not be the literal string "Yes"
+#' (importantly, it will be translated, automatically).
+#' @param button.no a string used for the text label of the \bold{No} button.
+#' This behaves similar to \code{button.yes}, including the meaning of the
+#' default value "no".
+#' @param button.cancel a string used for the text label of the \bold{Cancel} button.
+#' This behaves similar to \code{button.yes}, including the meaning of the
+#' default value "cancel".
+#' @param default.button The button will be the default (selected if the user
+#' simply pressed enter.
#' @param wait a logical (not NA) indicating whether the R interpreter should
#' wait for the user's action, or run it asynchronously.
#' @param list a vector, coerced into a character vector.
@@ -34,7 +40,8 @@
#' @return \code{rk.show.message} always returns \code{TRUE}, invisibly.
#'
#' \code{rk.show.question} returns \code{TRUE} for \bold{Yes}, \code{FALSE} for
-#' \bold{No}, and \code{NULL} for \bold{Cancel} actions.
+#' \bold{No}, and \code{NULL} for \bold{Cancel} actions. If the dialog is closed
+#' without clicking on any button, \code{NULL} is returned, as well.
#'
#' \code{rk.select.list} returns the value of \code{\link{select.list}}.
#' @author Thomas Friedrichsmeier \email{rkward-devel@@kde.org}
@@ -60,16 +67,16 @@
#' multiple = TRUE, title = "vowels")
#' @export
-"rk.show.message" <- function (message, caption = "Information", wait=TRUE) {
- .Call ("rk.dialog", caption, message, "ok", "", "", isTRUE (wait), PACKAGE="(embedding)")
+"rk.show.message" <- function (message, caption = gettext("Information"), wait=TRUE) {
+ .Call ("rk.dialog", caption, message, "ok", "", "", "ok", isTRUE (wait), PACKAGE="(embedding)")
invisible (TRUE)
}
# to disable a button, set it to ""
#' @export
#' @rdname rk.show.messages
-"rk.show.question" <- function (message, caption = "Question", button.yes = "yes", button.no = "no", button.cancel = "cancel") {
- res <- .Call ("rk.dialog", caption, message, button.yes, button.no, button.cancel, TRUE, PACKAGE="(embedding)")
+"rk.show.question" <- function (message, caption = gettext("Question"), button.yes = "yes", button.no = "no", button.cancel = "cancel", default.button=button.yes) {
+ res <- .Call ("rk.dialog", caption, message, button.yes, button.no, button.cancel, default.button, TRUE, PACKAGE="(embedding)")
if (res > 0) return (TRUE)
else if (res < 0) return (FALSE)
else return (NULL) # cancelled
diff --git a/rkward/rbackend/rpackages/rkward/man/RKdevice.Rd b/rkward/rbackend/rpackages/rkward/man/RKdevice.Rd
index e87bf2ca..af3eaf2a 100644
--- a/rkward/rbackend/rpackages/rkward/man/RKdevice.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/RKdevice.Rd
@@ -30,4 +30,3 @@ including the device independent fonts names "sans", "serif", and "mono"}
The default settings for \code{width}, and \code{height} can be modified from Settings -> Configure RKWard -> Onscreen Graphics.
}
\keyword{devices}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.assign.preview.data.Rd b/rkward/rbackend/rpackages/rkward/man/rk.assign.preview.data.Rd
index 0d306c0e..9b30a067 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.assign.preview.data.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.assign.preview.data.Rd
@@ -1,10 +1,11 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rk.plugin-functions.R
\name{rk.assign.preview.data}
-\alias{.rk.discard.preview.data}
\alias{rk.assign.preview.data}
-\alias{rk.discard.preview.data}
\alias{rk.get.preview.data}
+\alias{.rk.discard.preview.data}
+\alias{rk.get.preview.data}
+\alias{rk.discard.preview.data}
\title{Manage (shortly) persistent data for previews (for use in RKWard plugins wishing to provide custom previews)}
\usage{
rk.assign.preview.data(id, value = list())
@@ -59,4 +60,3 @@ try ({
Thomas Friedrichsmeier \email{rkward-devel at kde.org}
}
\keyword{utilities}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.call.plugin.Rd b/rkward/rbackend/rpackages/rkward/man/rk.call.plugin.Rd
index 587bf2fe..4e441155 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.call.plugin.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.call.plugin.Rd
@@ -10,6 +10,8 @@ rk.call.plugin(plugin, ..., submit.mode = c("manual", "auto", "submit"))
\item{plugin}{character string, giving the name of the plugin to call. See
Details.}
+\item{\dots}{arguments passed to the \code{plugin}}
+
\item{submit.mode}{character string, specifying the submission mode:
\code{"manual"} will open the plugin GUI and leave it to the user to
submit it manually, \code{"auto"} will try to submit the plugin, if it can
@@ -21,8 +23,6 @@ generate an error, if it cannot be submitted. \code{"manual"} will always
return immediately, \code{"auto"} may or may not return immediately, and
\code{"submit"} will always wait until the plugin has been run, or produce
an error.}
-
-\item{\dots}{arguments passed to the \code{plugin}}
}
\value{
\code{rk.call.plugin} returns \code{TRUE} invisibly.
@@ -63,12 +63,11 @@ rk.call.plugin ("rkward::t_test_two_vars",
submit.mode="submit")
})
-}
-\author{
-Thomas Friedrichsmeier \email{rkward-devel at kde.org}
}
\seealso{
\code{\link{rk.results}}, \url{rkward://page/rkward_output}
}
+\author{
+Thomas Friedrichsmeier \email{rkward-devel at kde.org}
+}
\keyword{utilities}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.demo.Rd b/rkward/rbackend/rpackages/rkward/man/rk.demo.Rd
index 6f1d14e9..d9bba3b3 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.demo.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.demo.Rd
@@ -27,13 +27,12 @@ the specification of a topic is mandatory.
## Not run
rk.demo("graphics")
}
-\author{
-Thomas Friedrichsmeier \email{rkward-devel at kde.org}
-}
\seealso{
\code{\link{rk.edit.files}}, \code{\link{rk.show.files}},
\code{\link{demo}}
}
+\author{
+Thomas Friedrichsmeier \email{rkward-devel at kde.org}
+}
\keyword{IO}
\keyword{utilities}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.edit.Rd b/rkward/rbackend/rpackages/rkward/man/rk.edit.Rd
index 88eeb251..e4854b70 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.edit.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.edit.Rd
@@ -5,6 +5,9 @@
\alias{rk.edit.files}
\alias{rk.show.files}
\alias{rk.show.html}
+\alias{rk.edit.files}
+\alias{rk.show.files}
+\alias{rk.show.html}
\title{Edit / show an object / file}
\usage{
rk.edit(x)
@@ -59,13 +62,12 @@ and \code{getOption("browser")}.
x <- data.frame (a=c(1:3), b=c(2:4))
rk.edit(x)
}
-\author{
-Thomas Friedrichsmeier \email{rkward-devel at kde.org}
-}
\seealso{
\code{\link{edit}}, \code{\link{file.edit}},
\code{\link{file.show}}, \code{\link{browseURL}}
}
+\author{
+Thomas Friedrichsmeier \email{rkward-devel at kde.org}
+}
\keyword{IO}
\keyword{utilities}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.embed.device.Rd b/rkward/rbackend/rpackages/rkward/man/rk.embed.device.Rd
index 12fa7226..c023e49b 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.embed.device.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.embed.device.Rd
@@ -32,4 +32,3 @@ plot (rnorm (10))
\seealso{
\link{RK}
}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.get.tempfile.name.Rd b/rkward/rbackend/rpackages/rkward/man/rk.get.tempfile.name.Rd
index 91fc8fc4..e4395f55 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.get.tempfile.name.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.get.tempfile.name.Rd
@@ -1,11 +1,14 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rk.filename-functions.R
\name{rk.get.tempfile.name}
-\alias{rk.flush.output}
-\alias{rk.get.output.html.file}
\alias{rk.get.tempfile.name}
\alias{rk.get.workspace.url}
+\alias{rk.get.output.html.file}
\alias{rk.set.output.html.file}
+\alias{rk.get.workspace.url}
+\alias{rk.get.output.html.file}
+\alias{rk.set.output.html.file}
+\alias{rk.flush.output}
\title{RKWard file names}
\usage{
rk.get.tempfile.name(prefix = "image", extension = ".jpg")
@@ -89,14 +92,13 @@ rk.show.html(rk.get.output.html.file())
rk.flush.output()
rk.set.output.html.file(outfile)
-}
-\author{
-Thomas Friedrichsmeier \email{rkward-devel at kde.org}
}
\seealso{
\url{rkward://page/rkward_output}, \link{tempfile}, \link{file},
\link{rk.print}
}
+\author{
+Thomas Friedrichsmeier \email{rkward-devel at kde.org}
+}
\keyword{IO}
\keyword{utilities}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.graph.on.Rd b/rkward/rbackend/rpackages/rkward/man/rk.graph.on.Rd
index fc41fe24..1dc01bf8 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.graph.on.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.graph.on.Rd
@@ -1,8 +1,9 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/public_graphics.R
\name{rk.graph.on}
-\alias{rk.graph.off}
\alias{rk.graph.on}
+\alias{rk.graph.off}
+\alias{rk.graph.off}
\title{Plot graphics to HTML output file}
\usage{
rk.graph.on(device.type = getOption("rk.graphics.type"),
@@ -50,12 +51,11 @@ rk.graph.off ()
#plot (rnorm (100))
#dev.print (device = rk.graph.on)
-}
-\author{
-Thomas Friedrichsmeier \email{rkward-devel at kde.org}
}
\seealso{
\link{rk.results} \link{rk.print} \link{rk.get.output.html.file} \link{dev.off} \link{svg} \link{png} \link{jpg}
}
+\author{
+Thomas Friedrichsmeier \email{rkward-devel at kde.org}
+}
\keyword{devices}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.label.Rd b/rkward/rbackend/rpackages/rkward/man/rk.label.Rd
index 9cbe145a..37bf459a 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.label.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.label.Rd
@@ -1,14 +1,19 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rk.label-functions.R
\name{rk.get.label}
-\alias{.rk.make.short.name}
-\alias{rk.get.description}
\alias{rk.get.label}
+\alias{rk.set.label}
\alias{rk.get.short.name}
+\alias{rk.get.description}
+\alias{rk.list.names}
\alias{rk.list}
+\alias{rk.set.label}
\alias{rk.list.labels}
+\alias{rk.get.short.name}
+\alias{.rk.make.short.name}
+\alias{rk.get.description}
+\alias{rk.list}
\alias{rk.list.names}
-\alias{rk.set.label}
\title{Various label related utility functions}
\usage{
rk.get.label(x)
@@ -91,4 +96,3 @@ names (rk.list (x$a, x$b)) # "x$a (First column)" "x$b"
Thomas Friedrichsmeier \email{rkward-devel at kde.org}
}
\keyword{utilities}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.list.plugins.Rd b/rkward/rbackend/rpackages/rkward/man/rk.list.plugins.Rd
index 48e6bb3b..06aad83f 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.list.plugins.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.list.plugins.Rd
@@ -3,6 +3,7 @@
\name{rk.list.plugins}
\alias{rk.list.plugins}
\alias{rk.set.plugin.status}
+\alias{rk.set.plugin.status}
\title{List of modify loaded plugins}
\usage{
rk.list.plugins()
@@ -49,12 +50,11 @@ rk.list.plugins ()
rk.set.plugin.status ("rkward::t_test", visible=FALSE)
## END NOT RUN
-}
-\author{
-Thomas Friedrichsmeier \email{rkward-devel at kde.org}
}
\seealso{
\code{\link{rk.call.plugin}} for invoking a plugin, programatically
}
+\author{
+Thomas Friedrichsmeier \email{rkward-devel at kde.org}
+}
\keyword{utilities}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.load.pluginmaps.Rd b/rkward/rbackend/rpackages/rkward/man/rk.load.pluginmaps.Rd
index 365bd6de..5c6cd94e 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.load.pluginmaps.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.load.pluginmaps.Rd
@@ -37,11 +37,10 @@ rk.load.pluginmaps()
## END NOT RUN
}
-\author{
-Thomas Friedrichsmeier \email{rkward-devel at kde.org}
-}
\seealso{
\code{\link{rk.call.plugin}}, @seealso \code{\link{rkwarddev::rk.plugin.skeleton}}
}
+\author{
+Thomas Friedrichsmeier \email{rkward-devel at kde.org}
+}
\keyword{utilities}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.misc.Rd b/rkward/rbackend/rpackages/rkward/man/rk.misc.Rd
index 8717618a..22bef6f1 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.misc.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.misc.Rd
@@ -1,9 +1,11 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rk.utility-functions.R
\name{rk.rename.in.container}
-\alias{rk.make.repos.string}
-\alias{rk.misc}
\alias{rk.rename.in.container}
+\alias{rk.misc}
+\alias{rk.make.repos.string}
+\alias{rk.select.CRAN.mirror}
+\alias{rk.make.repos.string}
\alias{rk.select.CRAN.mirror}
\title{Miscellaneous utility functions}
\usage{
@@ -60,4 +62,3 @@ Thomas Friedrichsmeier \email{rkward-devel at kde.org}
\keyword{attribute}
\keyword{misc}
\keyword{utilities}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.old.packages.Rd b/rkward/rbackend/rpackages/rkward/man/rk.old.packages.Rd
index 8fe336b2..0a8e9f58 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.old.packages.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.old.packages.Rd
@@ -32,4 +32,3 @@ Thomas Friedrichsmeier \email{rkward-devel at kde.org}
\keyword{attribute}
\keyword{misc}
\keyword{utilities}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.printer.device.Rd b/rkward/rbackend/rpackages/rkward/man/rk.printer.device.Rd
index a5c519d9..7128999e 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.printer.device.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.printer.device.Rd
@@ -27,14 +27,13 @@ example, below.
plot (rnorm (10))
dev.print (rk.printer.device)
-}
-\author{
-Thomas Friedrichsmeier \email{rkward-devel at kde.org}
}
\seealso{
\code{\link{postscript}}, \code{\link{dev.print}},
\code{\link{rk.graph.on}}
}
+\author{
+Thomas Friedrichsmeier \email{rkward-devel at kde.org}
+}
\keyword{device}
\keyword{utilities}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.record.commands.Rd b/rkward/rbackend/rpackages/rkward/man/rk.record.commands.Rd
index 21417968..1423c1b8 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.record.commands.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.record.commands.Rd
@@ -16,4 +16,3 @@ To stop recording, supply NULL or "" as filename.
Currently used for the purpose of automated testing, only. Perhaps in the future
this or a similar mechanism could also be added as a user feature.
}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.replace.function.Rd b/rkward/rbackend/rpackages/rkward/man/rk.replace.function.Rd
index 7c3650f3..ddb9fa16 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.replace.function.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.replace.function.Rd
@@ -49,13 +49,12 @@ rk.replace.function ("history", as.environment ("package:utils"),
})
## End not run
-}
-\author{
-Thomas Friedrichsmeier \email{rkward-devel at kde.org}
}
\seealso{
\code{\link{assignInNamespace}}, \code{\link{debug}}
}
+\author{
+Thomas Friedrichsmeier \email{rkward-devel at kde.org}
+}
\keyword{IO}
\keyword{utilities}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.results.Rd b/rkward/rbackend/rpackages/rkward/man/rk.results.Rd
index 26355162..1847b9c8 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.results.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.results.Rd
@@ -1,12 +1,17 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rk.print-functions.R
\name{rk.print}
-\alias{rk.describe.alternative}
-\alias{rk.header}
\alias{rk.print}
\alias{rk.print.code}
\alias{rk.print.literal}
+\alias{rk.header}
+\alias{rk.results}
+\alias{rk.describe.alternative}
+\alias{rk.print.code}
+\alias{rk.header}
\alias{rk.results}
+\alias{rk.print.literal}
+\alias{rk.describe.alternative}
\title{Print objects and results to output}
\usage{
rk.print(x, ...)
@@ -115,14 +120,13 @@ rk.results (list (
'confidence interval of difference'=result$conf.int ))
})
-}
-\author{
-Thomas Friedrichsmeier \email{rkward-devel at kde.org}
}
\seealso{
\code{\link{HTML}}, \code{\link{rk.get.output.html.file}},
\code{\link{rk.get.description}}, \code{\link{rk.call.plugin}},
\url{rkward://page/rkward_output}
}
+\author{
+Thomas Friedrichsmeier \email{rkward-devel at kde.org}
+}
\keyword{utilities}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.screen.device.Rd b/rkward/rbackend/rpackages/rkward/man/rk.screen.device.Rd
index a91a3d13..3648cf85 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.screen.device.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.screen.device.Rd
@@ -12,4 +12,3 @@ Depending on your use case, you should use \code{dev.new()}, \code{RK()} or \cod
\seealso{
\link{dev.new}, \link{RK}, \link{rk.embed.device}
}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.sessionInfo.Rd b/rkward/rbackend/rpackages/rkward/man/rk.sessionInfo.Rd
index f726990d..28f3711f 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.sessionInfo.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.sessionInfo.Rd
@@ -23,12 +23,11 @@ from the menu. Internally, this will call \code{rk.sessionInfo()}.
rk.sessionInfo()
}
-\author{
-Thomas Friedrichsmeier \email{rkward-devel at kde.org}
-}
\seealso{
\code{\link{sessionInfo}}
}
+\author{
+Thomas Friedrichsmeier \email{rkward-devel at kde.org}
+}
\keyword{misc}
\keyword{utilities}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.show.messages.Rd b/rkward/rbackend/rpackages/rkward/man/rk.show.messages.Rd
index 2077aa56..1433ee32 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.show.messages.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.show.messages.Rd
@@ -1,15 +1,17 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rk.KDE_GUI-functions.R
\name{rk.show.message}
-\alias{rk.select.list}
\alias{rk.show.message}
\alias{rk.show.question}
+\alias{rk.select.list}
+\alias{rk.show.question}
+\alias{rk.select.list}
\title{Message boxes and selection list using native KDE GUI}
\usage{
-rk.show.message(message, caption = "Information", wait = TRUE)
+rk.show.message(message, caption = gettext("Information"), wait = TRUE)
-rk.show.question(message, caption = "Question", button.yes = "yes",
- button.no = "no", button.cancel = "cancel")
+rk.show.question(message, caption = gettext("Question"), button.yes = "yes",
+ button.no = "no", button.cancel = "cancel", default.button = button.yes)
rk.select.list(list, preselect = NULL, multiple = FALSE, title = NULL)
}
@@ -23,10 +25,20 @@ wait for the user's action, or run it asynchronously.}
\item{button.yes}{a string for the text label of the \bold{Yes} button. Can
be an empty string (\code{""}), in which case the button is not displayed
-at all.}
+at all. Note that the default value of "yes" (lower case) means to use a default
+rendering of a "Yes" button, which may or may not be the literal string "Yes"
+(importantly, it will be translated, automatically).}
-\item{button.no}{a string used for the text label of the \bold{No} button,
-similar to \code{button.yes}.}
+\item{button.no}{a string used for the text label of the \bold{No} button.
+This behaves similar to \code{button.yes}, including the meaning of the
+default value "no".}
+
+\item{button.cancel}{a string used for the text label of the \bold{Cancel} button.
+This behaves similar to \code{button.yes}, including the meaning of the
+default value "cancel".}
+
+\item{default.button}{The button will be the default (selected if the user
+simply pressed enter.}
\item{list}{a vector, coerced into a character vector.}
@@ -35,9 +47,6 @@ selection is allowed.}
\item{title}{a string, for the window title of the displayed list}
-\item{button.canel}{a string used for the text label of the \bold{Cancel}
-button, similar to \code{button.yes}.}
-
\item{preselct}{a vector, coerced into a character vector, items to be
preselected.}
}
@@ -45,7 +54,8 @@ preselected.}
\code{rk.show.message} always returns \code{TRUE}, invisibly.
\code{rk.show.question} returns \code{TRUE} for \bold{Yes}, \code{FALSE} for
- \bold{No}, and \code{NULL} for \bold{Cancel} actions.
+ \bold{No}, and \code{NULL} for \bold{Cancel} actions. If the dialog is closed
+ without clicking on any button, \code{NULL} is returned, as well.
\code{rk.select.list} returns the value of \code{\link{select.list}}.
}
@@ -82,11 +92,10 @@ rk.select.list (LETTERS, preselect = c("A", "E", "I", "O", "U"),
.rk.backups$select.list (LETTERS, preselect = c("A", "E", "I", "O", "U"),
multiple = TRUE, title = "vowels")
}
-\author{
-Thomas Friedrichsmeier \email{rkward-devel at kde.org}
-}
\seealso{
\code{\link{system}}, \code{\link{select.list}}
}
+\author{
+Thomas Friedrichsmeier \email{rkward-devel at kde.org}
+}
\keyword{utilities}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.switch.frontend.language.Rd b/rkward/rbackend/rpackages/rkward/man/rk.switch.frontend.language.Rd
index a9b99c1f..00c84a94 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.switch.frontend.language.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.switch.frontend.language.Rd
@@ -20,4 +20,3 @@ show strings in the new lanuage, however.
\details{
To change the language in the backend, use \code{Sys.setenv(LANGUAGE=...)} or \code{Sys.setlocale()}.
}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.sync.Rd b/rkward/rbackend/rpackages/rkward/man/rk.sync.Rd
index f92f11ef..b6576f0e 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.sync.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.sync.Rd
@@ -3,6 +3,7 @@
\name{rk.sync}
\alias{rk.sync}
\alias{rk.sync.global}
+\alias{rk.sync.global}
\title{Sync R object(s)}
\usage{
rk.sync(x)
@@ -35,13 +36,12 @@ environments (see examples).
rk.sync (rkward::rk.record.plot)
-}
-\author{
-Thomas Friedrichsmeier \email{rkward-devel at kde.org}
}
\seealso{
\url{rkward://page/rkward_workspace_browser}
}
+\author{
+Thomas Friedrichsmeier \email{rkward-devel at kde.org}
+}
\keyword{misc}
\keyword{utilities}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.with.window.hints.Rd b/rkward/rbackend/rpackages/rkward/man/rk.with.window.hints.Rd
index 8b45eb5c..d8b78413 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.with.window.hints.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.with.window.hints.Rd
@@ -49,4 +49,3 @@ it will remain in place, with compatible parameters.
Thomas Friedrichsmeier \email{rkward-devel at kde.org}
}
\keyword{utilities}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.without.plot.history.Rd b/rkward/rbackend/rpackages/rkward/man/rk.without.plot.history.Rd
index 4787e04a..7cf59296 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.without.plot.history.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.without.plot.history.Rd
@@ -11,4 +11,3 @@ rk.without.plot.history(expr)
Run a (plotting) action, without recording anything in the plot history.
Internally, the plot history option is turned off for the duration of the action.
}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rk.workplace.Rd b/rkward/rbackend/rpackages/rkward/man/rk.workplace.Rd
index 5f938d14..a136a363 100644
--- a/rkward/rbackend/rpackages/rkward/man/rk.workplace.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rk.workplace.Rd
@@ -1,8 +1,9 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rk.workspace-functions.R
\name{rk.save.workplace}
-\alias{rk.restore.workplace}
\alias{rk.save.workplace}
+\alias{rk.restore.workplace}
+\alias{rk.restore.workplace}
\title{Save or restore RKWard workplace}
\usage{
rk.save.workplace(file = NULL, description = NULL)
@@ -47,12 +48,11 @@ rk.save.workplace ()
rk.restore.workplace ()
## End not run
-}
-\author{
-Thomas Friedrichsmeier \email{rkward-devel at kde.org}
}
\seealso{
\url{rkward://page/rkward_for_r_users}, \link{rk.get.workspace.url}
}
+\author{
+Thomas Friedrichsmeier \email{rkward-devel at kde.org}
+}
\keyword{utilities}
-
diff --git a/rkward/rbackend/rpackages/rkward/man/rkward-package.Rd b/rkward/rbackend/rpackages/rkward/man/rkward-package.Rd
index 39f583d7..6cb42487 100644
--- a/rkward/rbackend/rpackages/rkward/man/rkward-package.Rd
+++ b/rkward/rbackend/rpackages/rkward/man/rkward-package.Rd
@@ -27,4 +27,3 @@ functions only needed for the internal communication between RKWard and R, but s
Thomas Friedrichsmeier, with contributions from RKWard-devel mailing list
}
\keyword{package}
-
More information about the rkward-tracker
mailing list