author | leseb <leseb> | 2002-08-30 19:03:23 (UTC) |
---|---|---|
committer | leseb <leseb> | 2002-08-30 19:03:23 (UTC) |
commit | 2922e5f8c94cf459c75c631a2ec0a4aedc570e67 (patch) (side-by-side diff) | |
tree | 85a9e48607a4d1a1a2a3464b135ade74a2619e92 /core/launcher/launcher.cpp | |
parent | f082457be1262b6f96ee4ebfab570f5c8200a11f (diff) | |
download | opie-2922e5f8c94cf459c75c631a2ec0a4aedc570e67.zip opie-2922e5f8c94cf459c75c631a2ec0a4aedc570e67.tar.gz opie-2922e5f8c94cf459c75c631a2ec0a4aedc570e67.tar.bz2 |
View docs in RAM
-rw-r--r-- | core/launcher/launcher.cpp | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index 02124d2..effcd24 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp @@ -558,2 +558,15 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: + // RAM documents + StorageInfo storage; + const QList<FileSystem> &fileSystems = storage.fileSystems(); + QListIterator<FileSystem> it ( fileSystems ); + + for ( ; it.current(); ++it ) { + if ( (*it)->disk() == "/dev/mtdblock6" || (*it)->disk() == "tmpfs" ) { + tmp = new DocLnkSet( (*it)->path(), QString::null ); + docsFolder->appendFrom( *tmp ); + delete tmp; + } + } + Config mediumCfg( "medium"); @@ -571,5 +584,2 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: QString newStamp = QString::number( stamp ); // generates newtime Stamp - StorageInfo storage; - const QList<FileSystem> &fileSystems = storage.fileSystems(); - QListIterator<FileSystem> it ( fileSystems ); @@ -578,3 +588,3 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: QString mime = configToMime(&mediumCfg).join(";"); - for( ; it.current(); ++it ){ + for( it.toFirst(); it.current(); ++it ){ if( (*it)->isRemovable() ){ @@ -588,3 +598,3 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: // c) zecke - for ( ; it.current(); ++it ) { + for ( it.toFirst(); it.current(); ++it ) { if ( (*it)->isRemovable() ) { // let's find out if we should search on it @@ -829,3 +839,3 @@ void Launcher::systemMessage( const QCString &msg, const QByteArray &data) for ( ; it.current(); ++it ) { - if ( (*it)->isRemovable() ) + if ( (*it)->isRemovable() || (*it)->disk() == "/dev/mtdblock6" || (*it)->disk() == "tmpfs" ) s += (*it)->name() + "=" + (*it)->path() + "/Documents " @@ -838,3 +848,3 @@ void Launcher::systemMessage( const QCString &msg, const QByteArray &data) + " " + (*it)->options() + ";"; - else if ( (*it)->name().contains( "Hard Disk") && + else if ( (*it)->name().contains( tr("Hard Disk") ) && homeDir.contains( (*it)->path() ) && |