author | llornkcor <llornkcor> | 2002-09-02 13:46:42 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-09-02 13:46:42 (UTC) |
commit | 4d7f2095e3119cac9319ab6b48492705188ce5cb (patch) (unidiff) | |
tree | 0b59cbeab8ebbdc421dabb3049895ccdb69baaca | |
parent | 4ee373ce314d6790c50861834d1c6d16f13b15f1 (diff) | |
download | opie-4d7f2095e3119cac9319ab6b48492705188ce5cb.zip opie-4d7f2095e3119cac9319ab6b48492705188ce5cb.tar.gz opie-4d7f2095e3119cac9319ab6b48492705188ce5cb.tar.bz2 |
added add To Documents in menus, and cleaned up compiler warnings
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 57 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 1 |
2 files changed, 45 insertions, 13 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 0f2555d..c054465 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -117,48 +117,49 @@ AdvancedFm::AdvancedFm( ) | |||
117 | cdUpButton ->setFixedSize( QSize( 20, 20 ) ); | 117 | cdUpButton ->setFixedSize( QSize( 20, 20 ) ); |
118 | connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); | 118 | connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); |
119 | layout->addMultiCellWidget( cdUpButton , 0, 0, 5, 5); | 119 | layout->addMultiCellWidget( cdUpButton , 0, 0, 5, 5); |
120 | 120 | ||
121 | docButton = new QToolButton( this,"docsButton"); | 121 | docButton = new QToolButton( this,"docsButton"); |
122 | docButton->setPixmap(Resource::loadPixmap("DocsIcon")); | 122 | docButton->setPixmap(Resource::loadPixmap("DocsIcon")); |
123 | docButton->setFixedSize( QSize( 20, 20 ) ); | 123 | docButton->setFixedSize( QSize( 20, 20 ) ); |
124 | connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); | 124 | connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); |
125 | layout->addMultiCellWidget( docButton, 0, 0, 6, 6); | 125 | layout->addMultiCellWidget( docButton, 0, 0, 6, 6); |
126 | 126 | ||
127 | homeButton = new QToolButton( this,"homeButton"); | 127 | homeButton = new QToolButton( this,"homeButton"); |
128 | homeButton->setPixmap(Resource::loadPixmap("home")); | 128 | homeButton->setPixmap(Resource::loadPixmap("home")); |
129 | homeButton->setFixedSize( QSize( 20, 20 ) ); | 129 | homeButton->setFixedSize( QSize( 20, 20 ) ); |
130 | connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); | 130 | connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); |
131 | layout->addMultiCellWidget( homeButton, 0, 0, 7, 7); | 131 | layout->addMultiCellWidget( homeButton, 0, 0, 7, 7); |
132 | 132 | ||
133 | fileMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); | 133 | fileMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); |
134 | fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); | 134 | fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); |
135 | fileMenu->insertSeparator(); | 135 | fileMenu->insertSeparator(); |
136 | fileMenu->insertItem( tr( "Make Directory" ), this, SLOT( mkDir() )); | 136 | fileMenu->insertItem( tr( "Make Directory" ), this, SLOT( mkDir() )); |
137 | fileMenu->insertItem( tr( "Rename" ), this, SLOT( rn() )); | 137 | fileMenu->insertItem( tr( "Rename" ), this, SLOT( rn() )); |
138 | fileMenu->insertItem( tr( "Run Command" ), this, SLOT( runCommandStd() )); | 138 | fileMenu->insertItem( tr( "Run Command" ), this, SLOT( runCommandStd() )); |
139 | fileMenu->insertItem( tr( "Run Command with Output" ), this, SLOT( runCommand() )); | 139 | fileMenu->insertItem( tr( "Run Command with Output" ), this, SLOT( runCommand() )); |
140 | fileMenu->insertSeparator(); | 140 | fileMenu->insertSeparator(); |
141 | fileMenu->insertItem( tr( "Add To Documents" ), this, SLOT( addToDocs() )); | ||
141 | fileMenu->insertItem( tr( "Delete" ), this, SLOT( del() )); | 142 | fileMenu->insertItem( tr( "Delete" ), this, SLOT( del() )); |
142 | fileMenu->setCheckable(TRUE); | 143 | fileMenu->setCheckable(TRUE); |
143 | 144 | ||
144 | viewMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); | 145 | viewMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); |
145 | viewMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); | 146 | viewMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); |
146 | viewMenu->insertSeparator(); | 147 | viewMenu->insertSeparator(); |
147 | viewMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); | 148 | viewMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); |
148 | viewMenu->setCheckable(TRUE); | 149 | viewMenu->setCheckable(TRUE); |
149 | 150 | ||
150 | 151 | ||
151 | currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); | 152 | currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); |
152 | currentPathCombo->setEditable(TRUE); | 153 | currentPathCombo->setEditable(TRUE); |
153 | layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 7); | 154 | layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 7); |
154 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); | 155 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); |
155 | 156 | ||
156 | connect( currentPathCombo, SIGNAL( activated( const QString & ) ), | 157 | connect( currentPathCombo, SIGNAL( activated( const QString & ) ), |
157 | this, SLOT( currentPathComboActivated( const QString & ) ) ); | 158 | this, SLOT( currentPathComboActivated( const QString & ) ) ); |
158 | 159 | ||
159 | connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), | 160 | connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), |
160 | this,SLOT(currentPathComboChanged())); | 161 | this,SLOT(currentPathComboChanged())); |
161 | 162 | ||
162 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); | 163 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); |
163 | 164 | ||
164 | layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 7); | 165 | layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 7); |
@@ -273,91 +274,91 @@ AdvancedFm::AdvancedFm( ) | |||
273 | 274 | ||
274 | connect( &menuTimer, SIGNAL( timeout() ), SLOT( showFileMenu() ) ); | 275 | connect( &menuTimer, SIGNAL( timeout() ), SLOT( showFileMenu() ) ); |
275 | 276 | ||
276 | populateLocalView(); | 277 | populateLocalView(); |
277 | populateRemoteView(); | 278 | populateRemoteView(); |
278 | currentPathCombo->setFocus(); | 279 | currentPathCombo->setFocus(); |
279 | } | 280 | } |
280 | 281 | ||
281 | AdvancedFm::~AdvancedFm() | 282 | AdvancedFm::~AdvancedFm() |
282 | { | 283 | { |
283 | } | 284 | } |
284 | 285 | ||
285 | void AdvancedFm::cleanUp() | 286 | void AdvancedFm::cleanUp() |
286 | { | 287 | { |
287 | QString sfile=QDir::homeDirPath(); | 288 | QString sfile=QDir::homeDirPath(); |
288 | if(sfile.right(1) != "/") | 289 | if(sfile.right(1) != "/") |
289 | sfile+="/._temp"; | 290 | sfile+="/._temp"; |
290 | else | 291 | else |
291 | sfile+="._temp"; | 292 | sfile+="._temp"; |
292 | QFile file( sfile); | 293 | QFile file( sfile); |
293 | if(file.exists()) | 294 | if(file.exists()) |
294 | file.remove(); | 295 | file.remove(); |
295 | } | 296 | } |
296 | 297 | ||
297 | void AdvancedFm::tabChanged(QWidget *w) | 298 | void AdvancedFm::tabChanged(QWidget *) |
298 | { | 299 | { |
299 | if (TabWidget->currentPageIndex() == 0) { | 300 | if (TabWidget->currentPageIndex() == 0) { |
300 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); | 301 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); |
301 | viewMenu->setItemChecked(viewMenu->idAt(0),TRUE); | 302 | viewMenu->setItemChecked(viewMenu->idAt(0),TRUE); |
302 | viewMenu->setItemChecked(viewMenu->idAt(1),FALSE); | 303 | viewMenu->setItemChecked(viewMenu->idAt(1),FALSE); |
303 | QString fs= getFileSystemType((const QString &) currentDir.canonicalPath()); | 304 | QString fs= getFileSystemType((const QString &) currentDir.canonicalPath()); |
304 | setCaption("AdvancedFm :: "+fs+" :: "+checkDiskSpace((const QString &) currentDir.canonicalPath())+" kB free" ); | 305 | setCaption("AdvancedFm :: "+fs+" :: "+checkDiskSpace((const QString &) currentDir.canonicalPath())+" kB free" ); |
305 | 306 | ||
306 | } | 307 | } |
307 | if (TabWidget->currentPageIndex() == 1) { | 308 | if (TabWidget->currentPageIndex() == 1) { |
308 | currentPathCombo->lineEdit()->setText( currentRemoteDir.canonicalPath()); | 309 | currentPathCombo->lineEdit()->setText( currentRemoteDir.canonicalPath()); |
309 | viewMenu->setItemChecked(viewMenu->idAt(1),TRUE); | 310 | viewMenu->setItemChecked(viewMenu->idAt(1),TRUE); |
310 | viewMenu->setItemChecked(viewMenu->idAt(0),FALSE); | 311 | viewMenu->setItemChecked(viewMenu->idAt(0),FALSE); |
311 | QString fs= getFileSystemType((const QString &) currentRemoteDir.canonicalPath()); | 312 | QString fs= getFileSystemType((const QString &) currentRemoteDir.canonicalPath()); |
312 | setCaption("AdvancedFm :: "+fs+" :: "+checkDiskSpace((const QString &) currentRemoteDir.canonicalPath())+" kB free" ); | 313 | setCaption("AdvancedFm :: "+fs+" :: "+checkDiskSpace((const QString &) currentRemoteDir.canonicalPath())+" kB free" ); |
313 | } | 314 | } |
314 | } | 315 | } |
315 | 316 | ||
316 | 317 | ||
317 | void AdvancedFm::populateLocalView() | 318 | void AdvancedFm::populateLocalView() |
318 | { | 319 | { |
319 | QPixmap pm; | 320 | QPixmap pm; |
320 | Local_View->clear(); | 321 | Local_View->clear(); |
321 | currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); | 322 | currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); |
322 | currentDir.setMatchAllDirs(TRUE); | 323 | currentDir.setMatchAllDirs(TRUE); |
323 | currentDir.setNameFilter(filterStr); | 324 | currentDir.setNameFilter(filterStr); |
324 | QString fileL, fileS, fileDate; | 325 | QString fileL, fileS, fileDate; |
325 | QString fs= getFileSystemType((const QString &) currentDir.canonicalPath()); | 326 | QString fs= getFileSystemType((const QString &) currentDir.canonicalPath()); |
326 | setCaption("AdvancedFm :: "+fs+" :: "+checkDiskSpace((const QString &) currentDir.canonicalPath())+" kB free" ); | 327 | setCaption("AdvancedFm :: "+fs+" :: "+checkDiskSpace((const QString &) currentDir.canonicalPath())+" kB free" ); |
327 | bool isDir=FALSE; | 328 | bool isDir=FALSE; |
328 | const QFileInfoList *list = currentDir.entryInfoList( /*QDir::All*/ /*, QDir::SortByMask*/); | 329 | const QFileInfoList *list = currentDir.entryInfoList( /*QDir::All*/ /*, QDir::SortByMask*/); |
329 | QFileInfoListIterator it(*list); | 330 | QFileInfoListIterator it(*list); |
330 | QFileInfo *fi; | 331 | QFileInfo *fi; |
331 | while ( (fi=it.current()) ) { | 332 | while ( (fi=it.current()) ) { |
332 | if (fi->isSymLink() ) { | 333 | if (fi->isSymLink() ) { |
333 | QString symLink=fi->readLink(); | 334 | QString symLink=fi->readLink(); |
334 | QFileInfo sym( symLink); | 335 | QFileInfo sym( symLink); |
335 | fileS.sprintf( "%10li", sym.size() ); | 336 | fileS.sprintf( "%10i", sym.size() ); |
336 | fileL.sprintf( "%s -> %s", fi->fileName().data(),sym.absFilePath().data() ); | 337 | fileL.sprintf( "%s -> %s", fi->fileName().data(),sym.absFilePath().data() ); |
337 | fileDate = sym.lastModified().toString(); | 338 | fileDate = sym.lastModified().toString(); |
338 | } else { | 339 | } else { |
339 | fileS.sprintf( "%10li", fi->size() ); | 340 | fileS.sprintf( "%10i", fi->size() ); |
340 | fileL.sprintf( "%s",fi->fileName().data() ); | 341 | fileL.sprintf( "%s",fi->fileName().data() ); |
341 | fileDate= fi->lastModified().toString(); | 342 | fileDate= fi->lastModified().toString(); |
342 | if( QDir(QDir::cleanDirPath( currentDir.canonicalPath()+"/"+fileL)).exists() ) { | 343 | if( QDir(QDir::cleanDirPath( currentDir.canonicalPath()+"/"+fileL)).exists() ) { |
343 | fileL+="/"; | 344 | fileL+="/"; |
344 | isDir=TRUE; | 345 | isDir=TRUE; |
345 | } | 346 | } |
346 | } | 347 | } |
347 | QFileInfo fileInfo( currentDir.canonicalPath()+"/"+fileL); | 348 | QFileInfo fileInfo( currentDir.canonicalPath()+"/"+fileL); |
348 | if(fileL !="./" && fi->exists()) { | 349 | if(fileL !="./" && fi->exists()) { |
349 | item= new QListViewItem( Local_View, fileL, fileS , fileDate); | 350 | item= new QListViewItem( Local_View, fileL, fileS , fileDate); |
350 | 351 | ||
351 | if(isDir || fileL.find("/",0,TRUE) != -1) { | 352 | if(isDir || fileL.find("/",0,TRUE) != -1) { |
352 | 353 | ||
353 | if( !QDir( fi->filePath() ).isReadable()) //is directory | 354 | if( !QDir( fi->filePath() ).isReadable()) //is directory |
354 | pm = Resource::loadPixmap( "lockedfolder" ); | 355 | pm = Resource::loadPixmap( "lockedfolder" ); |
355 | else | 356 | else |
356 | pm= Resource::loadPixmap( "folder" ); | 357 | pm= Resource::loadPixmap( "folder" ); |
357 | } else if ( fs == "vfat" && fileInfo.filePath().contains("/bin") ) { | 358 | } else if ( fs == "vfat" && fileInfo.filePath().contains("/bin") ) { |
358 | pm = Resource::loadPixmap( "exec"); | 359 | pm = Resource::loadPixmap( "exec"); |
359 | } else if( (fileInfo.permission( QFileInfo::ExeUser) | 360 | } else if( (fileInfo.permission( QFileInfo::ExeUser) |
360 | | fileInfo.permission( QFileInfo::ExeGroup) | 361 | | fileInfo.permission( QFileInfo::ExeGroup) |
361 | | fileInfo.permission( QFileInfo::ExeOther)) && fs != "vfat" ) { | 362 | | fileInfo.permission( QFileInfo::ExeOther)) && fs != "vfat" ) { |
362 | pm = Resource::loadPixmap( "exec"); | 363 | pm = Resource::loadPixmap( "exec"); |
363 | } else if( !fi->isReadable() ) { | 364 | } else if( !fi->isReadable() ) { |
@@ -410,54 +411,54 @@ void AdvancedFm::populateLocalView() | |||
410 | fillCombo( (const QString &) currentDir.canonicalPath()); | 411 | fillCombo( (const QString &) currentDir.canonicalPath()); |
411 | } | 412 | } |
412 | 413 | ||
413 | 414 | ||
414 | void AdvancedFm::populateRemoteView() | 415 | void AdvancedFm::populateRemoteView() |
415 | { | 416 | { |
416 | QPixmap pm; | 417 | QPixmap pm; |
417 | Remote_View->clear(); | 418 | Remote_View->clear(); |
418 | currentRemoteDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); | 419 | currentRemoteDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); |
419 | currentRemoteDir.setMatchAllDirs(TRUE); | 420 | currentRemoteDir.setMatchAllDirs(TRUE); |
420 | currentRemoteDir.setNameFilter(filterStr); | 421 | currentRemoteDir.setNameFilter(filterStr); |
421 | QString fileL, fileS, fileDate; | 422 | QString fileL, fileS, fileDate; |
422 | 423 | ||
423 | QString fs= getFileSystemType((const QString &) currentRemoteDir.canonicalPath()); | 424 | QString fs= getFileSystemType((const QString &) currentRemoteDir.canonicalPath()); |
424 | setCaption("AdvancedFm :: "+fs+" :: "+checkDiskSpace((const QString &) currentRemoteDir.canonicalPath())+" kB free" ); | 425 | setCaption("AdvancedFm :: "+fs+" :: "+checkDiskSpace((const QString &) currentRemoteDir.canonicalPath())+" kB free" ); |
425 | bool isDir=FALSE; | 426 | bool isDir=FALSE; |
426 | const QFileInfoList *list = currentRemoteDir.entryInfoList( /*QDir::All*/ /*, QDir::SortByMask*/); | 427 | const QFileInfoList *list = currentRemoteDir.entryInfoList( /*QDir::All*/ /*, QDir::SortByMask*/); |
427 | QFileInfoListIterator it(*list); | 428 | QFileInfoListIterator it(*list); |
428 | QFileInfo *fi; | 429 | QFileInfo *fi; |
429 | while ( (fi=it.current()) ) { | 430 | while ( (fi=it.current()) ) { |
430 | if (fi->isSymLink() ){ | 431 | if (fi->isSymLink() ){ |
431 | QString symLink=fi->readLink(); | 432 | QString symLink=fi->readLink(); |
432 | // qDebug("Symlink detected "+symLink); | 433 | // qDebug("Symlink detected "+symLink); |
433 | QFileInfo sym( symLink); | 434 | QFileInfo sym( symLink); |
434 | fileS.sprintf( "%10li", sym.size() ); | 435 | fileS.sprintf( "%10i", sym.size() ); |
435 | fileL.sprintf( "%s -> %s", fi->fileName().data(),sym.absFilePath().data() ); | 436 | fileL.sprintf( "%s -> %s", fi->fileName().data(),sym.absFilePath().data() ); |
436 | fileDate = sym.lastModified().toString(); | 437 | fileDate = sym.lastModified().toString(); |
437 | } else { | 438 | } else { |
438 | // qDebug("Not a dir: "+currentDir.canonicalPath()+fileL); | 439 | // qDebug("Not a dir: "+currentDir.canonicalPath()+fileL); |
439 | fileS.sprintf( "%10li", fi->size() ); | 440 | fileS.sprintf( "%10i", fi->size() ); |
440 | fileL.sprintf( "%s",fi->fileName().data() ); | 441 | fileL.sprintf( "%s",fi->fileName().data() ); |
441 | fileDate= fi->lastModified().toString(); | 442 | fileDate= fi->lastModified().toString(); |
442 | if( QDir(QDir::cleanDirPath( currentRemoteDir.canonicalPath()+"/"+fileL)).exists() ) { | 443 | if( QDir(QDir::cleanDirPath( currentRemoteDir.canonicalPath()+"/"+fileL)).exists() ) { |
443 | fileL+="/"; | 444 | fileL+="/"; |
444 | isDir=TRUE; | 445 | isDir=TRUE; |
445 | // qDebug( fileL); | 446 | // qDebug( fileL); |
446 | } | 447 | } |
447 | } | 448 | } |
448 | QFileInfo fileInfo( currentRemoteDir.canonicalPath()+"/"+fileL); | 449 | QFileInfo fileInfo( currentRemoteDir.canonicalPath()+"/"+fileL); |
449 | if(fileL !="./" && fi->exists()) { | 450 | if(fileL !="./" && fi->exists()) { |
450 | item= new QListViewItem( Remote_View, fileL, fileS, fileDate); | 451 | item= new QListViewItem( Remote_View, fileL, fileS, fileDate); |
451 | QPixmap pm; | 452 | QPixmap pm; |
452 | 453 | ||
453 | if(isDir || fileL.find("/",0,TRUE) != -1) { | 454 | if(isDir || fileL.find("/",0,TRUE) != -1) { |
454 | if( !QDir( fi->filePath() ).isReadable()) | 455 | if( !QDir( fi->filePath() ).isReadable()) |
455 | pm = Resource::loadPixmap( "lockedfolder" ); | 456 | pm = Resource::loadPixmap( "lockedfolder" ); |
456 | else | 457 | else |
457 | pm= Resource::loadPixmap( "folder" ); | 458 | pm= Resource::loadPixmap( "folder" ); |
458 | } else if ( fs == "vfat" && fileInfo.filePath().contains("/bin") ) { | 459 | } else if ( fs == "vfat" && fileInfo.filePath().contains("/bin") ) { |
459 | pm = Resource::loadPixmap( "exec"); | 460 | pm = Resource::loadPixmap( "exec"); |
460 | } else if( (fileInfo.permission( QFileInfo::ExeUser) | 461 | } else if( (fileInfo.permission( QFileInfo::ExeUser) |
461 | | fileInfo.permission( QFileInfo::ExeGroup) | 462 | | fileInfo.permission( QFileInfo::ExeGroup) |
462 | | fileInfo.permission( QFileInfo::ExeOther)) && fs != "vfat" ) { | 463 | | fileInfo.permission( QFileInfo::ExeOther)) && fs != "vfat" ) { |
463 | pm = Resource::loadPixmap( "exec"); | 464 | pm = Resource::loadPixmap( "exec"); |
@@ -608,62 +609,62 @@ void AdvancedFm::showHidden() | |||
608 | b=FALSE; | 609 | b=FALSE; |
609 | 610 | ||
610 | } else { | 611 | } else { |
611 | currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); | 612 | currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); |
612 | fileMenu->setItemChecked( fileMenu->idAt(0),FALSE); | 613 | fileMenu->setItemChecked( fileMenu->idAt(0),FALSE); |
613 | b=TRUE; | 614 | b=TRUE; |
614 | } | 615 | } |
615 | populateLocalView(); | 616 | populateLocalView(); |
616 | 617 | ||
617 | } | 618 | } |
618 | 619 | ||
619 | void AdvancedFm::showRemoteHidden() | 620 | void AdvancedFm::showRemoteHidden() |
620 | { | 621 | { |
621 | if (b) { | 622 | if (b) { |
622 | currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 623 | currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
623 | b=TRUE; | 624 | b=TRUE; |
624 | 625 | ||
625 | } else { | 626 | } else { |
626 | currentRemoteDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); | 627 | currentRemoteDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); |
627 | b=FALSE; | 628 | b=FALSE; |
628 | } | 629 | } |
629 | populateRemoteView(); | 630 | populateRemoteView(); |
630 | } | 631 | } |
631 | 632 | ||
632 | void AdvancedFm::localListPressed( int mouse, QListViewItem *item, const QPoint &point, int i) | 633 | void AdvancedFm::localListPressed( int mouse, QListViewItem *, const QPoint& , int ) |
633 | { | 634 | { |
634 | qDebug("list pressed"); | 635 | qDebug("list pressed"); |
635 | switch (mouse) { | 636 | switch (mouse) { |
636 | case 1: | 637 | case 1: |
637 | break; | 638 | break; |
638 | case 2: | 639 | case 2: |
639 | menuTimer.start( 750, TRUE ); | 640 | menuTimer.start( 750, TRUE ); |
640 | qDebug("Start menu timer\n"); | 641 | qDebug("Start menu timer\n"); |
641 | break; | 642 | break; |
642 | }; | 643 | }; |
643 | } | 644 | } |
644 | 645 | ||
645 | void AdvancedFm::remoteListPressed( int mouse, QListViewItem *item, const QPoint &point, int i) | 646 | void AdvancedFm::remoteListPressed( int mouse, QListViewItem*, const QPoint&, int ) |
646 | { | 647 | { |
647 | 648 | ||
648 | switch (mouse) { | 649 | switch (mouse) { |
649 | case 1: | 650 | case 1: |
650 | break; | 651 | break; |
651 | case 2: | 652 | case 2: |
652 | menuTimer.start( 750, TRUE ); | 653 | menuTimer.start( 750, TRUE ); |
653 | qDebug("Start menu timer"); | 654 | qDebug("Start menu timer"); |
654 | break; | 655 | break; |
655 | }; | 656 | }; |
656 | } | 657 | } |
657 | 658 | ||
658 | void AdvancedFm::runThis() { | 659 | void AdvancedFm::runThis() { |
659 | QString fs; | 660 | QString fs; |
660 | if (TabWidget->currentPageIndex() == 0) { | 661 | if (TabWidget->currentPageIndex() == 0) { |
661 | QString curFile = Local_View->currentItem()->text(0); | 662 | QString curFile = Local_View->currentItem()->text(0); |
662 | if(curFile != "../") { | 663 | if(curFile != "../") { |
663 | 664 | ||
664 | fs= getFileSystemType((const QString &) currentDir.canonicalPath()); | 665 | fs= getFileSystemType((const QString &) currentDir.canonicalPath()); |
665 | QFileInfo fileInfo( currentDir.canonicalPath()+"/"+curFile); | 666 | QFileInfo fileInfo( currentDir.canonicalPath()+"/"+curFile); |
666 | qDebug( fileInfo.owner()); | 667 | qDebug( fileInfo.owner()); |
667 | if( (fileInfo.permission( QFileInfo::ExeUser) | 668 | if( (fileInfo.permission( QFileInfo::ExeUser) |
668 | | fileInfo.permission( QFileInfo::ExeGroup) | 669 | | fileInfo.permission( QFileInfo::ExeGroup) |
669 | | fileInfo.permission( QFileInfo::ExeOther)) // & fs.find("vfat",0,TRUE) == -1) { | 670 | | fileInfo.permission( QFileInfo::ExeOther)) // & fs.find("vfat",0,TRUE) == -1) { |
@@ -1278,49 +1279,49 @@ void AdvancedFm::copySameDir() { | |||
1278 | InputDialog *fileDlg; | 1279 | InputDialog *fileDlg; |
1279 | 1280 | ||
1280 | if (TabWidget->currentPageIndex() == 0) { | 1281 | if (TabWidget->currentPageIndex() == 0) { |
1281 | 1282 | ||
1282 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { | 1283 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { |
1283 | 1284 | ||
1284 | QString destFile; | 1285 | QString destFile; |
1285 | curFile = currentDir.canonicalPath()+"/"+(*it); | 1286 | curFile = currentDir.canonicalPath()+"/"+(*it); |
1286 | 1287 | ||
1287 | fileDlg = new InputDialog(this,tr("Copy ")+curFile+tr(" As"),TRUE, 0); | 1288 | fileDlg = new InputDialog(this,tr("Copy ")+curFile+tr(" As"),TRUE, 0); |
1288 | fileDlg->setInputText((const QString &) destFile ); | 1289 | fileDlg->setInputText((const QString &) destFile ); |
1289 | fileDlg->exec(); | 1290 | fileDlg->exec(); |
1290 | 1291 | ||
1291 | if( fileDlg->result() == 1 ) { | 1292 | if( fileDlg->result() == 1 ) { |
1292 | 1293 | ||
1293 | QString filename = fileDlg->LineEdit1->text(); | 1294 | QString filename = fileDlg->LineEdit1->text(); |
1294 | destFile = currentDir.canonicalPath()+"/"+filename; | 1295 | destFile = currentDir.canonicalPath()+"/"+filename; |
1295 | 1296 | ||
1296 | QFile f(destFile); | 1297 | QFile f(destFile); |
1297 | if( f.exists()) { | 1298 | if( f.exists()) { |
1298 | switch (QMessageBox::warning(this,tr("Delete"), | 1299 | switch (QMessageBox::warning(this,tr("Delete"), |
1299 | destFile+tr(" already exists\nDo you really want to delete it?"), | 1300 | destFile+tr(" already exists\nDo you really want to delete it?"), |
1300 | tr("Yes"),tr("No"),0,0,1) ) { | 1301 | tr("Yes"),tr("No"),0,0,1) ) { |
1301 | case 0: | 1302 | case 0: |
1302 | qDebug(""); | 1303 | |
1303 | f.remove(); | 1304 | f.remove(); |
1304 | break; | 1305 | break; |
1305 | case 1: | 1306 | case 1: |
1306 | return; | 1307 | return; |
1307 | break; | 1308 | break; |
1308 | }; | 1309 | }; |
1309 | } | 1310 | } |
1310 | if(!copyFile(destFile, curFile) ) { | 1311 | if(!copyFile(destFile, curFile) ) { |
1311 | QMessageBox::message("AdvancedFm",tr("Could not copy\n")+curFile +tr("to\n")+destFile); | 1312 | QMessageBox::message("AdvancedFm",tr("Could not copy\n")+curFile +tr("to\n")+destFile); |
1312 | qWarning("nothin doing"); | 1313 | qWarning("nothin doing"); |
1313 | } | 1314 | } |
1314 | 1315 | ||
1315 | qDebug("copy "+curFile+" as "+destFile); | 1316 | qDebug("copy "+curFile+" as "+destFile); |
1316 | } | 1317 | } |
1317 | delete fileDlg; | 1318 | delete fileDlg; |
1318 | } | 1319 | } |
1319 | populateLocalView(); | 1320 | populateLocalView(); |
1320 | 1321 | ||
1321 | } else { | 1322 | } else { |
1322 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { | 1323 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { |
1323 | 1324 | ||
1324 | curFile = currentRemoteDir.canonicalPath()+"/"+(*it); | 1325 | curFile = currentRemoteDir.canonicalPath()+"/"+(*it); |
1325 | 1326 | ||
1326 | fileDlg = new InputDialog(this,tr("Copy ")+curFile+tr(" As"),TRUE, 0); | 1327 | fileDlg = new InputDialog(this,tr("Copy ")+curFile+tr(" As"),TRUE, 0); |
@@ -1779,49 +1780,49 @@ void AdvancedFm::doBeam() { | |||
1779 | 1780 | ||
1780 | QString curFile = currentDir.canonicalPath()+"/"+(*it); | 1781 | QString curFile = currentDir.canonicalPath()+"/"+(*it); |
1781 | if( curFile.right(1) == "/") curFile = curFile.left( curFile.length() -1); | 1782 | if( curFile.right(1) == "/") curFile = curFile.left( curFile.length() -1); |
1782 | Ir *file = new Ir(this, "IR"); | 1783 | Ir *file = new Ir(this, "IR"); |
1783 | connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished( Ir * ))); | 1784 | connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished( Ir * ))); |
1784 | file->send( curFile, curFile ); | 1785 | file->send( curFile, curFile ); |
1785 | } | 1786 | } |
1786 | 1787 | ||
1787 | } else { | 1788 | } else { |
1788 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { | 1789 | for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { |
1789 | 1790 | ||
1790 | QString curFile = currentRemoteDir.canonicalPath()+"/"+(*it); | 1791 | QString curFile = currentRemoteDir.canonicalPath()+"/"+(*it); |
1791 | if( curFile.right(1) == "/") curFile = curFile.left( curFile.length() -1); | 1792 | if( curFile.right(1) == "/") curFile = curFile.left( curFile.length() -1); |
1792 | Ir *file = new Ir(this, "IR"); | 1793 | Ir *file = new Ir(this, "IR"); |
1793 | connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished( Ir * ))); | 1794 | connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished( Ir * ))); |
1794 | file->send( curFile, curFile ); | 1795 | file->send( curFile, curFile ); |
1795 | 1796 | ||
1796 | } | 1797 | } |
1797 | } | 1798 | } |
1798 | } | 1799 | } |
1799 | } | 1800 | } |
1800 | 1801 | ||
1801 | } | 1802 | } |
1802 | 1803 | ||
1803 | void AdvancedFm::fileBeamFinished( Ir *ir) { | 1804 | void AdvancedFm::fileBeamFinished( Ir *) { |
1804 | QMessageBox::message( tr("Advancedfm Beam out"), tr("Ir sent.") ,tr("Ok") ); | 1805 | QMessageBox::message( tr("Advancedfm Beam out"), tr("Ir sent.") ,tr("Ok") ); |
1805 | 1806 | ||
1806 | } | 1807 | } |
1807 | 1808 | ||
1808 | void AdvancedFm::showFileMenu() { | 1809 | void AdvancedFm::showFileMenu() { |
1809 | 1810 | ||
1810 | QString curApp; | 1811 | QString curApp; |
1811 | bool isLocalView = false; | 1812 | bool isLocalView = false; |
1812 | if (TabWidget->currentPageIndex() == 0) { | 1813 | if (TabWidget->currentPageIndex() == 0) { |
1813 | isLocalView = TRUE; | 1814 | isLocalView = TRUE; |
1814 | curApp = Local_View->currentItem()->text(0); | 1815 | curApp = Local_View->currentItem()->text(0); |
1815 | } else { | 1816 | } else { |
1816 | curApp = Remote_View->currentItem()->text(0); | 1817 | curApp = Remote_View->currentItem()->text(0); |
1817 | } | 1818 | } |
1818 | 1819 | ||
1819 | MimeType mt( curApp ); | 1820 | MimeType mt( curApp ); |
1820 | const AppLnk* app = mt.application(); | 1821 | const AppLnk* app = mt.application(); |
1821 | QFile fi(curApp); | 1822 | QFile fi(curApp); |
1822 | 1823 | ||
1823 | QPopupMenu *m = new QPopupMenu(0); | 1824 | QPopupMenu *m = new QPopupMenu(0); |
1824 | 1825 | ||
1825 | m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); | 1826 | m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); |
1826 | m->insertSeparator(); | 1827 | m->insertSeparator(); |
1827 | if ( QFileInfo(fi).isDir() ) { | 1828 | if ( QFileInfo(fi).isDir() ) { |
@@ -1835,83 +1836,113 @@ void AdvancedFm::showFileMenu() { | |||
1835 | 1836 | ||
1836 | m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) ); | 1837 | m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) ); |
1837 | } | 1838 | } |
1838 | m->insertSeparator(); | 1839 | m->insertSeparator(); |
1839 | 1840 | ||
1840 | 1841 | ||
1841 | if(isLocalView) | 1842 | if(isLocalView) |
1842 | m->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); | 1843 | m->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); |
1843 | else | 1844 | else |
1844 | m->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); | 1845 | m->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); |
1845 | 1846 | ||
1846 | m->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); | 1847 | m->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); |
1847 | m->insertSeparator(); | 1848 | m->insertSeparator(); |
1848 | 1849 | ||
1849 | if(isLocalView) | 1850 | if(isLocalView) |
1850 | m->insertItem( tr( "Rename" ), this, SLOT( localRename() )); | 1851 | m->insertItem( tr( "Rename" ), this, SLOT( localRename() )); |
1851 | else | 1852 | else |
1852 | m->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); | 1853 | m->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); |
1853 | 1854 | ||
1854 | m->insertItem( tr( "Copy" ), this, SLOT( copy() )); | 1855 | m->insertItem( tr( "Copy" ), this, SLOT( copy() )); |
1855 | m->insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); | 1856 | m->insertItem( tr( "Copy As" ), this, SLOT( copyAs() )); |
1856 | m->insertItem( tr( "Copy Same Dir" ), this, SLOT( copySameDir() )); | 1857 | m->insertItem( tr( "Copy Same Dir" ), this, SLOT( copySameDir() )); |
1857 | m->insertItem( tr( "Move" ), this, SLOT( move() )); | 1858 | m->insertItem( tr( "Move" ), this, SLOT( move() )); |
1858 | m->insertSeparator(); | 1859 | m->insertSeparator(); |
1860 | m->insertItem( tr( "Add To Documents" ), this, SLOT( addToDocs() )); | ||
1859 | 1861 | ||
1860 | if(isLocalView) | 1862 | // if(isLocalView) |
1861 | m->insertItem( tr( "Rescan" ), this, SLOT( populateLocalView() )); | 1863 | // m->insertItem( tr( "Rescan" ), this, SLOT( populateLocalView() )); |
1862 | else | 1864 | // else |
1863 | m->insertItem( tr( "Rescan" ), this, SLOT( populateRemoteView() )); | 1865 | // m->insertItem( tr( "Rescan" ), this, SLOT( populateRemoteView() )); |
1864 | 1866 | ||
1865 | m->insertItem( tr( "Run Command" ), this, SLOT( runCommand() )); | 1867 | m->insertItem( tr( "Run Command" ), this, SLOT( runCommand() )); |
1866 | m->insertItem( tr( "File Info" ), this, SLOT( fileStatus() )); | 1868 | m->insertItem( tr( "File Info" ), this, SLOT( fileStatus() )); |
1867 | m->insertSeparator(); | 1869 | m->insertSeparator(); |
1868 | 1870 | ||
1869 | if(isLocalView) | 1871 | if(isLocalView) |
1870 | m->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); | 1872 | m->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); |
1871 | else | 1873 | else |
1872 | m->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); | 1874 | m->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); |
1873 | 1875 | ||
1874 | m->insertSeparator(); | 1876 | m->insertSeparator(); |
1875 | m->insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() )); | 1877 | m->insertItem( tr( "Set Permissions" ), this, SLOT( filePerms() )); |
1876 | 1878 | ||
1877 | if( QFile(QPEApplication::qpeDir()+"lib/libopie.so").exists() ) //bad hack for Sharp zaurus failings | 1879 | if( QFile(QPEApplication::qpeDir()+"lib/libopie.so").exists() ) //bad hack for Sharp zaurus failings |
1878 | m->insertItem( tr( "Properties" ), this, SLOT( doProperties() )); | 1880 | m->insertItem( tr( "Properties" ), this, SLOT( doProperties() )); |
1879 | m->setCheckable(TRUE); | 1881 | m->setCheckable(TRUE); |
1880 | if (!b) | 1882 | if (!b) |
1881 | m->setItemChecked(m->idAt(0),TRUE); | 1883 | m->setItemChecked(m->idAt(0),TRUE); |
1882 | else | 1884 | else |
1883 | m->setItemChecked(m->idAt(0),FALSE); | 1885 | m->setItemChecked(m->idAt(0),FALSE); |
1886 | |||
1884 | if(Ir::supported()) | 1887 | if(Ir::supported()) |
1885 | m->insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); | 1888 | m->insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); |
1886 | m->setFocus(); | 1889 | m->setFocus(); |
1887 | m->exec( QCursor::pos() ); | 1890 | m->exec( QCursor::pos() ); |
1888 | sleep(1); | 1891 | sleep(1); |
1889 | if(m) delete m; | 1892 | if(m) delete m; |
1890 | } | 1893 | } |
1891 | 1894 | ||
1892 | 1895 | ||
1893 | void AdvancedFm::cancelMenuTimer() { | 1896 | void AdvancedFm::cancelMenuTimer() { |
1894 | 1897 | ||
1895 | qDebug("selectionChanged: cancel menu timer"); | 1898 | qDebug("selectionChanged: cancel menu timer"); |
1896 | if( menuTimer.isActive() ) | 1899 | if( menuTimer.isActive() ) |
1897 | menuTimer.stop(); | 1900 | menuTimer.stop(); |
1898 | } | 1901 | } |
1899 | 1902 | ||
1900 | QString AdvancedFm::checkDiskSpace(const QString &path) { | 1903 | QString AdvancedFm::checkDiskSpace(const QString &path) { |
1901 | struct statfs fss; | 1904 | struct statfs fss; |
1902 | if ( !statfs( path.latin1(), &fss ) ) { | 1905 | if ( !statfs( path.latin1(), &fss ) ) { |
1903 | int blkSize = fss.f_bsize; | 1906 | int blkSize = fss.f_bsize; |
1904 | // int totalBlks = fs.f_blocks; | 1907 | // int totalBlks = fs.f_blocks; |
1905 | int availBlks = fss.f_bavail; | 1908 | int availBlks = fss.f_bavail; |
1906 | 1909 | ||
1907 | long mult = blkSize / 1024; | 1910 | long mult = blkSize / 1024; |
1908 | long div = 1024 / blkSize; | 1911 | long div = 1024 / blkSize; |
1909 | if ( !mult ) mult = 1; | 1912 | if ( !mult ) mult = 1; |
1910 | if ( !div ) div = 1; | 1913 | if ( !div ) div = 1; |
1911 | 1914 | ||
1912 | 1915 | ||
1913 | return QString::number(availBlks * mult / div); | 1916 | return QString::number(availBlks * mult / div); |
1914 | } | 1917 | } |
1915 | return ""; | 1918 | return ""; |
1916 | } | 1919 | } |
1917 | 1920 | ||
1921 | void AdvancedFm::addToDocs() { | ||
1922 | QStringList strListPaths = getPath(); | ||
1923 | if( strListPaths.count() > 0) { | ||
1924 | QString curFile; | ||
1925 | if (TabWidget->currentPageIndex() == 0) { | ||
1926 | for ( QStringList::Iterator it = strListPaths.begin(); it != strListPaths.end(); ++it ) { | ||
1927 | curFile = currentDir.canonicalPath()+"/"+(*it); | ||
1928 | qDebug(curFile); | ||
1929 | DocLnk f; | ||
1930 | // curFile.replace(QRegExp("\\..*"),""); | ||
1931 | f.setName((*it)); | ||
1932 | f.setFile( curFile); | ||
1933 | f.writeLink(); | ||
1934 | } | ||
1935 | } else { | ||
1936 | for ( QStringList::Iterator it = strListPaths.begin(); it != strListPaths.end(); ++it ) { | ||
1937 | curFile = currentRemoteDir.canonicalPath()+"/"+(*it); | ||
1938 | qDebug(curFile); | ||
1939 | |||
1940 | DocLnk f; | ||
1941 | // curFile.replace(QRegExp("\\..*"),""); | ||
1942 | f.setName((*it)); | ||
1943 | f.setFile( curFile); | ||
1944 | f.writeLink(); | ||
1945 | } | ||
1946 | } | ||
1947 | } | ||
1948 | } | ||
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h index 5b714ae..53dad50 100644 --- a/noncore/apps/advancedfm/advancedfm.h +++ b/noncore/apps/advancedfm/advancedfm.h | |||
@@ -46,48 +46,49 @@ class Ir; | |||
46 | 46 | ||
47 | class AdvancedFm : public QMainWindow | 47 | class AdvancedFm : public QMainWindow |
48 | { | 48 | { |
49 | Q_OBJECT | 49 | Q_OBJECT |
50 | public: | 50 | public: |
51 | AdvancedFm(); | 51 | AdvancedFm(); |
52 | ~AdvancedFm(); | 52 | ~AdvancedFm(); |
53 | 53 | ||
54 | QTabWidget *TabWidget; | 54 | QTabWidget *TabWidget; |
55 | QWidget *tab, *tab_2, *tab_3; | 55 | QWidget *tab, *tab_2, *tab_3; |
56 | QListView *Local_View, *Remote_View; | 56 | QListView *Local_View, *Remote_View; |
57 | 57 | ||
58 | QLineEdit *currentPathEdit; | 58 | QLineEdit *currentPathEdit; |
59 | QPopupMenu *fileMenu, *localMenu, *remoteMenu, *viewMenu; | 59 | QPopupMenu *fileMenu, *localMenu, *remoteMenu, *viewMenu; |
60 | QToolButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; | 60 | QToolButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; |
61 | // QPushButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; | 61 | // QPushButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; |
62 | QDir currentDir, currentRemoteDir; | 62 | QDir currentDir, currentRemoteDir; |
63 | QComboBox *currentPathCombo; | 63 | QComboBox *currentPathCombo; |
64 | QString filterStr; | 64 | QString filterStr; |
65 | QListViewItem * item; | 65 | QListViewItem * item; |
66 | bool b; | 66 | bool b; |
67 | QStringList fileSystemTypeList, fsList; | 67 | QStringList fileSystemTypeList, fsList; |
68 | int currentServerConfig; | 68 | int currentServerConfig; |
69 | protected slots: | 69 | protected slots: |
70 | void addToDocs(); | ||
70 | void doLocalCd(); | 71 | void doLocalCd(); |
71 | void doRemoteCd(); | 72 | void doRemoteCd(); |
72 | // void copy(); | 73 | // void copy(); |
73 | void mkDir(); | 74 | void mkDir(); |
74 | void del(); | 75 | void del(); |
75 | void rn(); | 76 | void rn(); |
76 | void populateLocalView(); | 77 | void populateLocalView(); |
77 | void populateRemoteView(); | 78 | void populateRemoteView(); |
78 | void showHidden(); | 79 | void showHidden(); |
79 | void showRemoteHidden(); | 80 | void showRemoteHidden(); |
80 | void writeConfig(); | 81 | void writeConfig(); |
81 | void readConfig(); | 82 | void readConfig(); |
82 | void localListClicked(QListViewItem *); | 83 | void localListClicked(QListViewItem *); |
83 | void remoteListClicked(QListViewItem *); | 84 | void remoteListClicked(QListViewItem *); |
84 | void localListPressed( int, QListViewItem *, const QPoint&, int); | 85 | void localListPressed( int, QListViewItem *, const QPoint&, int); |
85 | void remoteListPressed( int, QListViewItem *, const QPoint&, int); | 86 | void remoteListPressed( int, QListViewItem *, const QPoint&, int); |
86 | void localMakDir(); | 87 | void localMakDir(); |
87 | void localDelete(); | 88 | void localDelete(); |
88 | void remoteMakDir(); | 89 | void remoteMakDir(); |
89 | void remoteDelete(); | 90 | void remoteDelete(); |
90 | /* bool remoteDirList(const QString &); */ | 91 | /* bool remoteDirList(const QString &); */ |
91 | /* bool remoteChDir(const QString &); */ | 92 | /* bool remoteChDir(const QString &); */ |
92 | void tabChanged(QWidget*); | 93 | void tabChanged(QWidget*); |
93 | void cleanUp(); | 94 | void cleanUp(); |