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

List:       kde-bugs-dist
Subject:    [Bug 99208] non existant directory warning in the file selector on
From:       Alexandre Oliveira <aoliveira () kdemail ! net>
Date:       2005-09-07 4:05:56
Message-ID: 20050907040556.22616.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
         
http://bugs.kde.org/show_bug.cgi?id=99208         
aoliveira kdemail net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From aoliveira kdemail net  2005-09-07 06:05 -------
SVN commit 457935 by aoliveira:

Don't show the boring warning dialog when starting if the directory on File Browser \
                doesn't exist anymore. Just revert to home.
BUG: 99208


 M  +9 -3      filebrowser.cpp  


--- trunk/extragear/multimedia/amarok/src/filebrowser.cpp #457934:457935
 @ -95,8 +95,14  @
     KConfig* const config = amaroK::config( "Filebrowser" );
     SearchPane *searchPane;
 
-    const QString currentLocation = config->readPathEntry( "Location", \
QDir::homeDirPath() ); +    KURL location( config->readPathEntry( "Location", \
QDir::homeDirPath() ) );  
+    KFileItem currentFolder( KFileItem::Unknown, KFileItem::Unknown, location );
+    if ( !currentFolder.isReadable() ) {
+        location.setPath( QDir::homeDirPath() );
+    }
+
+
     KToolBar *toolbar = new Browser::ToolBar( this );
 
     { //Filter LineEdit
 @ -131,10 +137,10  @
         m_combo->setAutoDeleteCompletionObject( true );
         m_combo->setMaxItems( 9 );
         m_combo->setURLs( config->readPathListEntry( "Dir History" ) );
-        m_combo->lineEdit()->setText( currentLocation );
+        m_combo->lineEdit()->setText( location.path() );
 
         //The main widget with file listings and that
-        m_dir = new MyDirOperator( KURL(currentLocation), container );
+        m_dir = new MyDirOperator( location, container );
         m_dir->setEnableDirHighlighting( true );
         m_dir->setMode( KFile::Mode((int)KFile::Files | (int)KFile::Directory) ); \
                //allow selection of multiple files + dirs
         m_dir->setOnlyDoubleClickSelectsFiles( true ); //amaroK type settings


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

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