author | llornkcor <llornkcor> | 2003-07-17 13:14:32 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-07-17 13:14:32 (UTC) |
commit | c72b7e02defdbcc1f2b6b4ff38f256486cfaeec7 (patch) (side-by-side diff) | |
tree | 086f295d49a8d88308c536a8038aa0ba6c179a3d /noncore/apps/advancedfm/advancedfm.cpp | |
parent | 6ca1d7605597f4b8a7559167e5cf3d6e093805cd (diff) | |
download | opie-c72b7e02defdbcc1f2b6b4ff38f256486cfaeec7.zip opie-c72b7e02defdbcc1f2b6b4ff38f256486cfaeec7.tar.gz opie-c72b7e02defdbcc1f2b6b4ff38f256486cfaeec7.tar.bz2 |
some crazy characters fixing
Diffstat (limited to 'noncore/apps/advancedfm/advancedfm.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 71 |
1 files changed, 28 insertions, 43 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 60558e7..77dca49 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp @@ -123,6 +123,4 @@ void AdvancedFm::populateView() QFileInfo *fi; - while ( (fi=it.current()) ) - { - if (fi->isSymLink() ) - { + while ( (fi=it.current()) ) { + if (fi->isSymLink() ) { QString symLink=fi->readLink(); @@ -130,12 +128,9 @@ void AdvancedFm::populateView() fileS.sprintf( "%10i", sym.size() ); - fileL.sprintf( "%s -> %s", fi->fileName().data(),sym.filePath().data() ); + fileL = fi->fileName() +" -> " + sym.filePath().data(); fileDate = sym.lastModified().toString(); - } - else - { + } else { fileS.sprintf( "%10i", fi->size() ); - fileL.sprintf( "%s",fi->fileName().data() ); + fileL = fi->fileName(); fileDate= fi->lastModified().toString(); - if( QDir(QDir::cleanDirPath( path +"/"+fileL)).exists() ) - { + if( QDir(QDir::cleanDirPath( path +"/"+fileL)).exists() ) { fileL+="/"; @@ -144,11 +139,8 @@ void AdvancedFm::populateView() } - QFileInfo fileInfo( path + "/" + fileL); - if(fileL !="./" && fi->exists()) - { - item= new QListViewItem( thisView, fileL, fileS , fileDate); + if(fileL !="./" && fi->exists()) { + item = new QListViewItem( thisView, fileL, fileS , fileDate); - if(isDir || fileL.find("/",0,TRUE) != -1) - { + if(isDir || fileL.find("/",0,TRUE) != -1) { @@ -159,5 +151,4 @@ void AdvancedFm::populateView() } - else if ( fs == "vfat" && fileInfo.filePath().contains("/bin") ) - { - pm = Resource::loadPixmap( "exec"); + else if ( fs == "vfat" && fileInfo.filePath().contains("/bin") ) { + pm = Resource::loadPixmap( "exec"); } @@ -165,8 +156,6 @@ void AdvancedFm::populateView() | fileInfo.permission( QFileInfo::ExeGroup) - | fileInfo.permission( QFileInfo::ExeOther)) && fs != "vfat" ) - { + | fileInfo.permission( QFileInfo::ExeOther)) && fs != "vfat" ) { pm = Resource::loadPixmap( "exec"); } - else if( !fi->isReadable() ) - { + else if( !fi->isReadable() ) { pm = Resource::loadPixmap( "locked" ); @@ -180,10 +169,10 @@ void AdvancedFm::populateView() } - if( fi->isSymLink() && fileL.find("->",0,TRUE) != -1) - { - // overlay link image - pm= Resource::loadPixmap( "folder" ); - QPixmap lnk = Resource::loadPixmap( "opie/symlink" ); - QPainter painter( &pm ); - painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk ); - pm.setMask( pm.createHeuristicMask( FALSE ) ); + if( fi->isSymLink() || fileL.find("->",0,TRUE) != -1) { + // qDebug(" overlay link image"); + pm= Resource::loadPixmap( "advancedfm/symlink" ); + // pm= Resource::loadPixmap( "folder" ); +// QPixmap lnk = Resource::loadPixmap( "opie/symlink" ); +// QPainter painter( &pm ); +// painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk ); +// pm.setMask( pm.createHeuristicMask( FALSE ) ); } @@ -196,4 +185,3 @@ void AdvancedFm::populateView() - if( path.find("dev",0,TRUE) != -1) - { + if( path.find("dev",0,TRUE) != -1) { struct stat buf; @@ -204,4 +192,3 @@ void AdvancedFm::populateView() if((dir = opendir( path.latin1())) != NULL) - while ((mydirent = readdir(dir)) != NULL) - { + while ((mydirent = readdir(dir)) != NULL) { lstat( mydirent->d_name, &buf); @@ -212,4 +199,3 @@ void AdvancedFm::populateView() fileDate.sprintf("%s", ctime( &buf.st_mtime)); - if( fileL.find(".") == -1 ) - { + if( fileL.find(".") == -1 ) { item= new QListViewItem( thisView, fileL, fileS, fileDate); @@ -682,12 +668,11 @@ void AdvancedFm::addToDocs() - if( strListPaths.count() > 0) - { + if( strListPaths.count() > 0) { QString curFile; - for ( QStringList::Iterator it = strListPaths.begin(); it != strListPaths.end(); ++it ) - { + for ( QStringList::Iterator it = strListPaths.begin(); it != strListPaths.end(); ++it ) { curFile = thisDir->canonicalPath()+"/"+(*it); // qDebug(curFile); + QFileInfo fi(curFile); DocLnk f; // curFile.replace(QRegExp("\\..*"),""); - f.setName((*it)); + f.setName(fi.baseName() ); f.setFile( curFile); |