[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-03-18 16:01:10
Message-ID: 1237392070.799875.12198.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 940994 by apaku:

Only use the projects-base-dir initially, but then store the directory of the
last-opened file and re-use that. Of course only when no active document
exists. This seems a lot more sensible then putting the user in "some random"
directory every time he closed all files and wants to open a new one.
BUG:187497


 M  +3 -1      documentcontroller.cpp  


--- trunk/KDE/kdevplatform/shell/documentcontroller.cpp #940993:940994
@@ -293,7 +293,7 @@
             dir = KUrl( activeDocument()->url().directory() );
         }else
         {
-            dir = Core::self()->projectController()->projectsBaseDirectory();
+            dir = KGlobal::config()->group("Open File").readEntry( "Last Open File \
Directory", Core::self()->projectController()->projectsBaseDirectory() );  }
 
         url = KFileDialog::getOpenUrl( dir, i18n( "*.*|Text File\n" ),
@@ -304,6 +304,8 @@
         //still no url
         return 0;
 
+    KGlobal::config()->group("Open File").writeEntry( "Last Open File Directory", \
url.upUrl() ); +
     bool emitOpened = false;
 
     //get a part document


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

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