[rkward-cvs] SF.net SVN: rkward-code:[4733] trunk/rkward
tfry at users.sf.net
tfry at users.sf.net
Mon Apr 29 08:08:37 UTC 2013
Revision: 4733
http://sourceforge.net/p/rkward/code/4733
Author: tfry
Date: 2013-04-29 08:08:34 +0000 (Mon, 29 Apr 2013)
Log Message:
-----------
Add settings UI for configuring which device to use (and how), and make RK() device the new default.
Modified Paths:
--------------
trunk/rkward/ChangeLog
trunk/rkward/rkward/rbackend/rpackages/rkward/NAMESPACE
trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_graphics.R
trunk/rkward/rkward/rbackend/rpackages/rkward/R/public_graphics.R
trunk/rkward/rkward/settings/rksettingsmodulegraphics.cpp
trunk/rkward/rkward/settings/rksettingsmodulegraphics.h
trunk/rkward/rkward/settings/rksettingsmoduler.cpp
trunk/rkward/rkward/windows/rkwindowcatcher.cpp
Added Paths:
-----------
trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.screen.device.Rd
trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.without.plot.history.Rd
Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog 2013-04-29 07:36:00 UTC (rev 4732)
+++ trunk/rkward/ChangeLog 2013-04-29 08:08:34 UTC (rev 4733)
@@ -1,13 +1,12 @@
-- New R function rk.capture.device() for manually embedding graphics devices in RKWard
- TODO: Adjust frontend error message when embedding fails
+- New R function rk.embed.device() for manually embedding graphics devices in RKWard
- Fixed: R backend would exit immediately, without meaningful error message, if there is an error in .Rprofile (or Rprofile.site)
- Fixed: Installing suggested packages from the package installation dialog was broken
- Fixed: Selecting a mirror via the "R packages" settings page would not work when prompted for package installation form the backend
- Remove support for compiling RKWard in a single process (threaded) variant. This was not used / tested since RKWard 0.5.5
- Shortcuts for the "Run ..." actions have been changed for better cross-platform compatibility
- The script editor's "Run line" and "Run selection" actions have been merged
-- New (experimental) RKWard native on-screen device (RK())
- TODO: Finish it, then provide UI option to select on-screen device
+- Add UI for configuring default graphics device, and embedding of standard graphics devices.
+- New RKWard native on-screen device (RK()). This is the default on-screen device in RKWard, now.
- New R function rk.without.plot.history() for turning off plot history, temporarily
- Add command line option --backend-debugger
Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/NAMESPACE
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/NAMESPACE 2013-04-29 07:36:00 UTC (rev 4732)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/NAMESPACE 2013-04-29 08:08:34 UTC (rev 4733)
@@ -1,7 +1,7 @@
export(makeActiveBinding)
export(.onAttach)
export(q)
-export(Quartz)
+export(quartz)
export(quit)
export(require)
export(RK)
Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_graphics.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_graphics.R 2013-04-29 07:36:00 UTC (rev 4732)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_graphics.R 2013-04-29 08:08:34 UTC (rev 4733)
@@ -1,10 +1,15 @@
## Internal functions manipulating graphics should be stored here.
## These functions are _not_ supposed to be called by the end user.
-# overriding x11 to get informed, when a new x11 window is opened
+#' DEPRECATED: \code{rk.screen.device} is obsolete. It simply calls \code{dev.new()} in this version of RKWard.
+#'
+#' Depending on your use case, you should use \code{dev.new()}, \code{RK()} or \code{rk.embed.device()}, instead.
+#'
+#' @seealso \link{dev.new}, \link{RK}, \link{rk.embed.device}
+#'
#' @export
"rk.screen.device" <- function (...) {
- .Deprecated("RK")
+ warning ("rk.screen.device() is obsolete.\nUse one of dev.new(), RK(), or rk.embed.device(), instead.")
dev.new (...)
}
@@ -13,8 +18,6 @@
.Call ("rk.graphics.device.resize", as.integer (devnum)-1, PACKAGE="(embedding)")
}
-# set from rkward the application:
-# options(device="rk.screen.device")
#' @include internal.R
assign(".rk.preview.devices", list (), envir=.rk.variables)
@@ -23,7 +26,7 @@
a <- .rk.variables$.rk.preview.devices[[x]]
if (is.null (a)) {
devnum <- dev.cur ()
- rk.without.plot.history (rk.screen.device ())
+ rk.without.plot.history (dev.new ())
if (devnum != dev.cur ()) {
.rk.variables$.rk.preview.devices[[x]] <- list (devnum=dev.cur(), par=par (no.readonly=TRUE))
} else {
@@ -109,7 +112,7 @@
function (...)
lattice::lattice.options (print.function = function (x, ...)
{
- if (dev.cur() == 1) rk.screen.device ()
+ if (dev.cur() == 1) dev.new ()
## TODO: use "trellis" instead of "lattice" to accomodate ggplot2 plots?
plot_hist_enabled <- getOption ("rk.enable.graphics.history")
if (plot_hist_enabled) {
Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/public_graphics.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/public_graphics.R 2013-04-29 07:36:00 UTC (rev 4732)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/public_graphics.R 2013-04-29 08:08:34 UTC (rev 4733)
@@ -156,7 +156,7 @@
invisible (x)
}
-# Internal function to create wrapper around an R device function (used for X11(), Windows(), and - soon: Quartz()).
+# Internal function to create wrapper around an R device function (used for X11(), windows(), and quartz()).
".rk.make.device.wrapper" <- function (devicename) {
ret <- eval (substitute (
function (width=getOption("rk.screendevice.width"), height=getOption("rk.screendevice.height"), pointsize=12) {
@@ -216,7 +216,7 @@
#' @export
"win.graph" <- .rk.make.device.wrapper ("win.graph") # NOTE: Has different formals() than windows()
#' @export
-"Quartz" <- .rk.make.device.wrapper ("Quartz")
+"quartz" <- .rk.make.device.wrapper ("quartz")
#' Device for printing using the KDE print dialog
#'
@@ -256,7 +256,7 @@
rk.record.plot$duplicating.from.device <- devId
on.exit (rk.record.plot$duplicating.from.device <- 1) # NULL device
dev.set (devId)
- dev.copy (device = rk.screen.device)
+ dev.copy (device = dev.new)
}
# A global history of various graphics calls;
@@ -915,7 +915,7 @@
paste (substr (.lab.str, 1, l), "...", sep = "")
}
.plot.new.hook <- function (.callstr) {
- if (dev.cur() == 1) rk.screen.device ()
+ if (dev.cur() == 1) dev.new ()
if (getOption ("rk.enable.graphics.history")) {
.callstr <- sys.call (-sys.parents()[sys.nframe ()])
record (nextplot.pkg = "graphics", nextplot.call = .callstr)
Added: trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.screen.device.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.screen.device.Rd (rev 0)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.screen.device.Rd 2013-04-29 08:08:34 UTC (rev 4733)
@@ -0,0 +1,15 @@
+\name{rk.screen.device}
+\alias{rk.screen.device}
+\title{DEPRECATED: \code{rk.screen.device} is obsolete. It simply calls \code{dev.new()} in this version of RKWard.}
+\usage{
+ rk.screen.device(...)
+}
+\description{
+ Depending on your use case, you should use
+ \code{dev.new()}, \code{RK()} or
+ \code{rk.embed.device()}, instead.
+}
+\seealso{
+ \link{dev.new}, \link{RK}, \link{rk.embed.device}
+}
+
Added: trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.without.plot.history.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.without.plot.history.Rd (rev 0)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/man/rk.without.plot.history.Rd 2013-04-29 08:08:34 UTC (rev 4733)
@@ -0,0 +1,13 @@
+\name{rk.without.plot.history}
+\alias{rk.without.plot.history}
+\title{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.}
+\usage{
+ rk.without.plot.history(expr)
+}
+\description{
+ 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.
+}
+
Modified: trunk/rkward/rkward/settings/rksettingsmodulegraphics.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmodulegraphics.cpp 2013-04-29 07:36:00 UTC (rev 4732)
+++ trunk/rkward/rkward/settings/rksettingsmodulegraphics.cpp 2013-04-29 08:08:34 UTC (rev 4733)
@@ -2,7 +2,7 @@
rksettingsmodulegraphics - description
-------------------
begin : Mon Sep 13 2010
- copyright : (C) 2010 by Thomas Friedrichsmeier
+ copyright : (C) 2010, 2013 by Thomas Friedrichsmeier
email : tfry at users.sourceforge.net
***************************************************************************/
@@ -26,11 +26,16 @@
#include <QGroupBox>
#include <qcheckbox.h>
#include <QVBoxLayout>
+#include <QButtonGroup>
+#include <QLineEdit>
+#include <QRadioButton>
#include "../rkglobals.h"
#include "../rbackend/rinterface.h"
#include "../misc/rkspinbox.h"
+#include "../misc/rkcommonfunctions.h"
#include "../debug.h"
+#include "../core/robject.h"
// static members
double RKSettingsModuleGraphics::graphics_width;
@@ -39,14 +44,74 @@
int RKSettingsModuleGraphics::graphics_hist_max_length;
int RKSettingsModuleGraphics::graphics_hist_max_plotsize;
bool RKSettingsModuleGraphics::options_kde_printing;
+RKSettingsModuleGraphics::DefaultDevice RKSettingsModuleGraphics::default_device;
+QString RKSettingsModuleGraphics::default_device_other;
+RKSettingsModuleGraphics::StandardDevicesMode RKSettingsModuleGraphics::replace_standard_devices;
RKSettingsModuleGraphics::RKSettingsModuleGraphics (RKSettings *gui, QWidget *parent) : RKSettingsModule(gui, parent) {
RK_TRACE (SETTINGS);
QVBoxLayout *main_vbox = new QVBoxLayout (this);
-
- QGroupBox *group = new QGroupBox (i18n ("Default window size"), this);
+
+ QHBoxLayout *h_layout1 = new QHBoxLayout (this);
+ main_vbox->addLayout (h_layout1);
+ QGroupBox *group = new QGroupBox (i18n ("Default graphics device"), this);
+ default_device_group = new QButtonGroup (this);
QVBoxLayout* group_layout = new QVBoxLayout (group);
+ QRadioButton *button = new QRadioButton (i18n ("RKWard native device"), group);
+ default_device_group->addButton (button, (int) RKDevice);
+ group_layout->addWidget (button);
+ button = new QRadioButton (i18n ("Platform default device"), group);
+ default_device_group->addButton (button, (int) PlatformDevice);
+ group_layout->addWidget (button);
+ button = new QRadioButton (i18n ("Other device:"), group);
+ default_device_group->addButton (button, (int) OtherDevice);
+ QHBoxLayout *h_layout = new QHBoxLayout ();
+ group_layout->addLayout (h_layout);
+ h_layout->addWidget (button);
+ default_device_other_edit = new QLineEdit (default_device_other, group);
+ h_layout->addWidget (default_device_other_edit);
+ button = static_cast<QRadioButton*> (default_device_group->button ((int) default_device));
+ if (button) button->setChecked (true);
+ RKCommonFunctions::setTips (i18n ("<p>The default device to be used for plotting, i.e. when new plot is created, while no graphics device is active (see <i>options(\"device\")</i>).</p>"
+ "<p>The RKWard native device is the recommended choice for most users. This corresponds to the R command <i>RK()</i>.</p>"
+ "<p>The 'Platform default device' corresponds to one of <i>X11()</i>, <i>windows()</i>, or <i>quartz()</i>, depending on the platform.</p>"
+ "<p>You can also specify the name of a function such as <i>cairoDevice</i>.</p>"), group);
+ connect (default_device_group, SIGNAL (buttonClicked(int)), this, SLOT (boxChanged()));
+ connect (default_device_other_edit, SIGNAL (textChanged(const QString&)), this, SLOT (boxChanged()));
+ h_layout1->addWidget (group);
+
+ group = new QGroupBox (i18n ("Integration of R standard devices"), this);
+ replace_standard_devices_group = new QButtonGroup (this);
+ group_layout = new QVBoxLayout (group);
+ button = new QRadioButton (i18n ("Replace with RKWard device"), group);
+ replace_standard_devices_group->addButton (button, (int) ReplaceDevice);
+ group_layout->addWidget (button);
+ button = new QRadioButton (i18n ("Embed original device"), group);
+ replace_standard_devices_group->addButton (button, (int) EmbedDevice);
+ group_layout->addWidget (button);
+#if not (defined Q_WS_X11 || defined Q_WS_WIN)
+ button->setEnabled (false);
+#endif
+ button = new QRadioButton (i18n ("No device integration"), group);
+ replace_standard_devices_group->addButton (button, (int) LeaveDevice);
+ group_layout->addWidget (button);
+ button = static_cast<QRadioButton*> (replace_standard_devices_group->button ((int) replace_standard_devices));
+ if (button) button->setChecked (true);
+ RKCommonFunctions::setTips (i18n ("<p>Many scripts use calls to platform specific standard devices (<i>X11()</i>, <i>windows()</i>, <i>quartz()</i>), although any on-screen device "
+ "could be used at these places. RKWard provides overloads for these standard device functions, which can change their behavior when used in "
+ "user code:</p>"
+ "<ul><li>The calls can be re-directed to the RKWard native device (<i>RK()</i>). Some, but not all function arguments will be matched, others will "
+ "be ignored.</li>"
+ "<li>The original platform specific devices can be used, but embedded into RKWard windows. This option is not available on MacOS X.</li>"
+ "<li>The original platform specific devices can be used unchanged, without the addition of RKWard specific features.</li></ul>"
+ "<p>Regardless of this setting, the original devices are always accessible as <i>grDevices::X11()</i>, etc.</p>"
+ "<p>Using a device on a platform where it is not defined (e.g. <i>Windows()</i> on Mac OS X) will always fall back to the <i>RK()</i> device.</p>"), group);
+ connect (replace_standard_devices_group, SIGNAL (buttonClicked(int)), this, SLOT (boxChanged()));
+ h_layout1->addWidget (group);
+
+ group = new QGroupBox (i18n ("Default window size (for RK(), or embedded device windows)"), this);
+ group_layout = new QVBoxLayout (group);
group_layout->addWidget (new QLabel (i18n ("Default width (inches):"), group));
group_layout->addWidget (graphics_width_box = new RKSpinBox (group));
graphics_width_box->setRealMode (1, 100.0, graphics_width, 1, 3);
@@ -68,7 +133,7 @@
graphics_hist_box->setChecked (graphics_hist_enable);
group_layout = new QVBoxLayout (graphics_hist_box);
connect (graphics_hist_box, SIGNAL (toggled (bool)), this, SLOT (boxChanged ()));
- QHBoxLayout *h_layout = new QHBoxLayout ();
+ h_layout = new QHBoxLayout ();
group_layout->addLayout (h_layout);
h_layout->addWidget (new QLabel (i18n ("Maximum number of recorded plots:"), graphics_hist_box));
h_layout->addWidget (graphics_hist_max_length_box = new KIntSpinBox (1, 200, 1, graphics_hist_max_length, graphics_hist_box));
@@ -82,14 +147,24 @@
main_vbox->addWidget (graphics_hist_box);
main_vbox->addStretch ();
+ updateControls ();
}
RKSettingsModuleGraphics::~RKSettingsModuleGraphics() {
RK_TRACE (SETTINGS);
}
+void RKSettingsModuleGraphics::updateControls () {
+ RK_TRACE (SETTINGS);
+ default_device_other_edit->setEnabled (default_device_group->checkedId () == (int) OtherDevice);
+ QRadioButton *button = static_cast<QRadioButton*> (replace_standard_devices_group->button ((int) ReplaceDevice));
+ if (button) button->setEnabled (default_device_group->checkedId () != PlatformDevice);
+}
+
void RKSettingsModuleGraphics::boxChanged () {
RK_TRACE (SETTINGS);
+
+ updateControls ();
change ();
}
@@ -101,6 +176,10 @@
void RKSettingsModuleGraphics::applyChanges () {
RK_TRACE (SETTINGS);
+ default_device = (DefaultDevice) default_device_group->checkedId ();
+ default_device_other = default_device_other_edit->text ();
+ replace_standard_devices = (StandardDevicesMode) replace_standard_devices_group->checkedId ();
+
graphics_width = graphics_width_box->realValue ();
graphics_height = graphics_height_box->realValue ();
@@ -126,6 +205,9 @@
RK_TRACE (SETTINGS);
KConfigGroup cg = config->group ("Graphics Device Windows");
+ cg.writeEntry ("default_device", (int) default_device);
+ cg.writeEntry ("default_device_custom", default_device_other);
+ cg.writeEntry ("replace_device", (int) replace_standard_devices);
cg.writeEntry ("graphics_width", graphics_width);
cg.writeEntry ("graphics_height", graphics_height);
cg.writeEntry ("graphics_hist_enable", graphics_hist_enable);
@@ -138,6 +220,9 @@
RK_TRACE (SETTINGS);
KConfigGroup cg = config->group ("Graphics Device Windows");
+ default_device = (DefaultDevice) cg.readEntry ("default_device", (int) RKDevice);
+ default_device_other = cg.readEntry ("default_device_custom", QString ("cairoDevice"));
+ replace_standard_devices = (StandardDevicesMode) cg.readEntry ("replace_device", (int) ReplaceDevice);
graphics_width = cg.readEntry ("graphics_width", 7.0);
graphics_height = cg.readEntry ("graphics_height", 7.0);
graphics_hist_enable = cg.readEntry ("graphics_hist_enable", true);
@@ -151,15 +236,36 @@
RK_TRACE (SETTINGS);
QStringList list;
-#ifdef Q_WS_X11
- QString command = "X11.options";
- command.append ("(\"width\"=" + QString::number (graphics_width));
- command.append (", \"height\"=" + QString::number (graphics_height) + ")\n");
+ // register RK as interactive
+ list.append ("try (if (!(\"RK\" %in% deviceIsInteractive())) deviceIsInteractive(name=\"RK\"))\n");
+
+ QString command = "options (device=";
+ if (default_device == RKDevice) command.append ("\"RK\"");
+ else if (default_device == OtherDevice) command.append (RObject::rQuote (default_device_other));
+ else {
+#if defined Q_WS_WIN
+ command.append ("\"windows\"");
+#elif defined Q_OS_MAC
+ command.append ("ifelse (capabilities(\"quartz\"), \"quartz\", \"X11\")");
#else
- QString command = "options";
+ command.append ("\"X11\"");
+#endif
+ }
+ list.append (command + ")\n");
+
+ command = "options (rk.override.platform.devices=\"";
+ if ((replace_standard_devices == ReplaceDevice) && (default_device != PlatformDevice)) {
+ command.append ("replace");
+ } else if (replace_standard_devices == LeaveDevice) {
+ command.append ("nointegration");
+ } else {
+ command.append ("embed");
+ }
+ list.append (command + "\")\n");
+
+ command = "options";
command.append ("(\"rk.screendevice.width\"=" + QString::number (graphics_width));
command.append (", \"rk.screendevice.height\"=" + QString::number (graphics_height) + ")\n");
-#endif
list.append (command);
list.append ("options (\"rk.graphics.hist.max.plotsize\"=" + QString::number (graphics_hist_max_plotsize) + ")\n");
list.append ("rk.toggle.plot.history (" + QString (graphics_hist_enable?"TRUE":"FALSE") + ")\n");
Modified: trunk/rkward/rkward/settings/rksettingsmodulegraphics.h
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmodulegraphics.h 2013-04-29 07:36:00 UTC (rev 4732)
+++ trunk/rkward/rkward/settings/rksettingsmodulegraphics.h 2013-04-29 08:08:34 UTC (rev 4733)
@@ -2,7 +2,7 @@
rksettingsmodulegraphics - description
-------------------
begin : Mon Sep 13 2010
- copyright : (C) 2010 by Thomas Friedrichsmeier
+ copyright : (C) 2010, 2013 by Thomas Friedrichsmeier
email : tfry at users.sourceforge.net
***************************************************************************/
@@ -21,10 +21,13 @@
#include <QStringList>
+class QLineEdit;
class QGroupBox;
class RKSpinBox;
class KIntSpinBox;
class QCheckBox;
+class QButtonGroup;
+class QRadioButton;
/**
@author Thomas Friedrichsmeier
@@ -50,10 +53,27 @@
QString caption ();
QString helpURL () { return ("rkward://page/rkward_plot_history#scd_settings"); };
+ enum DefaultDevice {
+ RKDevice,
+ PlatformDevice,
+ OtherDevice
+ };
+ enum StandardDevicesMode {
+ ReplaceDevice,
+ EmbedDevice,
+ LeaveDevice
+ };
+
static bool plotHistoryEnabled () { return graphics_hist_enable; };
public slots:
void boxChanged ();
private:
+ void updateControls ();
+
+ QButtonGroup *default_device_group;
+ QLineEdit *default_device_other_edit;
+ QButtonGroup *replace_standard_devices_group;
+
QGroupBox *graphics_hist_box;
KIntSpinBox *graphics_hist_max_length_box;
KIntSpinBox *graphics_hist_max_plotsize_box;
@@ -63,6 +83,10 @@
QCheckBox *kde_printing_box;
+ static DefaultDevice default_device;
+ static QString default_device_other;
+ static StandardDevicesMode replace_standard_devices;
+
static bool graphics_hist_enable;
static int graphics_hist_max_length;
static int graphics_hist_max_plotsize;
Modified: trunk/rkward/rkward/settings/rksettingsmoduler.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduler.cpp 2013-04-29 07:36:00 UTC (rev 4732)
+++ trunk/rkward/rkward/settings/rksettingsmoduler.cpp 2013-04-29 08:08:34 UTC (rev 4733)
@@ -270,9 +270,6 @@
#endif
#warning TODO make the following options configurable
- list.append ("options (device=\"rk.screen.device\")\n");
- // register as interactive
- list.append ("try (deviceIsInteractive(name=\"rk.screen.device\"))\n");
list.append ("options (help_type=\"html\")\n"); // for R 2.10.0 and above
list.append ("try ({options (htmlhelp=TRUE); options (chmhelp=FALSE)})\n"); // COMPAT: for R 2.9.x and below
list.append ("options (browser=rk.show.html)\n");
Modified: trunk/rkward/rkward/windows/rkwindowcatcher.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkwindowcatcher.cpp 2013-04-29 07:36:00 UTC (rev 4732)
+++ trunk/rkward/rkward/windows/rkwindowcatcher.cpp 2013-04-29 08:08:34 UTC (rev 4733)
@@ -29,6 +29,7 @@
#include "../rkwardapplication.h"
#include "../settings/rksettingsmodulegraphics.h"
+#include "../dialogs/rkerrordialog.h"
#include "rkworkplace.h"
#include "../misc/rkstandardicons.h"
#include "../debug.h"
@@ -67,9 +68,9 @@
#endif
} else {
#if defined Q_WS_MAC
- KMessageBox::information (0, i18n ("You have created a new graphics device window in R. Usually, RKWard tries to detect such windows, to take control of them, and add a menu-bar to them. However, this is not currently supported in this build of RKWard on Mac OS X. See http://p.sf.net/rkward/mac for more information."), i18n ("Could not embed R X11 window"), "embed_x11_device_not_supported");
+ KMessageBox::information (0, i18n ("You have tried to embed a new R graphics device window in RKWard. However, this is not currently supported in this build of RKWard on Mac OS X. See http://p.sf.net/rkward/mac for more information."), i18n ("Could not embed R X11 window"), "embed_x11_device_not_supported");
#else
- KMessageBox::information (0, i18n ("You have created a new X11 device window in R. Usually, RKWard tries to detect such windows, to take control of them, and add a menu-bar to them. This time, however, RKWard failed to detect, which window was created, and so can not embed it.\nIf you created the window on a different screen or X11 display, that is to be expected. You might want to consider changing options(\"display\"), then.\nIf you can see the X11 window on the same screen as this message, then RKWard should do better. In this case, please contact us at rkward-devel at lists.sourceforge.net with details on your setup, so we can try to fix this in future versions of RKWard."), i18n ("Could not embed R X11 window"), "failure_to_detect_x11_device");
+ RKErrorDialog::reportableErrorMessage (0, i18n ("You have tried to embed a new R graphics device window in RKWard. However, either no window was created, or RKWard failed to detect the new window. If you think RKWard should have done better, consider reporting this as a bug. Alternatively, you may want to adjust Settings->Configure RKWard->Onscreen Graphics."), QString (), i18n ("Could not embed R X11 window"), "failure_to_detect_x11_device");
#endif
}
}
More information about the rkward-tracker
mailing list