author | llornkcor <llornkcor> | 2002-07-21 13:08:16 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-07-21 13:08:16 (UTC) |
commit | 68e2730e7e5a72bbdb5086334485d98ac8dee5c8 (patch) (side-by-side diff) | |
tree | bd1192a9174ff4ee3e8cd349a91eb9ae499d4adc /noncore/apps/advancedfm/advancedfm.cpp | |
parent | 81110ef9240a746a1267ac26fee3cb3e878933b1 (diff) | |
download | opie-68e2730e7e5a72bbdb5086334485d98ac8dee5c8.zip opie-68e2730e7e5a72bbdb5086334485d98ac8dee5c8.tar.gz opie-68e2730e7e5a72bbdb5086334485d98ac8dee5c8.tar.bz2 |
code cleanup
Diffstat (limited to 'noncore/apps/advancedfm/advancedfm.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index d0ccc3f..96a2d0a 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp @@ -77,3 +77,2 @@ AdvancedFm::AdvancedFm( ) setCaption( tr( "AdvancedFm" ) ); -// menuTimer( this ); @@ -86,3 +85,2 @@ AdvancedFm::AdvancedFm( ) QPEMenuBar *menuBar = new QPEMenuBar(this); -// fileMenu = new QPopupMenu( this ); fileMenu = new QPopupMenu( this ); @@ -97,6 +95,4 @@ AdvancedFm::AdvancedFm( ) qpeDirButton->setPixmap( Resource::loadPixmap("launcher/opielogo16x16"));//,"",this,"QPEButton"); -// qpeDirButton= new QPushButton(Resource::loadIconSet("launcher/opielogo16x16"),"",this,"QPEButton"); qpeDirButton ->setFixedSize( QSize( 20, 20 ) ); connect( qpeDirButton ,SIGNAL(released()),this,SLOT( QPEButtonPushed()) ); - //qpeDirButton->setFlat(TRUE); layout->addMultiCellWidget( qpeDirButton , 0, 0, 2, 2); @@ -105,6 +101,4 @@ AdvancedFm::AdvancedFm( ) cfButton->setPixmap(Resource::loadPixmap("cardmon/pcmcia")); -// cfButton = new QPushButton(Resource::loadIconSet("cardmon/pcmcia"),"",this,"CFButton"); cfButton ->setFixedSize( QSize( 20, 20 ) ); connect( cfButton ,SIGNAL(released()),this,SLOT( CFButtonPushed()) ); - //cfButton->setFlat(TRUE); layout->addMultiCellWidget( cfButton , 0, 0, 3, 3); @@ -113,6 +107,4 @@ AdvancedFm::AdvancedFm( ) sdButton->setPixmap(Resource::loadPixmap("sdmon/sdcard")); -// sdButton = new QPushButton(Resource::loadIconSet("sdmon/sdcard"),"",this,"SDButton"); sdButton->setFixedSize( QSize( 20, 20 ) ); connect( sdButton ,SIGNAL(released()),this,SLOT( SDButtonPushed()) ); -// sdButton->setFlat(TRUE); layout->addMultiCellWidget( sdButton , 0, 0, 4, 4); @@ -121,6 +113,4 @@ AdvancedFm::AdvancedFm( ) cdUpButton->setPixmap(Resource::loadPixmap("up")); -// cdUpButton = new QPushButton(Resource::loadIconSet("up"),"",this,"cdUpButton"); cdUpButton ->setFixedSize( QSize( 20, 20 ) ); connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); - //cdUpButton ->setFlat(TRUE); layout->addMultiCellWidget( cdUpButton , 0, 0, 5, 5); @@ -129,6 +119,4 @@ AdvancedFm::AdvancedFm( ) docButton->setPixmap(Resource::loadPixmap("DocsIcon")); -// docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton"); docButton->setFixedSize( QSize( 20, 20 ) ); connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); -// docButton->setFlat(TRUE); layout->addMultiCellWidget( docButton, 0, 0, 6, 6); @@ -137,10 +125,5 @@ AdvancedFm::AdvancedFm( ) homeButton->setPixmap(Resource::loadPixmap("home")); -// homeButton = new QPushButton( Resource::loadIconSet("home"),"",this,"homeButton"); homeButton->setFixedSize( QSize( 20, 20 ) ); connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); -// homeButton->setFlat(TRUE); layout->addMultiCellWidget( homeButton, 0, 0, 7, 7); -// fileMenu->insertItem( tr( "New" ), this, SLOT( newConnection() )); -// fileMenu->insertItem( tr( "Connect" ), this, SLOT( connector() )); -// fileMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() )); @@ -189,3 +172,2 @@ AdvancedFm::AdvancedFm( ) Local_View = new QListView( tab, "Local_View" ); -// Local_View->setResizePolicy( QListView::AutoOneFit ); Local_View->addColumn( tr("File"),130); @@ -201,4 +183,2 @@ AdvancedFm::AdvancedFm( ) - - tabLayout->addWidget( Local_View, 0, 0 ); @@ -236,3 +216,2 @@ AdvancedFm::AdvancedFm( ) this,SLOT( remoteListPressed(int, QListViewItem *, const QPoint&, int)) ); -// connect( Remote_View, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) ); @@ -269,5 +248,2 @@ QListView *fileTree; -//////////////////// - - currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); @@ -329,5 +305,2 @@ void AdvancedFm::populateLocalView() QString fileL, fileS, fileDate; -// qDebug(currentDir.canonicalPath()); -// struct stat buf; -// mode_t mode; QString fs= getFileSystemType((const QString &) currentDir.canonicalPath()); @@ -341,3 +314,2 @@ void AdvancedFm::populateLocalView() QString symLink=fi->readLink(); -// qDebug("Symlink detected "+symLink); QFileInfo sym( symLink); @@ -353,3 +325,2 @@ void AdvancedFm::populateLocalView() isDir=TRUE; -// qDebug( fileL); } @@ -366,3 +337,2 @@ void AdvancedFm::populateLocalView() pm= Resource::loadPixmap( "folder" ); -// item->setPixmap( 0,pm ); } else if ( fs == "vfat" && fileInfo.filePath().contains("/bin") ) { @@ -373,9 +343,4 @@ void AdvancedFm::populateLocalView() pm = Resource::loadPixmap( "exec"); -// else { //is exec -// pm = Resource::loadPixmap( "exec"); -// } -// // item->setPixmap( 0,pm); } else if( !fi->isReadable() ) { pm = Resource::loadPixmap( "locked" ); -// item->setPixmap( 0,pm); } else { //everything else goes by mimetype @@ -385,3 +350,2 @@ void AdvancedFm::populateLocalView() pm = Resource::loadPixmap( "UnknownDocument-14" ); -// item->setPixmap( 0,pm); } @@ -404,9 +368,5 @@ void AdvancedFm::populateLocalView() struct stat buf; -// struct stat st; dev_t devT; -// mode_t mode; DIR *dir; -// int fd = 0; struct dirent *mydirent; -// int i = 1; if((dir = opendir( currentDir.canonicalPath().latin1())) != NULL) @@ -415,8 +375,5 @@ void AdvancedFm::populateLocalView() qDebug(mydirent->d_name); -// mode = buf.st_mode; fileL.sprintf("%s", mydirent->d_name); -// fileS.sprintf("%d, %d", ); //this isn't correct devT = buf.st_dev; fileS.sprintf("%d, %d", (int) ( devT >>8) &0xFF, (int)devT &0xFF); -// fileS.sprintf("%d,%d", devT, devT); fileDate.sprintf("%s", ctime( &buf.st_mtime)); @@ -439,11 +396,2 @@ void AdvancedFm::populateRemoteView() { -// QList<QListViewItem> * getSelectedItems( QListView * Local_View ); -// QListViewItemIterator it( Remote_View ); -// for ( ; it.current(); ++it ) { -// if ( it.current()->isSelected() ) { -// QString strItem = it.current()->text(0); -// QString localFile = currentRemoteDir.canonicalPath()+"/"+strItem; -// QFileInfo fi(localFile); -// } -// } QPixmap pm; @@ -490,3 +438,2 @@ void AdvancedFm::populateRemoteView() pm= Resource::loadPixmap( "folder" ); -// item->setPixmap( 0,pm ); } else if ( fs == "vfat" && fileInfo.filePath().contains("/bin") ) { @@ -497,6 +444,4 @@ void AdvancedFm::populateRemoteView() pm = Resource::loadPixmap( "exec"); -// item->setPixmap( 0,pm); } else if( !fi->isReadable() ) { pm = Resource::loadPixmap( "locked" ); -// item->setPixmap( 0,pm); } else { @@ -506,3 +451,2 @@ void AdvancedFm::populateRemoteView() pm = Resource::loadPixmap( "UnknownDocument-14" ); -// item->setPixmap( 0,pm); } @@ -515,3 +459,2 @@ void AdvancedFm::populateRemoteView() pm.setMask( pm.createHeuristicMask( FALSE ) ); -// item->setPixmap( 0, pm); } @@ -525,8 +468,4 @@ void AdvancedFm::populateRemoteView() struct stat buf; -// struct stat st; -// mode_t mode; DIR *dir; -// int fd = 0; struct dirent *mydirent; -// int i = 1; if((dir = opendir( currentRemoteDir.canonicalPath().latin1())) != NULL) @@ -535,5 +474,3 @@ void AdvancedFm::populateRemoteView() qDebug(mydirent->d_name); -// mode = buf.st_mode; fileL.sprintf("%s", mydirent->d_name); -// fileS.sprintf("%d, %d", ); //this isn't correct fileS.sprintf("%d,%d", (int) (buf.st_dev>>8)&0xFF, (int) buf.st_dev &0xFF); @@ -651,4 +588,2 @@ void AdvancedFm::showHidden() fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); -// localMenu->setItemChecked(localMenu->idAt(0),TRUE); -// currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); b=FALSE; @@ -658,4 +593,2 @@ void AdvancedFm::showHidden() fileMenu->setItemChecked( fileMenu->idAt(0),FALSE); -// localMenu->setItemChecked(localMenu->idAt(0),FALSE); -// currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); b=TRUE; @@ -670,4 +603,2 @@ void AdvancedFm::showRemoteHidden() currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); -// viewMenu->setItemChecked(localMenu->idAt(0),TRUE); -// currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); b=TRUE; @@ -676,4 +607,2 @@ void AdvancedFm::showRemoteHidden() currentRemoteDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); -// localMenu->setItemChecked(localMenu->idAt(0),FALSE); -// currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); b=FALSE; @@ -710,3 +639,2 @@ void AdvancedFm::remoteListPressed( int mouse, QListViewItem *item, const QPoint void AdvancedFm::runThis() { -// QFileInfo *fi; QString fs; @@ -723,3 +651,2 @@ void AdvancedFm::runThis() { | fs == "vfat" && fileInfo.filePath().contains("/bin") ) { -// if( fileInfo.isExecutable() | QCopEnvelope e("QPE/System", "execute(QString)" ); @@ -737,3 +664,2 @@ void AdvancedFm::runThis() { } -// MimeType mt( curFile); } else { @@ -762,3 +688,2 @@ void AdvancedFm::runThis() { } -// MimeType mt( curFile); } @@ -1060,3 +985,2 @@ void AdvancedFm::doProperties() { LnkProperties prop( &lnk ); -// connect(&prop, SIGNAL(select(const AppLnk *)), this, SLOT(externalSelected(const AppLnk *))); prop.showMaximized(); @@ -1177,11 +1101,3 @@ void AdvancedFm::copy() QString destFile = currentRemoteDir.canonicalPath()+"/"+(*it); -// if(destFile.right(1).find("/",0,TRUE) == -1) -// destFile+="/"; -// destFile +=(*it); - curFile = currentDir.canonicalPath()+"/"+(*it); -// if(curFile.right(1).find("/",0,TRUE) == -1) -// curFile +="/"; -// curFile +=(*it); - QFile f(destFile); @@ -1250,4 +1166,2 @@ void AdvancedFm::copyAs() curFile = currentDir.canonicalPath()+"/"+(*it); -// InputDialog *fileDlg; -// fileDlg = new InputDialog(this,tr("Copy As"),TRUE, 0); fileDlg->setInputText((const QString &) destFile ); @@ -1330,4 +1244,2 @@ void AdvancedFm::copySameDir() { fileDlg = new InputDialog(this,tr("Copy ")+curFile+tr(" As"),TRUE, 0); -// InputDialog *fileDlg; -// fileDlg = new InputDialog(this,tr("Copy As"),TRUE, 0); fileDlg->setInputText((const QString &) destFile ); @@ -1533,3 +1445,2 @@ void AdvancedFm::runCommand() { -// int err=0; Output *outDlg; @@ -1542,3 +1453,2 @@ void AdvancedFm::runCommand() { sleep(1); -// if(command.find("2>",0,TRUE) != -1) command +=" 2>&1"; @@ -1591,3 +1501,2 @@ void AdvancedFm::fileStatus() { QString command = " stat -l "+ curFile +" 2>&1"; -// int err=0; Output *outDlg; @@ -1766,3 +1675,2 @@ void AdvancedFm::parsetab(const QString &fileName) { struct mntent *me; -// if(fileName == "/etc/mtab") { FILE *mntfp = setmntent( fileName.latin1(), "r" ); @@ -1779,4 +1687,2 @@ void AdvancedFm::parsetab(const QString &fileName) { fsList << filesystemType; -// deviceList << deviceName; -// qDebug(mountDir+"::"+filesystemType); fileSystemTypeList << mountDir+"::"+filesystemType; @@ -1847,13 +1753,2 @@ void AdvancedFm::fileBeamFinished( Ir *ir) { - -// QList<QListViewItem> * getSelectedItems( QListView * Local_View ); -// QListViewItemIterator it( Local_View ); -// for ( ; it.current(); ++it ) { -// if ( it.current()->isSelected() ) { -// QString strItem = it.current()->text(0); -// QString localFile = currentDir.canonicalPath()+"/"+strItem; -// QFileInfo fi(localFile); -// } -// } - void AdvancedFm::showFileMenu() { @@ -1873,3 +1768,2 @@ void AdvancedFm::showFileMenu() { - // QPopupMenu m; QPopupMenu *m = new QPopupMenu(0); |