[education/rkward/kf5] /: Replace obsolete package cairoDevice with Cairo

Thomas Friedrichsmeier null at kde.org
Wed Apr 10 16:12:08 BST 2024


Git commit 239583dd92377a73ad6ad564ac3fcd40885b9271 by Thomas Friedrichsmeier.
Committed on 08/04/2024 at 16:07.
Pushed by tfry into branch 'kf5'.

Replace obsolete package cairoDevice with Cairo

M  +1    -0    ChangeLog
M  +2    -2    rkward/plugins/x11device/export.js
M  +0    -2    rkward/rbackend/rpackages/rkward/R/public_graphics.R
M  +2    -2    rkward/settings/rksettingsmodulegraphics.cpp

https://invent.kde.org/education/rkward/-/commit/239583dd92377a73ad6ad564ac3fcd40885b9271

diff --git a/ChangeLog b/ChangeLog
index ea72d2a0a..700201712 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+- Fixed: References to the package cairoDevice (removed on CRAN) have been replaced with Cairo
 - Fixed: Creating new output window from the UI would sometimes show empty window
 
 - Fixed: Better support for running from non-standard paths on Linux (e.g. user-local installation in home dir)
diff --git a/rkward/plugins/x11device/export.js b/rkward/plugins/x11device/export.js
index 9a08da52a..48f4d4643 100644
--- a/rkward/plugins/x11device/export.js
+++ b/rkward/plugins/x11device/export.js
@@ -7,8 +7,8 @@ function preprocess () {
 	if (getValue ("format") == "svg") {
 		echo ('if (!capabilities ("cairo")) {\n');
 		comment ('The "cairo" library, providing SVG-support, is not compiled in by default on some systems.', '	');
-		echo ('	require (cairoDevice)\n');
-		echo ('	svg <- Cairo_svg\n');
+		echo ('	require (Cairo)\n');
+		echo ('	svg <- CairoSVG\n');
 		echo ('}\n');
 	} else if (getValue ("format") == "tikz") {
 		echo ('require (tikzDevice)\n');
diff --git a/rkward/rbackend/rpackages/rkward/R/public_graphics.R b/rkward/rbackend/rpackages/rkward/R/public_graphics.R
index 5772855dc..3f784f867 100644
--- a/rkward/rbackend/rpackages/rkward/R/public_graphics.R
+++ b/rkward/rbackend/rpackages/rkward/R/public_graphics.R
@@ -82,8 +82,6 @@
 			"\" height=\"", height, "\"><br>", sep = ""))
 	} else if (device.type == "SVG") {
 		if (!capabilities ("cairo")) {	# cairo support is not always compiled in
-			# requireNamespace ("cairoDevice")
-			# svg <- Cairo_svg
 			requireNamespace ("Cairo")
 			svg <- Cairo::CairoSVG
 		}
diff --git a/rkward/settings/rksettingsmodulegraphics.cpp b/rkward/settings/rksettingsmodulegraphics.cpp
index ca596eef2..4280254b5 100644
--- a/rkward/settings/rksettingsmodulegraphics.cpp
+++ b/rkward/settings/rksettingsmodulegraphics.cpp
@@ -36,7 +36,7 @@ RKConfigValue<int> RKSettingsModuleGraphics::graphics_hist_max_length {"graphics
 RKConfigValue<int> RKSettingsModuleGraphics::graphics_hist_max_plotsize {"graphics_hist_max_plotsize", 4096};
 RKConfigValue<bool> RKSettingsModuleGraphics::options_kde_printing {"kde printing", true};
 RKConfigValue<RKSettingsModuleGraphics::DefaultDevice, int> RKSettingsModuleGraphics::default_device {"default_device", RKDevice};
-RKConfigValue<QString> RKSettingsModuleGraphics::default_device_other {"default_device_custom", QString("cairoDevice")};
+RKConfigValue<QString> RKSettingsModuleGraphics::default_device_other {"default_device_custom", QString("Cairo")};
 RKConfigValue<RKSettingsModuleGraphics::StandardDevicesMode, int> RKSettingsModuleGraphics::replace_standard_devices {"replace_device", ReplaceDevice};
 
 RKSettingsModuleGraphics::RKSettingsModuleGraphics (RKSettings *gui, QWidget *parent) : RKSettingsModule(gui, parent) {
@@ -67,7 +67,7 @@ RKSettingsModuleGraphics::RKSettingsModuleGraphics (RKSettings *gui, QWidget *pa
 	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);
+	                                  "<p>You can also specify the name of a function such as <i>Cairo</i>.</p>"), group);
 	connect (default_device_group, &QButtonGroup::idClicked, this, &RKSettingsModuleGraphics::boxChanged);
 	connect (default_device_other_edit, &QLineEdit::textChanged, this, &RKSettingsModuleGraphics::boxChanged);
 	h_layout1->addWidget (group);



More information about the rkward-tracker mailing list