[rkward-cvs] SF.net SVN: rkward:[2599] trunk/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed Aug 5 11:08:12 UTC 2009


Revision: 2599
          http://rkward.svn.sourceforge.net/rkward/?rev=2599&view=rev
Author:   tfry
Date:     2009-08-05 11:08:10 +0000 (Wed, 05 Aug 2009)

Log Message:
-----------
Make toolbar buttons configurable

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/rkward/windows/rktoplevelwindowgui.cpp
    trunk/rkward/rkward/windows/rktoplevelwindowgui.h
    trunk/rkward/rkward/windows/rktoplevelwindowgui.rc

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2009-08-05 10:21:15 UTC (rev 2598)
+++ trunk/rkward/ChangeLog	2009-08-05 11:08:10 UTC (rev 2599)
@@ -1,3 +1,4 @@
+- Make toolbar buttons configurable
 - Fixed: Console window would sometimes remain in partially active state after piping commands
 
 --- Version 0.5.1 - Aug-04-2009

Modified: trunk/rkward/rkward/windows/rktoplevelwindowgui.cpp
===================================================================
--- trunk/rkward/rkward/windows/rktoplevelwindowgui.cpp	2009-08-05 10:21:15 UTC (rev 2598)
+++ trunk/rkward/rkward/windows/rktoplevelwindowgui.cpp	2009-08-05 11:08:10 UTC (rev 2599)
@@ -45,7 +45,7 @@
 
 #include "../debug.h"
 
-RKTopLevelWindowGUI::RKTopLevelWindowGUI (QWidget *for_window) : QObject (for_window), KXMLGUIClient () {
+RKTopLevelWindowGUI::RKTopLevelWindowGUI (KXmlGuiWindow *for_window) : QObject (for_window), KXMLGUIClient () {
 	RK_TRACE (APP);
 
 	RKTopLevelWindowGUI::for_window = for_window;
@@ -104,6 +104,7 @@
 
 	// settings
 	KStandardAction::keyBindings (this, SLOT (configureShortcuts ()), actionCollection ());
+	KStandardAction::configureToolbars (this, SLOT (configureToolbars()), actionCollection ());
 }
 
 RKTopLevelWindowGUI::~RKTopLevelWindowGUI () {
@@ -123,6 +124,14 @@
 	dlg.configure (true);
 }
 
+void RKTopLevelWindowGUI::configureToolbars () {
+	RK_TRACE (APP);
+
+	KMessageBox::information (for_window, i18n ("For technical reasons, the following dialog allows you to configure the toolbar buttons only for those parts of RKWard that are currently active.\n\nTherefore, if you want to configure tool buttons e.g. for use inside the script editor, you need to open a script editor window, and activate it."), i18n ("Note"), "configure_toolbars_kparts");
+
+	for_window->configureToolbars ();
+}
+
 void RKTopLevelWindowGUI::invokeRHelp () {
 	RK_TRACE (APP);
 

Modified: trunk/rkward/rkward/windows/rktoplevelwindowgui.h
===================================================================
--- trunk/rkward/rkward/windows/rktoplevelwindowgui.h	2009-08-05 10:21:15 UTC (rev 2598)
+++ trunk/rkward/rkward/windows/rktoplevelwindowgui.h	2009-08-05 11:08:10 UTC (rev 2599)
@@ -22,14 +22,14 @@
 
 #include <qobject.h>
 
-class QWdiget;
+class KXmlGuiWindow;
 class RKMDIWindow;
 
 /** represents the common portions of the GUI for top level windows: The help menu, and the windows menu */
 class RKTopLevelWindowGUI : public QObject, public KXMLGUIClient {
 	Q_OBJECT
 public:
-	RKTopLevelWindowGUI (QWidget *for_window);
+	RKTopLevelWindowGUI (KXmlGuiWindow *for_window);
 	~RKTopLevelWindowGUI ();
 public slots:
 	// windows menu
@@ -65,10 +65,12 @@
 	void showAboutApplication ();
 
 	// settings menu
-	/** configure key bindings. Implemented to show notice before the actual dialog. */
+	/** configure key bindings. Reimplemented to show notice before the actual dialog. */
 	void configureShortcuts ();
+	/** configure key bindings. Reimplemented to show notice before the actual dialog. */
+	void configureToolbars ();
 private:
-	QWidget *for_window;
+	KXmlGuiWindow *for_window;
 	void toggleToolView (RKMDIWindow *tool_window);
 };
 

Modified: trunk/rkward/rkward/windows/rktoplevelwindowgui.rc
===================================================================
--- trunk/rkward/rkward/windows/rktoplevelwindowgui.rc	2009-08-05 10:21:15 UTC (rev 2598)
+++ trunk/rkward/rkward/windows/rktoplevelwindowgui.rc	2009-08-05 11:08:10 UTC (rev 2599)
@@ -1,5 +1,5 @@
 <!DOCTYPE kpartgui>
-<kpartgui name="rkward" version="0.5.1">
+<kpartgui name="rkward" version="52">
 	<MenuBar>
 		<Merge/>
 		<Menu name="window"><text>&Window</text>
@@ -20,6 +20,7 @@
 		</Menu>
 		<Menu name="settings"><text>&Settings</text>
 			<Action name="options_configure_keybinding"/>
+			<Action name="options_configure_toolbars"/>
 		</Menu>
 		<Menu name="help"><text>&Help</text>
 			<Action name="rkward_help" group="prehelp_actions_merge"/>


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list