summaryrefslogtreecommitdiff
path: root/noncore/apps/advancedfm
authorllornkcor <llornkcor>2002-07-28 19:16:22 (UTC)
committer llornkcor <llornkcor>2002-07-28 19:16:22 (UTC)
commit89f6643ef5f1f4401d45f51d9115636742dd926b (patch) (side-by-side diff)
tree179bb54eeea55d944086d10ea316c6e219d18017 /noncore/apps/advancedfm
parent3cf3093654579932750fe82afa4504dbef96b937 (diff)
downloadopie-89f6643ef5f1f4401d45f51d9115636742dd926b.zip
opie-89f6643ef5f1f4401d45f51d9115636742dd926b.tar.gz
opie-89f6643ef5f1f4401d45f51d9115636742dd926b.tar.bz2
made caption change with tab
Diffstat (limited to 'noncore/apps/advancedfm') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index 16dc7da..818a281 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -243,101 +243,106 @@ AdvancedFm::AdvancedFm( )
tabLayout_3->addMultiCellWidget( fileTree, 0, 0, 0, 3 );
TabWidget->insertTab( tab_3, tr( "Remote" ) );
*/
///////////////
currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
currentDir.setPath( QDir::currentDirPath());
currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
currentRemoteDir.setPath( QDir::currentDirPath());
b = TRUE;
filterStr="*";
b=FALSE;
connect( &menuTimer, SIGNAL( timeout() ), SLOT( showFileMenu() ) );
populateLocalView();
populateRemoteView();
currentPathCombo->setFocus();
}
AdvancedFm::~AdvancedFm()
{
}
void AdvancedFm::cleanUp()
{
QString sfile=QDir::homeDirPath();
if(sfile.right(1) != "/")
sfile+="/._temp";
else
sfile+="._temp";
QFile file( sfile);
if(file.exists())
file.remove();
}
void AdvancedFm::tabChanged(QWidget *w)
{
if (TabWidget->currentPageIndex() == 0) {
currentPathCombo->lineEdit()->setText( currentDir.canonicalPath());
viewMenu->setItemChecked(viewMenu->idAt(0),TRUE);
viewMenu->setItemChecked(viewMenu->idAt(1),FALSE);
+ QString fs= getFileSystemType((const QString &) currentDir.canonicalPath());
+ setCaption("AdvancedFm :: "+fs+" :: "+checkDiskSpace((const QString &) currentDir.canonicalPath())+" kB free" );
+
}
if (TabWidget->currentPageIndex() == 1) {
currentPathCombo->lineEdit()->setText( currentRemoteDir.canonicalPath());
viewMenu->setItemChecked(viewMenu->idAt(1),TRUE);
viewMenu->setItemChecked(viewMenu->idAt(0),FALSE);
+ QString fs= getFileSystemType((const QString &) currentRemoteDir.canonicalPath());
+ setCaption("AdvancedFm :: "+fs+" :: "+checkDiskSpace((const QString &) currentRemoteDir.canonicalPath())+" kB free" );
}
}
void AdvancedFm::populateLocalView()
{
QPixmap pm;
Local_View->clear();
currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst);
currentDir.setMatchAllDirs(TRUE);
currentDir.setNameFilter(filterStr);
QString fileL, fileS, fileDate;
QString fs= getFileSystemType((const QString &) currentDir.canonicalPath());
setCaption("AdvancedFm :: "+fs+" :: "+checkDiskSpace((const QString &) currentDir.canonicalPath())+" kB free" );
bool isDir=FALSE;
const QFileInfoList *list = currentDir.entryInfoList( /*QDir::All*/ /*, QDir::SortByMask*/);
QFileInfoListIterator it(*list);
QFileInfo *fi;
while ( (fi=it.current()) ) {
if (fi->isSymLink() ) {
QString symLink=fi->readLink();
QFileInfo sym( symLink);
fileS.sprintf( "%10li", sym.size() );
fileL.sprintf( "%s -> %s", fi->fileName().data(),sym.absFilePath().data() );
fileDate = sym.lastModified().toString();
} else {
fileS.sprintf( "%10li", fi->size() );
fileL.sprintf( "%s",fi->fileName().data() );
fileDate= fi->lastModified().toString();
if( QDir(QDir::cleanDirPath( currentDir.canonicalPath()+"/"+fileL)).exists() ) {
fileL+="/";
isDir=TRUE;
}
}
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" );
} else if ( fs == "vfat" && fileInfo.filePath().contains("/bin") ) {
pm = Resource::loadPixmap( "exec");
} else if( (fileInfo.permission( QFileInfo::ExeUser)
| fileInfo.permission( QFileInfo::ExeGroup)