[rkward/work/faster_watch] rkward/windows: Enable reload action also for help browser (or generic html browser) windows.

Thomas Friedrichsmeier null at kde.org
Sun Apr 8 18:19:04 UTC 2018


Git commit 2188fb41a598cfe5a99a88ab457f7290b403dc43 by Thomas Friedrichsmeier.
Committed on 08/04/2018 at 18:18.
Pushed by tfry into branch 'work/faster_watch'.

Enable reload action also for help browser (or generic html browser) windows.

M  +3    -1    rkward/windows/rkhelpwindow.rc
M  +3    -3    rkward/windows/rkhtmlwindow.cpp

https://commits.kde.org/rkward/2188fb41a598cfe5a99a88ab457f7290b403dc43

diff --git a/rkward/windows/rkhelpwindow.rc b/rkward/windows/rkhelpwindow.rc
index df522c9d..154608c9 100644
--- a/rkward/windows/rkhelpwindow.rc
+++ b/rkward/windows/rkhelpwindow.rc
@@ -1,5 +1,5 @@
 <!DOCTYPE kpartgui>
-<kpartgui name="rkward_helpwindow" version="641">
+<kpartgui name="rkward_helpwindow" version="700">
 	<MenuBar>
 		<Menu name="file"><text>&File</text>
 			<Action name="print_html"/>
@@ -18,6 +18,8 @@
 			<Action name="zoom_in"/>
 			<Action name="zoom_out"/>
 			<Action name="view_encoding"/>
+			<Separator/>
+			<Action name="output_refresh"/>
 		</Menu>
 	</MenuBar>
 	<ToolBar fullWidth="true" name="mainToolBar">
diff --git a/rkward/windows/rkhtmlwindow.cpp b/rkward/windows/rkhtmlwindow.cpp
index 634c47d1..f9e6eb43 100644
--- a/rkward/windows/rkhtmlwindow.cpp
+++ b/rkward/windows/rkhtmlwindow.cpp
@@ -525,6 +525,8 @@ void RKHTMLWindow::useMode (WindowMode new_mode) {
 		part->setOutputWindowSkin ();
 		setMetaInfo (i18n ("Output Window"), QUrl ("rkward://page/rkward_output"), RKSettings::PageOutput);
 		connect (page, &QWebPage::loadFinished, this, &RKHTMLWindow::scrollToBottom);
+		page->action (QWebPage::Reload)->setText (i18n ("&Refresh Output"));
+
 //	TODO: This would be an interesting extension, but how to deal with concurrent edits?
 //		page->setContentEditable (true);
 	} else {
@@ -640,9 +642,7 @@ void RKHTMLWindowPart::initActions () {
 	outputFlush->setText (i18n ("&Flush Output"));
 	outputFlush->setIcon (QIcon::fromTheme("edit-delete"));
 
-	outputRefresh = actionCollection ()->addAction ("output_refresh", window, SLOT (refresh()));
-	outputRefresh->setText (i18n ("&Refresh Output"));
-	outputRefresh->setIcon (QIcon::fromTheme("view-refresh"));
+	outputRefresh = actionCollection ()->addAction ("output_refresh", window->page->action(QWebPage::Reload));
 
 	actionCollection ()->addAction (KStandardAction::Find, "find", window->findbar, SLOT (activate()));
 	QAction* findAhead = actionCollection ()->addAction ("find_ahead", new QAction (i18n ("Find as you type"), this));



More information about the rkward-tracker mailing list