[education/rkward] rkward/dialogs: When running from AppImage, but a system R is available, default to using that.

Thomas Friedrichsmeier null at kde.org
Sun Jun 9 16:07:58 BST 2024


Git commit bb265e3b341e5013c092450514b8c2a811d10fb6 by Thomas Friedrichsmeier.
Committed on 09/06/2024 at 15:07.
Pushed by tfry into branch 'master'.

When running from AppImage, but a system R is available, default to using that.

M  +5    -1    rkward/dialogs/rksetupwizard.cpp

https://invent.kde.org/education/rkward/-/commit/bb265e3b341e5013c092450514b8c2a811d10fb6

diff --git a/rkward/dialogs/rksetupwizard.cpp b/rkward/dialogs/rksetupwizard.cpp
index 22847ae8f..3780468c6 100644
--- a/rkward/dialogs/rksetupwizard.cpp
+++ b/rkward/dialogs/rksetupwizard.cpp
@@ -202,7 +202,11 @@ public:
 		auto button = group->button(0);
 		if (RInterface::instance()->backendIsDead()) button->setText(i18n("Attempt to restart R at %1", RKSessionVars::RBinary()));
 		else button->setText(i18n("Keep current version (%1)", RKSessionVars::RBinary()));
-		button->setChecked(true);
+		if (RKSessionVars::isPathInAppImage(RKSessionVars::RBinary()) && (r_installations.size() > 1)) {
+			group->button(1)->setChecked(true);
+		} else {
+			button->setChecked(true);
+		}
 	}
 	QRadioButton *addButton(const QString &text, int index) {
 		auto button = new QRadioButton(text);


More information about the rkward-tracker mailing list