[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenox/konq-embed/dropin
From: Eva Brucherseifer <eva () kde ! org>
Date: 2006-05-28 21:16:52
Message-ID: 1148851012.757203.4209.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 546039 by eva:
Uli's (fixed) patch for directories shown on Qtopia
M +15 -24 kfiledialog.cpp
--- trunk/kdenox/konq-embed/dropin/kfiledialog.cpp #546038:546039
@@ -168,42 +168,33 @@
memory.clear();
nameMap.clear();
-#ifdef QTOPIA_SIMULATOR
- memory.append("Documents");
- nameMap["Documents"] = QPEApplication::documentDir();
-#endif
+ QDir docDir( QPEApplication::documentDir() );
+ if ( docDir.exists() )
+ {
+ QString name = StorageInfo::tr("Internal Storage");
+ memory.append( name );
+ nameMap[name] = docDir.path();
+ }
// insert all removable disks and the home partion
const QList<FileSystem> &fs = storage->fileSystems();
QListIterator<FileSystem> it ( fs );
- QString homeDir = QDir::homeDirPath();
- QString homeFs;
- QString homeFsPath;
for ( ; it.current(); ++it ){
if ( (*it)->isRemovable() ) {
memory.append( (*it)->name() );
- nameMap[(*it)->name()] = (*it)->path();
- } else if ( homeDir.contains( (*it)->path() ) &&
- (*it)->path().length() > homeFsPath.length() ) {
- homeFs = (*it)->name();
- homeFsPath = (*it)->path();
- }
+ nameMap[(*it)->name()] = (*it)->path() +"/";
+ }
}
- // $HOME is *somewhere*, but not shown in Storage::fileSystems(),
- // eg. because it's mounted in some unexpected way.
- if ( homeFsPath.isEmpty() ) {
- homeFs = StorageInfo::tr("Internal Storage");
- homeFsPath = homeDir;
- }
#ifdef QTOPIA_SIMULATOR
- homeFs = StorageInfo::tr("Simulator Home Directory: %1").arg(homeDir);
- homeFsPath = homeDir;
+ QDir homeDir (QDir::homeDirPath());
+ if ( homeDir.exists() ){
+ QString homeFs = StorageInfo::tr("Simulator Home Directory: %1").arg(homeDir.path());
+ memory.append( homeFs );
+ nameMap[homeFs] = homeDir.path();
+ }
#endif
- memory.append( homeFs );
- nameMap[homeFs] = homeFsPath;
-
// delete m_storageCombo->contextMenu;
// contextMenu = 0;
m_storageCombo->clear();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic