summaryrefslogtreecommitdiff
Unidiff
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()
309 } 309 }
310 QFileInfo fileInfo( currentDir.canonicalPath()+"/"+fileL); 310 QFileInfo fileInfo( currentDir.canonicalPath()+"/"+fileL);
311 if(fileL !="./" && fi->exists()) { 311 if(fileL !="./" && fi->exists()) {
312 item= new QListViewItem( Local_View, fileL, fileS , fileDate); 312 item= new QListViewItem( Local_View, fileL, fileS , fileDate);
313 313
314 if(isDir || fileL.find("/",0,TRUE) != -1) { 314 if(isDir || fileL.find("/",0,TRUE) != -1) {
315 315
316 if( !QDir( fi->filePath() ).isReadable()) //is directory 316 if( !QDir( fi->filePath() ).isReadable()) //is directory
317 pm = Resource::loadPixmap( "lockedfolder" ); 317 pm = Resource::loadPixmap( "lockedfolder" );
318 else 318 else
319 pm= Resource::loadPixmap( "folder" ); 319 pm= Resource::loadPixmap( "folder" );
320// item->setPixmap( 0,pm ); 320// item->setPixmap( 0,pm );
321 } else if ( fs == "vfat" && fileInfo.filePath().contains("/bin") ) {
322 pm = Resource::loadPixmap( "exec");
321 } else if( (fileInfo.permission( QFileInfo::ExeUser) 323 } else if( (fileInfo.permission( QFileInfo::ExeUser)
322 | fileInfo.permission( QFileInfo::ExeGroup) 324 | fileInfo.permission( QFileInfo::ExeGroup)
323 | fileInfo.permission( QFileInfo::ExeOther)) 325 | fileInfo.permission( QFileInfo::ExeOther)) && fs != "vfat" ) {
324 | fs == "vfat" && fileInfo.filePath().contains("/bin") ) { 326 pm = Resource::loadPixmap( "exec");
325 pm = Resource::loadPixmap( "exec");
326// else { //is exec 327// else { //is exec
327// pm = Resource::loadPixmap( "exec"); 328// pm = Resource::loadPixmap( "exec");
328// } 329// }
329// // item->setPixmap( 0,pm); 330// // item->setPixmap( 0,pm);
330 } else if( !fi->isReadable() ) { 331 } else if( !fi->isReadable() ) {
331 pm = Resource::loadPixmap( "locked" ); 332 pm = Resource::loadPixmap( "locked" );
332// item->setPixmap( 0,pm); 333// item->setPixmap( 0,pm);
333 } else { //everything else goes by mimetype 334 } else { //everything else goes by mimetype
334 MimeType mt(fi->filePath()); 335 MimeType mt(fi->filePath());
335 pm=mt.pixmap(); //sets the correct pixmap for mimetype 336 pm=mt.pixmap(); //sets the correct pixmap for mimetype
336 if(pm.isNull()) 337 if(pm.isNull())
337 pm = Resource::loadPixmap( "UnknownDocument-14" ); 338 pm = Resource::loadPixmap( "UnknownDocument-14" );
338// item->setPixmap( 0,pm); 339// item->setPixmap( 0,pm);
339 } 340 }
340 item->setPixmap( 0,pm); 341 item->setPixmap( 0,pm);
341 if( fi->isSymLink() && fileL.find("->",0,TRUE) != -1) { 342 if( fi->isSymLink() && fileL.find("->",0,TRUE) != -1) {
342 // overlay link image 343 // overlay link image
343 pm= Resource::loadPixmap( "folder" ); 344 pm= Resource::loadPixmap( "folder" );
@@ -421,41 +422,41 @@ void AdvancedFm::populateRemoteView()
421 fileDate = sym.lastModified().toString(); 422 fileDate = sym.lastModified().toString();
422 } else { 423 } else {
423// qDebug("Not a dir: "+currentDir.canonicalPath()+fileL); 424// qDebug("Not a dir: "+currentDir.canonicalPath()+fileL);
424 fileS.sprintf( "%10li", fi->size() ); 425 fileS.sprintf( "%10li", fi->size() );
425 fileL.sprintf( "%s",fi->fileName().data() ); 426 fileL.sprintf( "%s",fi->fileName().data() );
426 fileDate= fi->lastModified().toString(); 427 fileDate= fi->lastModified().toString();
427 if( QDir(QDir::cleanDirPath( currentRemoteDir.canonicalPath()+"/"+fileL)).exists() ) { 428 if( QDir(QDir::cleanDirPath( currentRemoteDir.canonicalPath()+"/"+fileL)).exists() ) {
428 fileL+="/"; 429 fileL+="/";
429 isDir=TRUE; 430 isDir=TRUE;
430// qDebug( fileL); 431// qDebug( fileL);
431 } 432 }
432 } 433 }
433 QFileInfo fileInfo( currentDir.canonicalPath()+"/"+fileL); 434 QFileInfo fileInfo( currentRemoteDir.canonicalPath()+"/"+fileL);
434 if(fileL !="./" && fi->exists()) { 435 if(fileL !="./" && fi->exists()) {
435 item= new QListViewItem( Remote_View, fileL, fileS, fileDate); 436 item= new QListViewItem( Remote_View, fileL, fileS, fileDate);
436 QPixmap pm; 437 QPixmap pm;
437 438
438 if(isDir || fileL.find("/",0,TRUE) != -1) { 439 if(isDir || fileL.find("/",0,TRUE) != -1) {
439 if( !QDir( fi->filePath() ).isReadable()) 440 if( !QDir( fi->filePath() ).isReadable())
440 pm = Resource::loadPixmap( "lockedfolder" ); 441 pm = Resource::loadPixmap( "lockedfolder" );
441 else 442 else
442 pm= Resource::loadPixmap( "folder" ); 443 pm= Resource::loadPixmap( "folder" );
443// item->setPixmap( 0,pm ); 444// item->setPixmap( 0,pm );
445 } else if ( fs == "vfat" && fileInfo.filePath().contains("/bin") ) {
446 pm = Resource::loadPixmap( "exec");
444 } else if( (fileInfo.permission( QFileInfo::ExeUser) 447 } else if( (fileInfo.permission( QFileInfo::ExeUser)
445 | fileInfo.permission( QFileInfo::ExeGroup) 448 | fileInfo.permission( QFileInfo::ExeGroup)
446 | fileInfo.permission( QFileInfo::ExeOther)) 449 | fileInfo.permission( QFileInfo::ExeOther)) && fs != "vfat" ) {
447 | fs == "vfat" && fileInfo.filePath().contains("/bin") ) { 450 pm = Resource::loadPixmap( "exec");
448///// } else if(fileInfo.isExecutable()){ //is exec <<<< BROKEN!!
449 pm = Resource::loadPixmap( "exec");
450// item->setPixmap( 0,pm); 451// item->setPixmap( 0,pm);
451 } else if( !fi->isReadable() ) { 452 } else if( !fi->isReadable() ) {
452 pm = Resource::loadPixmap( "locked" ); 453 pm = Resource::loadPixmap( "locked" );
453// item->setPixmap( 0,pm); 454// item->setPixmap( 0,pm);
454 } else { 455 } else {
455 MimeType mt(fi->filePath()); 456 MimeType mt(fi->filePath());
456 pm=mt.pixmap(); //sets the correct pixmap for mimetype 457 pm=mt.pixmap(); //sets the correct pixmap for mimetype
457 if(pm.isNull()) 458 if(pm.isNull())
458 pm = Resource::loadPixmap( "UnknownDocument-14" ); 459 pm = Resource::loadPixmap( "UnknownDocument-14" );
459// item->setPixmap( 0,pm); 460// item->setPixmap( 0,pm);
460 } 461 }
461 if( fi->isSymLink() && fileL.find("->",0,TRUE) != -1) { 462 if( fi->isSymLink() && fileL.find("->",0,TRUE) != -1) {