[education/rkward] rkward/rbackend: Merge branch 'master' into work/rk_menu

Thomas Friedrichsmeier null at kde.org
Sun Sep 8 20:42:17 BST 2024


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

Merge branch 'master' into work/rk_menu

M  +7    -0    rkward/rbackend/rkrinterface.cpp
M  +1    -0    rkward/rbackend/rpackages/rkward/DESCRIPTION
M  +1    -0    rkward/rbackend/rpackages/rkward/NAMESPACE

https://invent.kde.org/education/rkward/-/commit/004b995a630f4f057d37ed02c870b28cf2fb5f8b

diff --cc rkward/rbackend/rkrinterface.cpp
index 5838e473f,562658f64..6f7fa0728
--- a/rkward/rbackend/rkrinterface.cpp
+++ b/rkward/rbackend/rkrinterface.cpp
@@@ -37,7 -37,7 +37,8 @@@ SPDX-License-Identifier: GPL-2.0-or-lat
  #include "../misc/rkcommonfunctions.h"
  #include "../misc/rkmessagecatalog.h"
  #include "../misc/rkoutputdirectory.h"
 +#include "../misc/rkrapimenu.h"
+ #include "../misc/rkprogresscontrol.h"
  #include "rksessionvars.h"
  #include "../windows/rkwindowcatcher.h"
  
@@@ -799,13 -801,12 +800,19 @@@ GenericRRequestResult RInterface::proce
  		RKDebugHandler::instance ()->endDebug();
  	} else if (call == "switchLanguage") {
  		RKMessageCatalog::switchLanguage(arglist.value(0));
 +	} else if (call == "menuupdate") {
 +		RKWardMainWindow::getMain()->rApiMenu()->updateFromR(args.toList());
 +	} else if (call == "menuenable") {
 +		auto path = args.toList().value(0).toStringList();
 +		auto enable = args.toList().value(1).toList().value(0).toBool(); // NOTE: bool value is a vector of ints, in R, therefore the toList(), first
 +		auto show = args.toList().value(2).toList().value(0).toBool();
 +		RKWardMainWindow::getMain()->rApiMenu()->enableAction(path, enable, show);
+ 	} else if (call == "with.progress") {
+ 		auto dialog = new RKProgressControl(this, arglist.value(0), QString(), RKProgressControl::CancellableProgress | RKProgressControl::OutputShownByDefault);
+ 		auto command = new RCommand("rkward:::.rk.with.progress.eval()", RCommand::App);
+ 		dialog->addRCommand(command, true);
+ 		issueCommand(command, in_chain);
+ 		dialog->doNonModal(true);
  	} else {
  		return GenericRRequestResult::makeError(i18n("Error: unrecognized request '%1'", call));
  	}



More information about the rkward-tracker mailing list