author | leseb <leseb> | 2002-08-30 18:10:11 (UTC) |
---|---|---|
committer | leseb <leseb> | 2002-08-30 18:10:11 (UTC) |
commit | b5ec106e5f612042987397a5a5b6683fdabaf793 (patch) (side-by-side diff) | |
tree | 58da0aac60a7a39cca162fe222107c9e3d676dac | |
parent | f6125710c0ca99fc62ffce69973a168b6604f29d (diff) | |
download | opie-b5ec106e5f612042987397a5a5b6683fdabaf793.zip opie-b5ec106e5f612042987397a5a5b6683fdabaf793.tar.gz opie-b5ec106e5f612042987397a5a5b6683fdabaf793.tar.bz2 |
Try to handle RAM storage for documents
-rw-r--r-- | library/applnk.cpp | 2 | ||||
-rw-r--r-- | library/global.cpp | 4 | ||||
-rw-r--r-- | library/lnkproperties.cpp | 7 | ||||
-rw-r--r-- | library/storage.cpp | 14 |
4 files changed, 16 insertions, 11 deletions
diff --git a/library/applnk.cpp b/library/applnk.cpp index 5185b5f..778ccab 100644 --- a/library/applnk.cpp +++ b/library/applnk.cpp @@ -342,3 +342,3 @@ QString AppLnk::linkFile() const const FileSystem *fs = storage.fileSystemOf( that->mFile ); - if ( fs && fs->isRemovable() ) { + if ( fs && ( fs->isRemovable() || fs->disk() == "/dev/mtdblock6" || fs->disk() == "tmpfs" ) ) { that->mLinkFile = fs->path(); diff --git a/library/global.cpp b/library/global.cpp index edb7b85..ab27b3f 100644 --- a/library/global.cpp +++ b/library/global.cpp @@ -683,2 +683,6 @@ void Global::findDocuments(DocLnkSet* folder, const QString &mimefilter) folder->appendFrom(ide); + } else if ( (*it)->disk() == "/dev/mtdblock6" || (*it)->disk() == "tmpfs" ) { + QString path = (*it)->path() + "/Documents"; + DocLnkSet ide( path, mimefilter ); + folder->appendFrom(ide); } diff --git a/library/lnkproperties.cpp b/library/lnkproperties.cpp index e8baca6..c020328 100644 --- a/library/lnkproperties.cpp +++ b/library/lnkproperties.cpp @@ -175,5 +175,6 @@ void LnkProperties::setupLocations() (*it)->disk() == "/dev/mtdblock1" || - (*it)->disk() == "/dev/mtdblock/1" || (*it)->disk().left(13) == "/dev/mtdblock" ) { + (*it)->disk() == "/dev/mtdblock/1" || (*it)->disk().left(13) == "/dev/mtdblock" || + (*it)->disk() == "/dev/mtdblock6" || (*it)->disk() == "tmpfs" ) { d->locationCombo->insertItem( (*it)->name(), index ); - locations.append( ((*it)->isRemovable() ? (*it)->path() : homeDir) ); + locations.append( ((*it)->isRemovable() || (*it)->disk() == "/dev/mtdblock6" || (*it)->disk() == "tmpfs" ? (*it)->path() : homeDir) ); if ( lnk->file().contains( (*it)->path() ) ) { @@ -183,3 +184,3 @@ void LnkProperties::setupLocations() index++; - } else if ( (*it)->name().contains( "Hard Disk") && + } else if ( (*it)->name().contains( tr("Hard Disk") ) && homeDir.contains( (*it)->path() ) && diff --git a/library/storage.cpp b/library/storage.cpp index 2d996fa..13639fe 100644 --- a/library/storage.cpp +++ b/library/storage.cpp @@ -107,3 +107,3 @@ void StorageInfo::update() || fs.left(8)=="/dev/mtd" || fs.left(9) == "/dev/mmcd" - || fs.left(8)=="/dev/ram" || fs.left(5)=="tmpfs" ) + || fs.left(5)=="tmpfs" ) { @@ -147,7 +147,7 @@ void StorageInfo::update() } else if ( disk.left(7) == "/dev/hd" ) - humanname = tr("Hard Disk") + " " + humanname.mid(7); + humanname = tr("Hard Disk") + " " + disk.mid(7); else if ( disk.left(7) == "/dev/sd" ) - humanname = tr("SCSI Hard Disk") + " " + humanname.mid(7); + humanname = tr("SCSI Hard Disk") + " " + disk.mid(7); else if ( disk.left(14) == "/dev/mtdblock6" ) //openzaurus ramfs - humanname = tr("Ram FS") + " " + humanname.mid(14); + humanname = tr("Internal Memory"); else if ( disk == "/dev/mtdblock1" || humanname == "/dev/mtdblock/1" ) @@ -155,7 +155,7 @@ void StorageInfo::update() else if ( disk.left(14) == "/dev/mtdblock/" ) - humanname = tr("Internal Storage") + " " + humanname.mid(14); + humanname = tr("Internal Storage") + " " + disk.mid(14); else if ( disk.left(13) == "/dev/mtdblock" ) - humanname = tr("Internal Storage") + " " + humanname.mid(13); + humanname = tr("Internal Storage") + " " + disk.mid(13); else if ( disk.left(5) == "tmpfs" ) //ipaqs /mnt/ramfs - humanname = tr("Ram FS") + " " + humanname.mid(5); + humanname = tr("Internal Memory"); FileSystem *fs = new FileSystem( disk, *fsit, humanname, removable, opts ); |