author | llornkcor <llornkcor> | 2003-02-24 02:38:01 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-02-24 02:38:01 (UTC) |
commit | e144592570ddacf26d27f3e2759dbe7f2370d0a0 (patch) (side-by-side diff) | |
tree | 054221a40b03bd91945161570a8996a5427e6456 | |
parent | 56b89312a374b62ee20f6ad2b62b6426183d4d26 (diff) | |
download | opie-e144592570ddacf26d27f3e2759dbe7f2370d0a0.zip opie-e144592570ddacf26d27f3e2759dbe7f2370d0a0.tar.gz opie-e144592570ddacf26d27f3e2759dbe7f2370d0a0.tar.bz2 |
cleanup
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 200 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 6 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 76 |
3 files changed, 74 insertions, 208 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 74654fc..fc6c3bf 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp @@ -69,18 +69,20 @@ #include <sys/utsname.h> AdvancedFm::AdvancedFm( ) : QMainWindow( ) { init(); renameBox = 0; initConnections(); - populateLocalView(); - populateRemoteView(); + TabWidget->setCurrentTab(1); + populateView(); + TabWidget->setCurrentTab(0); + populateView(); currentPathCombo->setFocus(); } AdvancedFm::~AdvancedFm() { } void AdvancedFm::cleanUp() @@ -110,32 +112,37 @@ void AdvancedFm::tabChanged(QWidget *w) viewMenu->setItemChecked(viewMenu->idAt(0),TRUE); viewMenu->setItemChecked(viewMenu->idAt(1),FALSE); QString fs= getFileSystemType( (const QString &) path); setCaption("AdvancedFm :: "+fs+" :: " +checkDiskSpace( (const QString &) path )+ " kB free" ); chdir( path.latin1()); +//2 populateView(); } -void AdvancedFm::populateLocalView() +void AdvancedFm::populateView() { QPixmap pm; - Local_View->clear(); - currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); - currentDir.setMatchAllDirs(TRUE); - currentDir.setNameFilter(filterStr); + QListView *thisView = CurrentView(); + QDir *thisDir = CurrentDir(); + QString path = thisDir->canonicalPath(); + + thisView->clear(); + thisDir->setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); + thisDir->setMatchAllDirs(TRUE); + thisDir->setNameFilter(filterStr); QString fileL, fileS, fileDate; - QString fs= getFileSystemType((const QString &) currentDir.canonicalPath()); + QString fs= getFileSystemType((const QString &) path); setCaption("AdvancedFm :: "+fs+" :: " - +checkDiskSpace((const QString &) currentDir.canonicalPath())+" kB free" ); + +checkDiskSpace((const QString &) path)+" kB free" ); bool isDir=FALSE; - const QFileInfoList *list = currentDir.entryInfoList( /*QDir::All*/ /*, QDir::SortByMask*/); + const QFileInfoList *list = thisDir->entryInfoList( /*QDir::All*/ /*, QDir::SortByMask*/); QFileInfoListIterator it(*list); QFileInfo *fi; while ( (fi=it.current()) ) { if (fi->isSymLink() ) { QString symLink=fi->readLink(); QFileInfo sym( symLink); @@ -143,26 +150,28 @@ void AdvancedFm::populateLocalView() fileL.sprintf( "%s -> %s", fi->fileName().data(),sym.filePath().data() ); fileDate = sym.lastModified().toString(); } else { fileS.sprintf( "%10i", fi->size() ); fileL.sprintf( "%s",fi->fileName().data() ); fileDate= fi->lastModified().toString(); - if( QDir(QDir::cleanDirPath( currentDir.canonicalPath()+"/"+fileL)).exists() ) + if( QDir(QDir::cleanDirPath( path +"/"+fileL)).exists() ) { fileL+="/"; isDir=TRUE; } } - QFileInfo fileInfo( currentDir.canonicalPath()+"/"+fileL); + + QFileInfo fileInfo( path + "/" + fileL); + if(fileL !="./" && fi->exists()) { - item= new QListViewItem( Local_View, fileL, fileS , fileDate); + item= new QListViewItem( thisView, 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" ); @@ -198,169 +207,48 @@ void AdvancedFm::populateLocalView() pm.setMask( pm.createHeuristicMask( FALSE ) ); item->setPixmap( 0, pm); } } isDir=FALSE; ++it; } - if(currentDir.canonicalPath().find("dev",0,TRUE) != -1) + if( path.find("dev",0,TRUE) != -1) { struct stat buf; dev_t devT; DIR *dir; struct dirent *mydirent; - if((dir = opendir( currentDir.canonicalPath().latin1())) != NULL) + if((dir = opendir( path.latin1())) != NULL) while ((mydirent = readdir(dir)) != NULL) { lstat( mydirent->d_name, &buf); // qDebug(mydirent->d_name); fileL.sprintf("%s", mydirent->d_name); devT = buf.st_dev; fileS.sprintf("%d, %d", (int) ( devT >>8) &0xFF, (int)devT &0xFF); fileDate.sprintf("%s", ctime( &buf.st_mtime)); if( fileL.find(".") == -1 ) { - item= new QListViewItem( Local_View, fileL, fileS, fileDate); + item= new QListViewItem( thisView, fileL, fileS, fileDate); pm = Resource::loadPixmap( "UnknownDocument-14" ); item->setPixmap( 0,pm); } } closedir(dir); } - Local_View->setSorting( 3,FALSE); - fillCombo( (const QString &) currentDir.canonicalPath()); + thisView->setSorting( 3,FALSE); + fillCombo( (const QString &) path ); } -void AdvancedFm::populateRemoteView() -{ - QPixmap pm; - Remote_View->clear(); - currentRemoteDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); - currentRemoteDir.setMatchAllDirs(TRUE); - currentRemoteDir.setNameFilter(filterStr); - QString fileL, fileS, fileDate; - - QString fs= getFileSystemType((const QString &) currentRemoteDir.canonicalPath()); - setCaption("AdvancedFm :: "+fs+" :: " - +checkDiskSpace((const QString &) currentRemoteDir.canonicalPath())+" kB free" ); - bool isDir=FALSE; - const QFileInfoList *list = currentRemoteDir.entryInfoList( /*QDir::All*/ /*, QDir::SortByMask*/); - QFileInfoListIterator it(*list); - QFileInfo *fi; - while ( (fi=it.current()) ) - { - if (fi->isSymLink() ) - { - QString symLink=fi->readLink(); - // qDebug("Symlink detected "+symLink); - QFileInfo sym( symLink); - fileS.sprintf( "%10i", sym.size() ); - fileL.sprintf( "%s -> %s", fi->fileName().data(),sym.filePath().data() ); - fileDate = sym.lastModified().toString(); - } - else - { - // qDebug("Not a dir: "+currentDir.canonicalPath()+fileL); - fileS.sprintf( "%10i", 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( 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" ); - } - 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" ) - { - pm = Resource::loadPixmap( "exec"); - } - else if( !fi->isReadable() ) - { - pm = Resource::loadPixmap( "locked" ); - } - else - { - MimeType mt(fi->filePath()); - pm=mt.pixmap(); //sets the correct pixmap for mimetype - if(pm.isNull()) - pm = Resource::loadPixmap( "UnknownDocument-14" ); - } - 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 ) ); - } - item->setPixmap( 0, pm); - } - isDir=FALSE; - ++it; - } - - if(currentRemoteDir.canonicalPath().find("dev",0,TRUE) != -1) - { - struct stat buf; - DIR *dir; - struct dirent *mydirent; - if((dir = opendir( currentRemoteDir.canonicalPath().latin1())) != NULL) - - while ((mydirent = readdir(dir)) != NULL) - { - lstat( mydirent->d_name, &buf); -// qDebug(mydirent->d_name); - fileL.sprintf("%s", mydirent->d_name); - fileS.sprintf("%d,%d", (int) (buf.st_dev>>8)&0xFF, (int) buf.st_dev &0xFF); - fileDate.sprintf("%s", ctime( &buf.st_mtime)); - - if( fileL.find(".") == -1 ) - { - item= new QListViewItem( Remote_View, fileL, fileS, fileDate); - pm = Resource::loadPixmap( "UnknownDocument-14" ); - item->setPixmap( 0,pm); - } - } - - closedir(dir); - } - - Remote_View->setSorting( 3,FALSE); - fillCombo( (const QString &) currentRemoteDir.canonicalPath() ); -} - void AdvancedFm::ListClicked(QListViewItem *selectedItem) { if(selectedItem) { QString strItem=selectedItem->text(0); QString strSize=selectedItem->text(1); strSize=strSize.stripWhiteSpace(); bool isDirectory = false; @@ -378,17 +266,17 @@ void AdvancedFm::ListClicked(QListViewItem *selectedItem) if(QDir(strItem).exists()) isDirectory = true; } if( isDirectory ) { CurrentDir()->cd( strItem, TRUE); - PopulateView(); + populateView(); CurrentView()->ensureItemVisible( CurrentView()->firstChild()); } chdir( strItem.latin1()); } } void AdvancedFm::ListPressed( int mouse, QListViewItem *, const QPoint& , int ) { switch (mouse) { @@ -429,17 +317,17 @@ void AdvancedFm::writeConfig() Config cfg("AdvancedFm"); } void AdvancedFm::currentPathComboChanged() { if(QDir( currentPathCombo->lineEdit()->text()).exists()) { CurrentDir()->setPath( currentPathCombo->lineEdit()->text() ); - PopulateView(); + populateView(); } else { QMessageBox::message(tr("Note"),tr("That directory does not exist")); } } void AdvancedFm::fillCombo(const QString ¤tPath) @@ -466,17 +354,17 @@ void AdvancedFm::fillCombo(const QString ¤tPath) } } } void AdvancedFm::currentPathComboActivated(const QString & currentPath) { chdir( currentPath.latin1() ); CurrentDir()->cd( currentPath, TRUE); - PopulateView(); + populateView(); update(); } QStringList AdvancedFm::getPath() { QStringList strList; QListView *thisView=CurrentView(); QList<QListViewItem> * getSelectedItems( QListView * thisView ); @@ -492,50 +380,50 @@ QStringList AdvancedFm::getPath() return strList; } void AdvancedFm::homeButtonPushed() { QString current = QDir::homeDirPath(); chdir( current.latin1() ); CurrentDir()->cd( current, TRUE); - PopulateView(); + populateView(); update(); } void AdvancedFm::docButtonPushed() { QString current = QPEApplication::documentDir(); chdir( current.latin1() ); CurrentDir()->cd( current, TRUE); - PopulateView(); + populateView(); update(); } void AdvancedFm::SDButtonPushed() { QString current = "/mnt/card";// this can change so fix chdir( current.latin1() ); CurrentDir()->cd( current, TRUE); - PopulateView(); + populateView(); update(); } void AdvancedFm::CFButtonPushed() { QString current; if(zaurusDevice) current= "/mnt/cf"; //zaurus else current = "/mnt/hda"; //ipaq chdir( current.latin1() ); CurrentDir()->cd( current, TRUE); - PopulateView(); + populateView(); update(); } void AdvancedFm::doAbout() { QMessageBox::message("AdvancedFm",tr("Advanced FileManager\n" "is copyright 2002-2003 by\n" @@ -626,17 +514,17 @@ void AdvancedFm::keyReleaseEvent( QKeyEvent *e) } void AdvancedFm::QPEButtonPushed() { QString current = QPEApplication::qpeDir(); chdir( current.latin1() ); CurrentDir()->cd( current, TRUE); - PopulateView(); + populateView(); update(); } void AdvancedFm::parsetab(const QString &fileName) { fileSystemTypeList.clear(); fsList.clear(); @@ -943,17 +831,17 @@ void AdvancedFm::gotoCustomDir(const QString &dir) } else { if(QDir( curDir).exists() ) { thisDir->setPath( curDir ); chdir( curDir.latin1() ); thisDir->cd( curDir, TRUE); - PopulateView(); + populateView(); } } } QDir *AdvancedFm::CurrentDir() { if ( whichTab == 1) { @@ -972,31 +860,31 @@ QDir *AdvancedFm::OtherDir() return ¤tRemoteDir; } else { return ¤tDir; } } -void AdvancedFm::PopulateView() -{ - if ( whichTab == 1) - populateLocalView(); - else - populateRemoteView(); -} - QListView * AdvancedFm::CurrentView() { if ( whichTab == 1) return Local_View; else return Remote_View; } QListView * AdvancedFm::OtherView() { if ( whichTab == 1) return Remote_View; else return Local_View; } + +void AdvancedFm::setOtherTabCurrent() +{ + if ( whichTab == 1) + TabWidget->setCurrentTab(1); + else + TabWidget->setCurrentTab(0); +} diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h index 8eec6ba..024ab29 100644 --- a/noncore/apps/advancedfm/advancedfm.h +++ b/noncore/apps/advancedfm/advancedfm.h @@ -58,21 +58,19 @@ public: ~AdvancedFm(); protected slots: void selectAll(); void addToDocs(); void doDirChange(); void mkDir(); void del(); void rn(); - void populateLocalView(); - void populateRemoteView(); + void populateView(); void showHidden(); void showMenuHidden(); -// void showRemoteHidden(); void writeConfig(); void readConfig(); void ListClicked(QListViewItem *); void ListPressed( int, QListViewItem *, const QPoint&, int); void makeDir(); void doDelete(); void tabChanged(QWidget*); void cleanUp(); @@ -120,17 +118,17 @@ protected: QString getDiskSpace(const QString &); void parsetab(const QString &fileName); QString checkDiskSpace(const QString &); QString dealWithSymName(const QString &); QDir *CurrentDir(); QDir *OtherDir(); QListView *CurrentView(); QListView *OtherView(); - void PopulateView(); + void setOtherTabCurrent(); protected slots: void dirMenuSelected(int); void showFileMenu(); void cancelMenuTimer(); void homeButtonPushed(); void docButtonPushed(); void SDButtonPushed(); diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index 13dad33..c553017 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp @@ -63,18 +63,18 @@ void AdvancedFm::showMenuHidden() } else { currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); currentRemoteDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); fileMenu->setItemChecked( fileMenu->idAt(0),FALSE); // b=TRUE; } - populateLocalView(); - populateRemoteView(); + populateView(); +// populateRemoteView(); // if(b) qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<< true"); if(b) b = false; else b = true; } void AdvancedFm::showHidden() { if (b) { @@ -84,17 +84,17 @@ void AdvancedFm::showHidden() } else { CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); // fileMenu->setItemChecked( fileMenu->idAt(0),FALSE); // b=TRUE; } - PopulateView(); + populateView(); } QString AdvancedFm::dealWithSymName(const QString &fileName) { QString strItem = fileName; return strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4); } @@ -160,17 +160,17 @@ void AdvancedFm::makeDir() fileDlg = new InputDialog(this,tr("Make Directory"),TRUE, 0); fileDlg->exec(); if( fileDlg->result() == 1 ) { QDir *thisDir = CurrentDir(); QString filename = fileDlg->LineEdit1->text(); thisDir->mkdir( thisDir->canonicalPath()+"/"+filename); } - PopulateView(); + populateView(); } void AdvancedFm::doDelete() { QStringList curFileList = getPath(); bool doMsg=true; int count = curFileList.count(); @@ -209,17 +209,17 @@ void AdvancedFm::doDelete() "\nand all it's contents ?" ,tr("Yes"),tr("No"),0,0,1) ) { case 0: { f=f.left(f.length()-1); QString cmd="rm -rf "+f; startProcess( (const QString)cmd.latin1() ); - PopulateView(); + populateView(); } break; case 1: // exit break; }; } else { @@ -233,17 +233,17 @@ void AdvancedFm::doDelete() } QString cmd="rm "+f; QFile file(f); if(QFileInfo(myFile).fileName().find("../",0,TRUE)==-1) file.remove(); } } } - PopulateView(); + populateView(); } void AdvancedFm::filePerms() { QStringList curFileList = getPath(); QString filePath; filePath = CurrentDir()->canonicalPath()+"/"; @@ -252,17 +252,17 @@ void AdvancedFm::filePerms() { filePermissions *filePerm; filePerm = new filePermissions(this, "Permissions",true,0,(const QString &)(filePath+*it)); filePerm->showMaximized(); filePerm->exec(); if( filePerm) delete filePerm; } - PopulateView(); + populateView(); } void AdvancedFm::doProperties() { #if defined(QT_QWS_OPIE) QStringList curFileList = getPath(); @@ -288,17 +288,17 @@ void AdvancedFm::upDir() QDir *thisDir = CurrentDir(); QString current = thisDir->canonicalPath(); QDir dir(current); dir.cdUp(); current = dir.canonicalPath(); chdir( current.latin1() ); thisDir->cd( current, TRUE); - PopulateView(); + populateView(); update(); } void AdvancedFm::copy() { qApp->processEvents(); QStringList curFileList = getPath(); @@ -355,19 +355,18 @@ void AdvancedFm::copy() if( !copyFile( curFile, destFile) ) { QMessageBox::message("AdvancedFm", tr( "Could not copy %1 to %2").arg( curFile ).arg( destFile ) ); return; } } - - PopulateView(); -// TabWidget->setCurrentTab(1); + setOtherTabCurrent(); + populateView(); } } void AdvancedFm::copyAs() { qApp->processEvents(); QStringList curFileList = getPath(); @@ -412,17 +411,18 @@ void AdvancedFm::copyAs() QMessageBox::message("AdvancedFm",tr("Could not copy\n") +curFile +tr("to\n")+destFile); return; } } delete fileDlg; } - PopulateView(); + setOtherTabCurrent(); + populateView(); } void AdvancedFm::copySameDir() { qApp->processEvents(); QStringList curFileList = getPath(); QString curFile, item, destFile; InputDialog *fileDlg; @@ -465,17 +465,17 @@ void AdvancedFm::copySameDir() +curFile +tr("to\n")+destFile); return; } qDebug("copy "+curFile+" as "+destFile); } delete fileDlg; } - PopulateView(); + populateView(); } void AdvancedFm::move() { qApp->processEvents(); QStringList curFileList = getPath(); if( curFileList.count() > 0) @@ -507,18 +507,19 @@ void AdvancedFm::move() QMessageBox::message(tr("Note"),tr("Could not move\n")+curFile); return; } else QFile::remove(curFile); } } } - populateRemoteView(); - populateLocalView(); + setOtherTabCurrent(); + populateView(); +// populateLocalView(); } bool AdvancedFm::copyFile( const QString & src, const QString & dest ) { char bf[ 50000 ]; int bytesRead; bool success = TRUE; struct stat status; @@ -638,73 +639,52 @@ void AdvancedFm::del() } void AdvancedFm::mkSym() { QString cmd; QStringList curFileList = getPath(); if( curFileList.count() > 0) { - if ( whichTab == 1) - { - for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) - { + QDir *thisDir = CurrentDir(); + QDir * thatDir = OtherDir(); - QString destName = currentRemoteDir.canonicalPath()+"/"+(*it); - if(destName.right(1) == "/") - { - destName = destName.left( destName.length() -1); - } - QString curFile = currentDir.canonicalPath()+"/"+(*it); - if( curFile.right(1) == "/") - { - curFile = curFile.left( curFile.length() -1); - } - cmd = "ln -s "+curFile+" "+destName; - qDebug(cmd); - startProcess( (const QString)cmd ); - } - populateRemoteView(); - TabWidget->setCurrentTab(1); - } - else - { for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { - QString destName = currentDir.canonicalPath()+"/"+(*it); + QString destName = thatDir->canonicalPath()+"/"+(*it); if(destName.right(1) == "/") { destName = destName.left( destName.length() -1); } - QString curFile = currentRemoteDir.canonicalPath()+"/"+(*it); + + QString curFile = thisDir->canonicalPath()+"/"+(*it); + if( curFile.right(1) == "/") { curFile = curFile.left( curFile.length() -1); } cmd = "ln -s "+curFile+" "+destName; qDebug(cmd); startProcess( (const QString)cmd ); } - populateLocalView(); - TabWidget->setCurrentTab(0); - } + setOtherTabCurrent(); + populateView(); } } void AdvancedFm::doBeam() { Ir ir; if(!ir.supported()) { } else { - QStringList curFileList = getPath(); if( curFileList.count() > 0) { for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { QString curFile = CurrentDir()->canonicalPath()+"/"+(*it); if( curFile.right(1) == "/") @@ -750,18 +730,18 @@ void AdvancedFm::startProcess(const QString & cmd) command << cmd.latin1(); *process << command; if(!process->start(OProcess::NotifyOnExit) ) qDebug("could not start process"); } void AdvancedFm::processEnded() { - populateLocalView(); - populateRemoteView(); +// populateLocalView(); + populateView(); } bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) { if ( o->inherits( "QLineEdit" ) ) { if ( e->type() == QEvent::KeyPress ) { @@ -838,17 +818,17 @@ void AdvancedFm::doRename(QListView * view) } void AdvancedFm::renameIt() { QListView *thisView = CurrentView(); oldName = thisView->currentItem()->text(0); doRename( thisView ); - PopulateView(); + populateView(); } void AdvancedFm::okRename() { QString newName = renameBox->text(); cancelRename(); // int tabs=0; QListView * view = CurrentView(); @@ -860,10 +840,10 @@ void AdvancedFm::okRename() return; if( rename( oldName.latin1(), newName.latin1())== -1) QMessageBox::message(tr("Note"),tr("Could not rename")); else oldName = ""; view->takeItem( view->currentItem() ); delete view->currentItem(); - PopulateView(); + populateView(); } |