[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdevplatform/shell
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2009-06-30 20:24:08
Message-ID: 1246393448.754501.15904.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 989746 by apaku:

Had to revert the related commit to KDirOperator as I misunderstood how
things worked.
We need to change the defaultView of the KDirOperator if we want to make
sure its using Simple. Only way right now is enforce this by using a
custom view-config on the dir-operator and writing the "Simple" View
Style into it before letting the kdiroperator read it.

 M  +8 -1      openprojectpage.cpp  


--- trunk/KDE/kdevplatform/shell/openprojectpage.cpp #989745:989746
@@ -69,10 +69,17 @@
     fileWidget->setFilter( filters.join("\n") );
 
     fileWidget->setMode( KFile::Modes( KFile::File | KFile::Directory | KFile::ExistingOnly ) );
+
+    // TODO for 4.4: (don't dare to introduce new API for 4.3 after the rc1)
+    // Provide a setDefaultView function on KDirOperator so we don't have to
+    // put it into the config and hence allow the user to store his favourite
+    // setting.
+    KConfigGroup projectdialogsettings = KGlobal::config()->group( "Open Project Dialog Settings" );
+    projectdialogsettings.writeEntry( "View Style", "Simple" );
 #if KDE_IS_VERSION(4,2,62)
     // Enforce "short view" for now as KFileWidget has no API to read its config from a different
     // but the global-default for KFileDialog. 
-    fileWidget->dirOperator()->setView(KFile::Simple);
+    fileWidget->dirOperator()->setViewConfig( projectdialogsettings );
 #endif
 
     layout->addWidget( fileWidget );
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic