[education/rkward/devel/workspace_output] /: Merge branch 'master' into devel/workspace_output
Thomas Friedrichsmeier
null at kde.org
Sat Mar 5 11:57:39 GMT 2022
Git commit 50fff81303ebe8b820364a75c219d1bc03ad5549 by Thomas Friedrichsmeier.
Committed on 05/03/2022 at 11:57.
Pushed by tfry into branch 'devel/workspace_output'.
Merge branch 'master' into devel/workspace_output
M +11 -4 ChangeLog
M +3 -3 rkward/rbackend/rpackages/rkward/DESCRIPTION
M +6 -7 rkward/rbackend/rpackages/rkward/R/public_graphics.R
M +21 -14 rkward/rkward.cpp
M +1 -0 rkward/rkward.h
M +3 -2 rkward/windows/detachedwindowcontainer.cpp
M +32 -9 rkward/windows/katepluginintegration.cpp
M +1 -0 rkward/windows/rkcommandeditorwindow.cpp
M +21 -9 rkward/windows/rkhtmlwindow.cpp
M +26 -7 rkward/windows/rkmdiwindow.cpp
M +7 -0 rkward/windows/rkmdiwindow.h
M +13 -6 rkward/windows/rkworkplace.cpp
M +3 -1 rkward/windows/rkworkplace.h
https://invent.kde.org/education/rkward/commit/50fff81303ebe8b820364a75c219d1bc03ad5549
diff --cc ChangeLog
index 558d2c78,229abadf..2e652f17
--- a/ChangeLog
+++ b/ChangeLog
@@@ -1,22 -1,17 +1,30 @@@
+TODOS for autotests:
+ - Check and update the standards files
+ - Use options(warn=1), in order to get warnings into the test?
+
+TODOS for output directories:
- - UI
+ - migration support (existing old standard output should be converted to "default.rko"; setting, when opening workspace with no attached active output file:
+ - create new empty file
+ - open "default.rko" <- default setting?)
+
+- rkwardtests library gains helper functions for checking for expected errors
+- Internal: Allow R-level calls to support both subcommands, and a return value at the same time
+- Fixed: Calling (rk.)select.list() without a title would fail
+- Hide or remove several purely internal functions (most can still be assessed from the rkward namespace as rkward:::xyz())
+ - Use top alignment button to close (warning) messages in preview windows/areas
+ - (Try to) automatically create custom R library locations, if they do not exist
+ - Workaround for invalid EDITOR variable set by Kate Terminal plugin (also fixed in recent kate)
+ - kate plugin related actions are now active whenever a script window is active (not only the corresponding tool window)
+ - TODO: support kate plugins in detached windows
- --- Version 0.7.2 - UNRELEASED
+ --- Version 0.7.2b - UNRELEASED
+ - Fixed: Crash when attempting to use new graphics features in R 4.1.0 (esp. plotting using ggplot2)
+
+ --- Version 0.7.2 - Oct-16-2020
+ - Script preview keeps vertical scroll position when updating
- Python development scripts have been ported to python3
- Fix some problems with plot preview in wizard-type plugins
- - Add function rk.home() for retrieving applicaiton paths, similar to R.home()
+ - Add function rk.home() for retrieving applicaton paths, similar to R.home()
- Remove direct dependency on libintl
- Add menu option to switch application language
- Fix several small memory leaks
diff --cc rkward/rkward.cpp
index 43d9f3f5,7787cea5..7356eb47
--- a/rkward/rkward.cpp
+++ b/rkward/rkward.cpp
@@@ -669,27 -663,33 +670,33 @@@ void RKWardMainWindow::partChanged(KPar
RK_ASSERT (false);
return;
}
+ // Check for additional "buddy" that should be loaded
+ RKMDIWindow *w = RKWorkplace::mainWorkplace()->windowForPart(part);
+ KXMLGUIClient* buddy = w->uiBuddy();
+ // NOTE: Even if the buddy stays the same, we have to remove and re-add it to keep the order of menu actions stable
+ if (active_ui_buddy) factory()->removeClient(active_ui_buddy);
+ if (buddy) factory()->addClient(buddy);
+ active_ui_buddy = buddy;
- updateEmptyMenuIndicator (edit_menu_dummy, dynamic_cast<QMenu*>(guiFactory ()->container ("edit", this)));
- updateEmptyMenuIndicator (view_menu_dummy, dynamic_cast<QMenu*>(guiFactory ()->container ("view", this)));
+ updateEmptyMenuIndicator(edit_menu_dummy, dynamic_cast<QMenu*>(guiFactory()->container("edit", this)));
+ updateEmptyMenuIndicator(view_menu_dummy, dynamic_cast<QMenu*>(guiFactory()->container("view", this)));
// plug save file actions into the toolbar collections
- RK_ASSERT (save_any_action);
- for (int i = 0; i < plugged_save_actions.size (); ++i) {
- QAction* a = plugged_save_actions[i].data ();
- if (a) save_any_action->removeAction (a);
+ RK_ASSERT(save_any_action);
+ for (int i = 0; i < plugged_save_actions.size(); ++i) {
+ QAction* a = plugged_save_actions[i].data();
+ if (a) save_any_action->removeAction(a);
}
- plugged_save_actions.clear();
+ plugged_save_actions.clear ();
- RKMDIWindow *w = RKWorkplace::mainWorkplace ()->activeWindow (RKMDIWindow::Attached);
- if (w && (w->isType(RKMDIWindow::CommandEditorWindow))) {
- QAction *a = static_cast<RKCommandEditorWindow*>(w)->fileSaveAction();
- if (a) plugged_save_actions.append(a);
- a = static_cast<RKCommandEditorWindow*>(w)->fileSaveAsAction();
- if (a) plugged_save_actions.append(a);
+ if (w) {
+ QAction *a = w->fileSaveAction ();
+ if (a) plugged_save_actions.append (a);
+ a = w->fileSaveAsAction ();
+ if (a) plugged_save_actions.append (a);
}
- for (int i = 0; i < plugged_save_actions.size (); ++i) {
- save_any_action->insertAction (save_actions_plug_point, plugged_save_actions[i]);
+ for (int i = 0; i < plugged_save_actions.size(); ++i) {
+ save_any_action->insertAction(save_actions_plug_point, plugged_save_actions[i]);
}
/*
// debug code: prints out all current actions
diff --cc rkward/windows/rkmdiwindow.cpp
index 2adabdce,ec22f2b5..b07479ce
--- a/rkward/windows/rkmdiwindow.cpp
+++ b/rkward/windows/rkmdiwindow.cpp
@@@ -66,15 -66,14 +67,16 @@@ RKMDIWindow::RKMDIWindow (QWidget *pare
}
RKMDIWindow::type = type;
state = Attached;
- tool_window_bar = 0;
- part = 0;
+ tool_window_bar = nullptr;
+ part = nullptr;
active = false;
no_border_when_active = false;
- standard_client = 0;
- status_popup = 0;
- status_popup_container = 0;
- file_save_action = 0;
- file_save_as_action = 0;
+ standard_client = nullptr;
+ status_popup = nullptr;
+ status_popup_container = nullptr;
+ ui_buddy = nullptr;
++ file_save_action = nullptr;
++ file_save_as_action = nullptr;
if (!(type & KatePluginWindow)) setWindowIcon (RKStandardIcons::iconForWindow (this));
}
diff --cc rkward/windows/rkmdiwindow.h
index 6fa648c2,ec20a0cb..a9bf004b
--- a/rkward/windows/rkmdiwindow.h
+++ b/rkward/windows/rkmdiwindow.h
@@@ -130,10 -122,11 +130,15 @@@ is simply busy (e.g. when saving the cu
KActionCollection *standardActionCollection ();
/** plugin-accessible properties of this object in the global context. Currently used only by RKEditorDataFrame to give information on the currently active data.frame. NOTE: ATM, you cannot set arbitrary properties. Only those supported in RKStandardComponent will have an effect. */
QString globalContextProperty (const QString& property) { return global_context_properties.value (property); };
+/** @returns the save action applicable for this window (if any). Will be plugged into the save dropdown */
+ QAction* fileSaveAction () { return file_save_action; };
+/** @returns the save as action applicable for this window (if any). Will be plugged into the save dropdown */
+ QAction* fileSaveAsAction () { return file_save_as_action; };
+
+ /** Add an xml client that should be active, whenever this window is active. Noteably the KatePluginIntegrationWindow for kate related windows.
+ * For the time being, only a single buddy is allowed, and it must outlive all mdi windows. */
+ void addUiBuddy(KXMLGUIClient* buddy);
+ KXMLGUIClient* uiBuddy() const { return ui_buddy; };
signals:
/** This signal is emitted, whenever the window caption was changed.
@param RKMDIWindow* a pointer to this window */
More information about the rkward-tracker
mailing list