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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Sun Apr 18 10:41:36 UTC 2010


Revision: 2817
          http://rkward.svn.sourceforge.net/rkward/?rev=2817&view=rev
Author:   tfry
Date:     2010-04-18 10:41:35 +0000 (Sun, 18 Apr 2010)

Log Message:
-----------
Make file browser window save its settings on exit, and add tree view icon

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/debian/changelog
    trunk/rkward/rkward/windows/rkfilebrowser.cpp
    trunk/rkward/rkward/windows/rkfilebrowser.h

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2010-04-15 16:00:22 UTC (rev 2816)
+++ trunk/rkward/ChangeLog	2010-04-18 10:41:35 UTC (rev 2817)
@@ -1,3 +1,5 @@
+- File browser window saves settings on exit
+- Several windows-specific bugs were fixed
 - Plugin dialogs are shown with a larger initial size
 - Add close buttons to each tab in the main document view area (not available in KDE 4.0)
 - Make "print", "export as HTML", "dynamic word wrap", and "increase/descress font size" available for the console window

Modified: trunk/rkward/debian/changelog
===================================================================
--- trunk/rkward/debian/changelog	2010-04-15 16:00:22 UTC (rev 2816)
+++ trunk/rkward/debian/changelog	2010-04-18 10:41:35 UTC (rev 2817)
@@ -1,6 +1,7 @@
 rkward (0.5.3-1) unstable; urgency=low
 
   * new upstream release
+    closes: #556321 (failed to link against thread-library, explicitely)
   * add watch file (thanks to Julien Lavergne and Scott Howard)
     closes: #569114
 

Modified: trunk/rkward/rkward/windows/rkfilebrowser.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkfilebrowser.cpp	2010-04-15 16:00:22 UTC (rev 2816)
+++ trunk/rkward/rkward/windows/rkfilebrowser.cpp	2010-04-18 10:41:35 UTC (rev 2817)
@@ -2,7 +2,7 @@
                           rkfilebrowser  -  description
                              -------------------
     begin                : Thu Apr 26 2007
-    copyright            : (C) 2007, 2008, 2009 by Thomas Friedrichsmeier
+    copyright            : (C) 2007, 2008, 2009, 2010 by Thomas Friedrichsmeier
     email                : tfry at users.sourceforge.net
  ***************************************************************************/
 
@@ -23,6 +23,7 @@
 #include <kcompletionbox.h>
 #include <ktoolbar.h>
 #include <kactioncollection.h>
+#include <kconfiggroup.h>
 
 #include <qdir.h>
 #include <qlayout.h>
@@ -96,15 +97,20 @@
 	setFocusProxy (urlbox);
 
 	dir = new KDirOperator (KUrl (), this);
-	dir->setView(KFile::Simple);
 	dir->setPreviewWidget (0);
+	KConfigGroup config = KGlobal::config ()->group ("file browser window");
+	dir->readConfig (config);
+	dir->setView (KFile::Default);
+	connect (RKWardMainWindow::getMain (), SIGNAL (aboutToQuitRKWard()), this, SLOT (saveConfig()));
 
 	toolbar->addAction (dir->actionCollection ()->action ("up"));
 	toolbar->addAction (dir->actionCollection ()->action ("back"));
 	toolbar->addAction (dir->actionCollection ()->action ("forward"));
 	toolbar->addAction (dir->actionCollection ()->action ("home"));
 	toolbar->addAction (dir->actionCollection ()->action ("short view"));
+	toolbar->addAction (dir->actionCollection ()->action ("tree view"));
 	toolbar->addAction (dir->actionCollection ()->action ("detailed view"));
+//	toolbar->addAction (dir->actionCollection ()->action ("detailed tree view"));	// should we have this as well? Trying to avoid crowding in the toolbar
 
 	connect (dir, SIGNAL (urlEntered (const KUrl &)), this, SLOT (urlChangedInView (const KUrl &)));
 	connect (urlbox, SIGNAL (returnPressed (const QString &)), this, SLOT (urlChangedInCombo (const QString &)));
@@ -119,6 +125,14 @@
 	RK_TRACE (APP);
 }
 
+// does not work in d-tor. Apparently it's too late, then
+void RKFileBrowserWidget::saveConfig () {
+	RK_TRACE (APP);
+
+	KConfigGroup config = KGlobal::config ()->group ("file browser window");
+	dir->writeConfig (config);
+}
+
 void RKFileBrowserWidget::setURL (const QString &url) {
 	RK_TRACE (APP);
 

Modified: trunk/rkward/rkward/windows/rkfilebrowser.h
===================================================================
--- trunk/rkward/rkward/windows/rkfilebrowser.h	2010-04-15 16:00:22 UTC (rev 2816)
+++ trunk/rkward/rkward/windows/rkfilebrowser.h	2010-04-18 10:41:35 UTC (rev 2817)
@@ -2,7 +2,7 @@
                           rkfilebrowser  -  description
                              -------------------
     begin                : Thu Apr 26 2007
-    copyright            : (C) 2007 by Thomas Friedrichsmeier
+    copyright            : (C) 2007, 2010 by Thomas Friedrichsmeier
     email                : tfry at users.sourceforge.net
  ***************************************************************************/
 
@@ -62,6 +62,7 @@
 	void urlChangedInCombo (const QString &url);
 	void urlChangedInCombo (const KUrl &url);
 	void fileActivated (const KFileItem& item);
+	void saveConfig ();
 private:
 	KDirOperator *dir;
 	KUrlComboBox *urlbox;


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