[rkward-cvs] SF.net SVN: rkward:[2449] trunk/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Thu Apr 30 14:38:35 UTC 2009
Revision: 2449
http://rkward.svn.sourceforge.net/rkward/?rev=2449&view=rev
Author: tfry
Date: 2009-04-30 14:38:35 +0000 (Thu, 30 Apr 2009)
Log Message:
-----------
Apply global toolbar style (unless customized) and copy toolbars styles to detached windows
Modified Paths:
--------------
trunk/rkward/ChangeLog
trunk/rkward/TODO
trunk/rkward/rkward/rkward.cpp
trunk/rkward/rkward/windows/detachedwindowcontainer.cpp
Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog 2009-04-30 09:44:41 UTC (rev 2448)
+++ trunk/rkward/ChangeLog 2009-04-30 14:38:35 UTC (rev 2449)
@@ -1,4 +1,5 @@
--- Version 0.5.0d - ??????????
+- Fixed: Global toolbar style was not honored
- Fixed: Auto-scroll missing in progress dialogs and data editor
- Fix jumping toolbar
- Fixed: Several harmless warnings were silenced
Modified: trunk/rkward/TODO
===================================================================
--- trunk/rkward/TODO 2009-04-30 09:44:41 UTC (rev 2448)
+++ trunk/rkward/TODO 2009-04-30 14:38:35 UTC (rev 2449)
@@ -11,6 +11,7 @@
- known workarounds:
http://article.gmane.org/gmane.comp.kde.cvs/700027
http://kdepim.sourcearchive.com/documentation/4.1.80/kleopatra_2conf_2configuredialog_8cpp-source.html
+ - why is the icon style only honored for mainToolBar (in KXMLGUIBuilder)? It looks like this is done on purpose, but why???
Bugs:
- "cannot create html package index" when installing package as a regular user (due to R.home ("doc") not writable)
Modified: trunk/rkward/rkward/rkward.cpp
===================================================================
--- trunk/rkward/rkward/rkward.cpp 2009-04-30 09:44:41 UTC (rev 2448)
+++ trunk/rkward/rkward/rkward.cpp 2009-04-30 14:38:35 UTC (rev 2449)
@@ -2,7 +2,7 @@
rkward.cpp - description
-------------------
begin : Tue Oct 29 20:06:08 CET 2002
- copyright : (C) 2002, 2005, 2006, 2007, 2008 by Thomas Friedrichsmeier
+ copyright : (C) 2002, 2005, 2006, 2007, 2008, 2009 by Thomas Friedrichsmeier
email : tfry at users.sourceforge.net
***************************************************************************/
@@ -46,6 +46,7 @@
#include <kactioncollection.h>
#include <krecentfilesaction.h>
#include <khbox.h>
+#include <ktoolbar.h>
// application specific includes
#include "rkward.h"
@@ -454,6 +455,13 @@
void RKWardMainWindow::readOptions () {
RK_TRACE (APP);
+ // first make sure to give the global defaults a chance, if needed.
+ // TODO: Why don't the toolbars honor the global style automatically?
+ QList<KToolBar*> tool_bars = toolBars ();
+ for (int i=0; i < tool_bars.size (); ++i) {
+ tool_bars[i]->setToolButtonStyle (KToolBar::toolButtonStyleSetting ());
+ }
+
KConfig *config = KGlobal::config ().data ();
applyMainWindowSettings (config->group ("main window options"), true);
Modified: trunk/rkward/rkward/windows/detachedwindowcontainer.cpp
===================================================================
--- trunk/rkward/rkward/windows/detachedwindowcontainer.cpp 2009-04-30 09:44:41 UTC (rev 2448)
+++ trunk/rkward/rkward/windows/detachedwindowcontainer.cpp 2009-04-30 14:38:35 UTC (rev 2449)
@@ -2,7 +2,7 @@
detachedwindowcontainer - description
-------------------
begin : Wed Oct 21 2005
- copyright : (C) 2005, 2007 by Thomas Friedrichsmeier
+ copyright : (C) 2005, 2007, 2009 by Thomas Friedrichsmeier
email : tfry at users.sourceforge.net
***************************************************************************/
@@ -20,6 +20,7 @@
#include <klocale.h>
#include <kactioncollection.h>
#include <kstatusbar.h>
+#include <ktoolbar.h>
#include <qlayout.h>
#include <qwidget.h>
@@ -50,6 +51,12 @@
statusBar ()->hide ();
createShellGUI ();
+// copy main window toolbar settings
+ QMap<QString, Qt::ToolButtonStyle> main_window_toolbar_styles;
+ foreach (KToolBar *bar, RKWardMainWindow::getMain ()->toolBars ()) {
+ main_window_toolbar_styles.insert (bar->objectName (), bar->toolButtonStyle ());
+ }
+
// capture widget
setGeometry (widget_to_capture->frameGeometry ());
widget_to_capture->setParent (this);
@@ -58,6 +65,15 @@
createGUI (widget_to_capture->getPart ());
captured = widget_to_capture;
+// sanitize toolbars
+ foreach (KToolBar *bar, toolBars ()) {
+ if (main_window_toolbar_styles.contains (bar->objectName ())) {
+ bar->setToolButtonStyle (main_window_toolbar_styles[bar->objectName ()]);
+ } else {
+ RK_ASSERT (false);
+ }
+ }
+
// should self-destruct, when child widget is destroyed
connect (widget_to_capture, SIGNAL (destroyed (QObject *)), this, SLOT (viewDestroyed (QObject *)));
connect (widget_to_capture, SIGNAL (captionChanged (RKMDIWindow *)), this, SLOT (updateCaption (RKMDIWindow *)));
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