summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-05-02 03:35:28 (UTC)
committer llornkcor <llornkcor>2002-05-02 03:35:28 (UTC)
commita52fd4b1995e34963888397587aa2592ea858da6 (patch) (side-by-side diff)
tree6f8461a8ff72a96078bac6e3a644d33a8b25873a
parentdd8d5784a9ef93b0d4ed7b6d1751942a904ab7cb (diff)
downloadopie-a52fd4b1995e34963888397587aa2592ea858da6.zip
opie-a52fd4b1995e34963888397587aa2592ea858da6.tar.gz
opie-a52fd4b1995e34963888397587aa2592ea858da6.tar.bz2
I hate vfat.. I really do, or maybe I hate the way the kernel deals with it
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index b224deb..f4ca349 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -309,35 +309,36 @@ void AdvancedFm::populateLocalView()
}
QFileInfo fileInfo( currentDir.canonicalPath()+"/"+fileL);
if(fileL !="./" && fi->exists()) {
item= new QListViewItem( Local_View, fileL, fileS , fileDate);
if(isDir || fileL.find("/",0,TRUE) != -1) {
if( !QDir( fi->filePath() ).isReadable()) //is directory
pm = Resource::loadPixmap( "lockedfolder" );
else
pm= Resource::loadPixmap( "folder" );
// item->setPixmap( 0,pm );
+ } else if ( fs == "vfat" && fileInfo.filePath().contains("/bin") ) {
+ pm = Resource::loadPixmap( "exec");
} else if( (fileInfo.permission( QFileInfo::ExeUser)
- | fileInfo.permission( QFileInfo::ExeGroup)
- | fileInfo.permission( QFileInfo::ExeOther))
- | fs == "vfat" && fileInfo.filePath().contains("/bin") ) {
- pm = Resource::loadPixmap( "exec");
+ | fileInfo.permission( QFileInfo::ExeGroup)
+ | fileInfo.permission( QFileInfo::ExeOther)) && fs != "vfat" ) {
+ pm = Resource::loadPixmap( "exec");
// else { //is exec
// pm = Resource::loadPixmap( "exec");
// }
// // item->setPixmap( 0,pm);
- } else if( !fi->isReadable() ) {
- pm = Resource::loadPixmap( "locked" );
+ } else if( !fi->isReadable() ) {
+ pm = Resource::loadPixmap( "locked" );
// item->setPixmap( 0,pm);
} else { //everything else goes by mimetype
MimeType mt(fi->filePath());
pm=mt.pixmap(); //sets the correct pixmap for mimetype
if(pm.isNull())
pm = Resource::loadPixmap( "UnknownDocument-14" );
// item->setPixmap( 0,pm);
}
item->setPixmap( 0,pm);
if( fi->isSymLink() && fileL.find("->",0,TRUE) != -1) {
// overlay link image
pm= Resource::loadPixmap( "folder" );
@@ -421,41 +422,41 @@ void AdvancedFm::populateRemoteView()
fileDate = sym.lastModified().toString();
} else {
// qDebug("Not a dir: "+currentDir.canonicalPath()+fileL);
fileS.sprintf( "%10li", fi->size() );
fileL.sprintf( "%s",fi->fileName().data() );
fileDate= fi->lastModified().toString();
if( QDir(QDir::cleanDirPath( currentRemoteDir.canonicalPath()+"/"+fileL)).exists() ) {
fileL+="/";
isDir=TRUE;
// qDebug( fileL);
}
}
- QFileInfo fileInfo( currentDir.canonicalPath()+"/"+fileL);
+ QFileInfo fileInfo( currentRemoteDir.canonicalPath()+"/"+fileL);
if(fileL !="./" && fi->exists()) {
item= new QListViewItem( Remote_View, fileL, fileS, fileDate);
QPixmap pm;
if(isDir || fileL.find("/",0,TRUE) != -1) {
if( !QDir( fi->filePath() ).isReadable())
pm = Resource::loadPixmap( "lockedfolder" );
else
pm= Resource::loadPixmap( "folder" );
// item->setPixmap( 0,pm );
+ } else if ( fs == "vfat" && fileInfo.filePath().contains("/bin") ) {
+ pm = Resource::loadPixmap( "exec");
} else if( (fileInfo.permission( QFileInfo::ExeUser)
- | fileInfo.permission( QFileInfo::ExeGroup)
- | fileInfo.permission( QFileInfo::ExeOther))
- | fs == "vfat" && fileInfo.filePath().contains("/bin") ) {
-///// } else if(fileInfo.isExecutable()){ //is exec <<<< BROKEN!!
- pm = Resource::loadPixmap( "exec");
+ | fileInfo.permission( QFileInfo::ExeGroup)
+ | fileInfo.permission( QFileInfo::ExeOther)) && fs != "vfat" ) {
+ pm = Resource::loadPixmap( "exec");
// item->setPixmap( 0,pm);
} else if( !fi->isReadable() ) {
pm = Resource::loadPixmap( "locked" );
// item->setPixmap( 0,pm);
} else {
MimeType mt(fi->filePath());
pm=mt.pixmap(); //sets the correct pixmap for mimetype
if(pm.isNull())
pm = Resource::loadPixmap( "UnknownDocument-14" );
// item->setPixmap( 0,pm);
}
if( fi->isSymLink() && fileL.find("->",0,TRUE) != -1) {