summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp133
-rw-r--r--noncore/apps/advancedfm/advancedfm.h2
2 files changed, 47 insertions, 88 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index fec320d..73d0d57 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -1,114 +1,114 @@
1/*************************************************************************** 1/***************************************************************************
2 AdvancedFm.cpp 2 AdvancedFm.cpp
3 ------------------- 3 -------------------
4 ** Created: Sat Mar 9 23:33:09 2002 4 ** Created: Sat Mar 9 23:33:09 2002
5 copyright : (C) 2002 by ljp 5 copyright : (C) 2002 by ljp
6 email : ljp@llornkcor.com 6 email : ljp@llornkcor.com
7 * This program is free software; you can redistribute it and/or modify * 7 * This program is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by * 8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation; either version 2 of the License, or * 9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. * 10 * (at your option) any later version. *
11 ***************************************************************************/ 11 ***************************************************************************/
12#define DEVELOPERS_VERSION 12#define DEVELOPERS_VERSION
13#include "advancedfm.h" 13#include "advancedfm.h"
14 14
15#include <opie2/odebug.h> 15#include <opie2/odebug.h>
16#include <qpe/qpeapplication.h> 16#include <qpe/qpeapplication.h>
17#include <qpe/config.h> 17#include <qpe/config.h>
18#include <qpe/mimetype.h> 18#include <qpe/mimetype.h>
19#include <qpe/applnk.h> 19#include <qpe/applnk.h>
20#include <qpe/resource.h> 20#include <qpe/resource.h>
21#include <qpe/menubutton.h> 21#include <qpe/menubutton.h>
22 22
23#include <qcombobox.h> 23#include <qcombobox.h>
24#include <qpopupmenu.h> 24#include <qpopupmenu.h>
25#include <qlistview.h> 25#include <qlistview.h>
26#include <qmessagebox.h> 26#include <qmessagebox.h>
27#include <qlineedit.h> 27#include <qlineedit.h>
28 28
29 29
30#include <sys/stat.h> 30#include <sys/stat.h>
31#include <time.h> 31#include <time.h>
32#include <dirent.h> 32#include <dirent.h>
33#include <fcntl.h> 33#include <fcntl.h>
34#include <sys/vfs.h> 34#include <sys/vfs.h>
35#include <mntent.h> 35#include <mntent.h>
36 36
37using namespace Opie::Ui; 37using namespace Opie::Ui;
38 38
39AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags ) 39AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags )
40 : QMainWindow( ) { 40 : QMainWindow( ) {
41 init(); 41 init();
42 renameBox = 0; 42 renameBox = 0;
43 43
44 unknownXpm = Resource::loadImage("UnknownDocument").smoothScale(AppLnk::smallIconSize(),AppLnk::smallIconSize() ); 44 unknownXpm = Resource::loadImage("UnknownDocument").smoothScale(AppLnk::smallIconSize(),AppLnk::smallIconSize() );
45 45
46 initConnections(); 46 initConnections();
47 populateView(); 47 rePopulate();
48 channel = new QCopChannel( "QPE/Application/advancedfm", this ); 48 channel = new QCopChannel( "QPE/Application/advancedfm", this );
49 connect(channel,SIGNAL(received(const QCString&,const QByteArray&)),this,SLOT(qcopReceive(const QCString&,const QByteArray&))); 49 connect(channel,SIGNAL(received(const QCString&,const QByteArray&)),this,SLOT(qcopReceive(const QCString&,const QByteArray&)));
50 switchToLocalTab(); 50 switchToLocalTab();
51} 51}
52 52
53AdvancedFm::~AdvancedFm() { 53AdvancedFm::~AdvancedFm() {
54} 54}
55 55
56 56
57void AdvancedFm::cleanUp() { 57void AdvancedFm::cleanUp() {
58 QString sfile=QDir::homeDirPath(); 58 QString sfile=QDir::homeDirPath();
59 if(sfile.right(1) != "/") 59 if(sfile.right(1) != "/")
60 sfile+="/._temp"; 60 sfile+="/._temp";
61 else 61 else
62 sfile+="._temp"; 62 sfile+="._temp";
63 QFile file( sfile); 63 QFile file( sfile);
64 if(file.exists()) 64 if(file.exists())
65 file.remove(); 65 file.remove();
66} 66}
67 67
68void AdvancedFm::tabChanged(QWidget *wd) { 68void AdvancedFm::tabChanged(QWidget *wd) {
69 // qDebug("tabChanged"); 69 // qDebug("tabChanged");
70 if(wd == tab) { 70 if(wd == tab) {
71 whichTab = 1; 71 whichTab = 1;
72 // qDebug("tabchanged: LOCAL VIEW SHOWN"); 72 // qDebug("tabchanged: LOCAL VIEW SHOWN");
73 } 73 }
74 else if(wd == tab_2) { 74 else if(wd == tab_2) {
75 whichTab = 2; 75 whichTab = 2;
76 // qDebug("tabchanged: REMOTE VIEW SHOWN"); 76 // qDebug("tabchanged: REMOTE VIEW SHOWN");
77 } 77 }
78 qApp->processEvents(); 78 qApp->processEvents();
79 QString path = CurrentDir()->canonicalPath(); 79 QString path = CurrentDir()->canonicalPath();
80 // qDebug(path); 80 // qDebug(path);
81 if ( TabWidget->currentWidget() == tab) { 81 if ( TabWidget->currentWidget() == tab) {
82 viewMenu->setItemChecked(viewMenu->idAt(0), true); 82 viewMenu->setItemChecked(viewMenu->idAt(0), true);
83 viewMenu->setItemChecked(viewMenu->idAt(1), false); 83 viewMenu->setItemChecked(viewMenu->idAt(1), false);
84 } else { 84 } else {
85 viewMenu->setItemChecked(viewMenu->idAt(0), false); 85 viewMenu->setItemChecked(viewMenu->idAt(0), false);
86 viewMenu->setItemChecked(viewMenu->idAt(1), true); 86 viewMenu->setItemChecked(viewMenu->idAt(1), true);
87 } 87 }
88 88
89 QString fs= getFileSystemType( (const QString &) path); 89 QString fs= getFileSystemType( (const QString &) path);
90 90
91 setCaption(tr("AdvancedFm :: ")+fs+" :: " 91 setCaption(tr("AdvancedFm :: ")+fs+" :: "
92 +checkDiskSpace( (const QString &) path )+ tr(" kB free") ); 92 +checkDiskSpace( (const QString &) path )+ tr(" kB free") );
93 chdir( path.latin1()); 93 chdir( path.latin1());
94 currentPathCombo->lineEdit()->setText(path); 94 currentPathCombo->lineEdit()->setText(path);
95} 95}
96 96
97 97
98void AdvancedFm::populateView() { 98void AdvancedFm::populateView() {
99 99
100 QPixmap pm; 100 QPixmap pm;
101 QListView *thisView = CurrentView(); 101 QListView *thisView = CurrentView();
102 QDir *thisDir = CurrentDir(); 102 QDir *thisDir = CurrentDir();
103 QString path = thisDir->canonicalPath(); 103 QString path = thisDir->canonicalPath();
104 104
105 thisView->clear(); 105 thisView->clear();
106 thisDir->setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); 106 thisDir->setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst);
107 thisDir->setMatchAllDirs(TRUE); 107 thisDir->setMatchAllDirs(TRUE);
108 thisDir->setNameFilter(filterStr); 108 thisDir->setNameFilter(filterStr);
109 QString fileL, fileS, fileDate; 109 QString fileL, fileS, fileDate;
110 QString fs= getFileSystemType((const QString &) path); 110 QString fs= getFileSystemType((const QString &) path);
111 setCaption(tr("AdvancedFm :: ")+fs+" :: " 111 setCaption(tr("AdvancedFm :: ")+fs+" :: "
112 +checkDiskSpace((const QString &) path)+ tr(" kB free") ); 112 +checkDiskSpace((const QString &) path)+ tr(" kB free") );
113 bool isDir=FALSE; 113 bool isDir=FALSE;
114 const QFileInfoList *list = thisDir->entryInfoList( /*QDir::All*/ /*, QDir::SortByMask*/); 114 const QFileInfoList *list = thisDir->entryInfoList( /*QDir::All*/ /*, QDir::SortByMask*/);
@@ -313,213 +313,172 @@ void AdvancedFm::fillCombo(const QString &currentPath) {
313 } 313 }
314 } else { 314 } else {
315 currentPathCombo->lineEdit()->setText( currentPath); 315 currentPathCombo->lineEdit()->setText( currentPath);
316 if( remoteDirPathStringList.grep( currentPath,TRUE).isEmpty() ) { 316 if( remoteDirPathStringList.grep( currentPath,TRUE).isEmpty() ) {
317 currentPathCombo->clear(); 317 currentPathCombo->clear();
318 remoteDirPathStringList.prepend( currentPath ); 318 remoteDirPathStringList.prepend( currentPath );
319 currentPathCombo->insertStringList( remoteDirPathStringList,-1); 319 currentPathCombo->insertStringList( remoteDirPathStringList,-1);
320 } 320 }
321 } 321 }
322} 322}
323 323
324void AdvancedFm::currentPathComboActivated(const QString & currentPath) { 324void AdvancedFm::currentPathComboActivated(const QString & currentPath) {
325 chdir( currentPath.latin1() ); 325 chdir( currentPath.latin1() );
326 CurrentDir()->cd( currentPath, TRUE); 326 CurrentDir()->cd( currentPath, TRUE);
327 populateView(); 327 populateView();
328 update(); 328 update();
329} 329}
330 330
331QStringList AdvancedFm::getPath() { 331QStringList AdvancedFm::getPath() {
332 QStringList strList; 332 QStringList strList;
333 QListView *thisView=CurrentView(); 333 QListView *thisView=CurrentView();
334 QList<QListViewItem> * getSelectedItems( QListView * thisView ); 334 QList<QListViewItem> * getSelectedItems( QListView * thisView );
335 QListViewItemIterator it( thisView ); 335 QListViewItemIterator it( thisView );
336 for ( ; it.current(); ++it ) { 336 for ( ; it.current(); ++it ) {
337 if ( it.current()->isSelected() ) { 337 if ( it.current()->isSelected() ) {
338 strList << it.current()->text(0); 338 strList << it.current()->text(0);
339// odebug << it.current()->text(0) << oendl; 339// odebug << it.current()->text(0) << oendl;
340 } 340 }
341 } 341 }
342 return strList; 342 return strList;
343} 343}
344 344
345void AdvancedFm::changeTo(QString dir) { 345void AdvancedFm::changeTo(QString dir) {
346 chdir( dir.latin1()); 346 chdir( dir.latin1());
347 CurrentDir()->cd(dir, TRUE); 347 CurrentDir()->cd(dir, TRUE);
348 populateView(); 348 populateView();
349 update(); 349 update();
350} 350}
351 351
352void AdvancedFm::homeButtonPushed() { 352void AdvancedFm::homeButtonPushed() {
353 changeTo(QDir::homeDirPath()); 353 changeTo(QDir::homeDirPath());
354} 354}
355 355
356void AdvancedFm::docButtonPushed() { 356void AdvancedFm::docButtonPushed() {
357 changeTo(QPEApplication::documentDir()); 357 changeTo(QPEApplication::documentDir());
358} 358}
359 359
360void AdvancedFm::SDButtonPushed() { 360void AdvancedFm::SDButtonPushed() {
361 changeTo("/mnt/card");// this can change so fix 361 changeTo("/mnt/card");// this can change so fix
362} 362}
363 363
364void AdvancedFm::CFButtonPushed() { 364void AdvancedFm::CFButtonPushed() {
365 if(zaurusDevice) 365 if(zaurusDevice)
366 changeTo("/mnt/cf"); //zaurus 366 changeTo("/mnt/cf"); //zaurus
367 else 367 else
368 changeTo("/mnt/hda"); //ipaq 368 changeTo("/mnt/hda"); //ipaq
369} 369}
370 370
371 371
372void AdvancedFm::doAbout() { 372void AdvancedFm::doAbout() {
373 QMessageBox::message("AdvancedFm",tr("<P>Advanced FileManager is copyright 2002-2003 by L.J.Potter<llornkcor@handhelds.org> and is licensed by the GPL</P>")); 373 QMessageBox::message("AdvancedFm",tr("<P>Advanced FileManager is copyright 2002-2003 by L.J.Potter<llornkcor@handhelds.org> and is licensed by the GPL</P>"));
374} 374}
375 375
376void AdvancedFm::keyPressEvent( QKeyEvent *e) { 376void AdvancedFm::keyPressEvent( QKeyEvent *e) {
377// owarn << "key " << e->key() << "" << oendl; 377 if( e->key() == Key_Left )
378// if( CurrentView()->hasFocus() ) 378 upDir();
379 { 379 else if( e->key() == Key_Return || e->key() == Key_Enter)
380 switch ( e->key() ) { 380 navigateToSelected();
381 case Key_Left: 381 else if( e->key() == Key_Tab)
382 upDir(); 382 setOtherTabCurrent();
383 break; 383 else if( e->key() == Key_Delete )
384 case Key_Next: 384 del();
385 break; 385 else if( e->key() == Key_A)
386 case Key_Return: 386 copyAs();
387 case Key_Enter: 387 else if( e->key() == Key_C)
388 navigateToSelected(); 388 copy();
389 break; 389 else if( e->key() == Key_E)
390 case Key_Tab: { 390 runThis();
391 setOtherTabCurrent(); 391 else if( e->key() == Key_G)
392 } 392 currentPathCombo->lineEdit()->setFocus();
393 break; 393 else if( e->key() == Key_H )
394 case Key_Delete: 394 showHidden();
395 del(); 395 else if( e->key() == Key_I)
396 break; 396 fileStatus();
397 case Key_A: 397 else if( e->key() == Key_M)
398 copyAs(); 398 move();
399 break; 399 else if( e->key() == Key_N )
400 case Key_C: 400 mkDir();
401 copy(); 401 else if( e->key() == Key_P)
402 break; 402 filePerms();
403 case Key_E: 403 else if( e->key() == Key_R )
404 runThis(); 404 rn();
405 break; 405 else if( e->key() == Key_U )
406 case Key_G: 406 upDir();
407 { 407 else if( e->key() == Key_1)
408 currentPathCombo->lineEdit()->setFocus(); 408 switchToLocalTab();
409 } 409 else if( e->key() == Key_2)
410 break; 410 switchToRemoteTab();
411 411 else if( e->key() == Key_3)
412 case Key_H: 412 CFButtonPushed();
413 showHidden(); 413 else if( e->key() == Key_4)
414 break; 414 SDButtonPushed();
415 case Key_I: 415 else if( e->key() == Key_5 )
416 fileStatus(); 416 homeButtonPushed();
417 break; 417 else if( e->key() == Key_6 )
418 case Key_M: 418 docButtonPushed();
419 move(); 419 else
420 break; 420 e->accept();
421 case Key_N:
422 mkDir();
423 break;
424 case Key_P:
425 filePerms();
426 break;
427 case Key_R:
428 rn();
429 break;
430 case Key_U:
431 upDir();
432 break;
433 case Key_1:
434 switchToLocalTab();
435 break;
436 case Key_2:
437 switchToRemoteTab();
438 break;
439 case Key_3:
440 CFButtonPushed();
441 break;
442 case Key_4:
443 SDButtonPushed();
444 break;
445 case Key_5:
446 homeButtonPushed();
447 break;
448 case Key_6:
449 docButtonPushed();
450 break;
451 case Key_7:
452 break;
453 case Key_8:
454 break;
455 case Key_9:
456 break;
457 case Key_0:
458 break;
459 };
460 e->accept();
461 }
462} 421}
463 422
464void AdvancedFm::keyReleaseEvent( QKeyEvent *e) { 423void AdvancedFm::keyReleaseEvent( QKeyEvent *e) {
465 if( CurrentView()->hasFocus() ) 424 if( CurrentView()->hasFocus() )
466 e->ignore(); 425 e->ignore();
467} 426}
468 427
469 428
470void AdvancedFm::QPEButtonPushed() { 429void AdvancedFm::QPEButtonPushed() {
471 QString current = QPEApplication::qpeDir(); 430 QString current = QPEApplication::qpeDir();
472 chdir( current.latin1() ); 431 chdir( current.latin1() );
473 CurrentDir()->cd( current, TRUE); 432 CurrentDir()->cd( current, TRUE);
474 populateView(); 433 populateView();
475 update(); 434 update();
476} 435}
477 436
478void AdvancedFm::parsetab(const QString &fileName) { 437void AdvancedFm::parsetab(const QString &fileName) {
479 438
480 fileSystemTypeList.clear(); 439 fileSystemTypeList.clear();
481 fsList.clear(); 440 fsList.clear();
482 struct mntent *me; 441 struct mntent *me;
483 FILE *mntfp = setmntent( fileName.latin1(), "r" ); 442 FILE *mntfp = setmntent( fileName.latin1(), "r" );
484 if ( mntfp ) { 443 if ( mntfp ) {
485 while ( (me = getmntent( mntfp )) != 0 ) { 444 while ( (me = getmntent( mntfp )) != 0 ) {
486 QString deviceName = me->mnt_fsname; 445 QString deviceName = me->mnt_fsname;
487 QString filesystemType = me->mnt_type; 446 QString filesystemType = me->mnt_type;
488 QString mountDir = me->mnt_dir; 447 QString mountDir = me->mnt_dir;
489 if(deviceName != "none") { 448 if(deviceName != "none") {
490 if( fsList.contains(filesystemType) == 0 449 if( fsList.contains(filesystemType) == 0
491 & filesystemType.find("proc",0,TRUE) == -1 450 & filesystemType.find("proc",0,TRUE) == -1
492 & filesystemType.find("cramfs",0,TRUE) == -1 451 & filesystemType.find("cramfs",0,TRUE) == -1
493 & filesystemType.find("auto",0,TRUE) == -1) 452 & filesystemType.find("auto",0,TRUE) == -1)
494 fsList << filesystemType; 453 fsList << filesystemType;
495 fileSystemTypeList << mountDir+"::"+filesystemType; 454 fileSystemTypeList << mountDir+"::"+filesystemType;
496 } 455 }
497 } 456 }
498 } 457 }
499 endmntent( mntfp ); 458 endmntent( mntfp );
500} 459}
501 460
502QString AdvancedFm::getFileSystemType(const QString &currentText) { 461QString AdvancedFm::getFileSystemType(const QString &currentText) {
503 parsetab("/etc/mtab"); //why did TT forget filesystem type? 462 parsetab("/etc/mtab"); //why did TT forget filesystem type?
504 QString current = currentText;//.right( currentText.length()-1); 463 QString current = currentText;//.right( currentText.length()-1);
505 QString baseFs; 464 QString baseFs;
506 for ( QStringList::Iterator it = fileSystemTypeList.begin(); it != fileSystemTypeList.end(); ++it ) { 465 for ( QStringList::Iterator it = fileSystemTypeList.begin(); it != fileSystemTypeList.end(); ++it ) {
507 QString temp = (*it); 466 QString temp = (*it);
508 QString path = temp.left(temp.find("::",0,TRUE) ); 467 QString path = temp.left(temp.find("::",0,TRUE) );
509 path = path.right( path.length()-1); 468 path = path.right( path.length()-1);
510 if(path.isEmpty()) baseFs = temp.right( temp.length() - temp.find("::",0,TRUE) - 2); 469 if(path.isEmpty()) baseFs = temp.right( temp.length() - temp.find("::",0,TRUE) - 2);
511 if( current.find( path,0,TRUE) != -1 && !path.isEmpty()) { 470 if( current.find( path,0,TRUE) != -1 && !path.isEmpty()) {
512 return temp.right( temp.length() - temp.find("::",0,TRUE) - 2); 471 return temp.right( temp.length() - temp.find("::",0,TRUE) - 2);
513 } 472 }
514 } 473 }
515 return baseFs; 474 return baseFs;
516} 475}
517 476
518QString AdvancedFm::getDiskSpace( const QString &path) { 477QString AdvancedFm::getDiskSpace( const QString &path) {
519 struct statfs fss; 478 struct statfs fss;
520 if ( !statfs( path.latin1(), &fss ) ) { 479 if ( !statfs( path.latin1(), &fss ) ) {
521 int blkSize = fss.f_bsize; 480 int blkSize = fss.f_bsize;
522 // int totalBlks = fs.f_blocks; 481 // int totalBlks = fs.f_blocks;
523 int availBlks = fss.f_bavail; 482 int availBlks = fss.f_bavail;
524 483
525 long mult = blkSize / 1024; 484 long mult = blkSize / 1024;
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h
index c52b853..b109364 100644
--- a/noncore/apps/advancedfm/advancedfm.h
+++ b/noncore/apps/advancedfm/advancedfm.h
@@ -36,129 +36,129 @@ class QHBoxLayout;
36class QGridLayout; 36class QGridLayout;
37class QComboBox; 37class QComboBox;
38class QListView; 38class QListView;
39class QListviewItem; 39class QListviewItem;
40class QLabel; 40class QLabel;
41class QProgressBar; 41class QProgressBar;
42class QSpinBox; 42class QSpinBox;
43class QWidget; 43class QWidget;
44class QPopupMenu; 44class QPopupMenu;
45class QFile; 45class QFile;
46class QListViewItem; 46class QListViewItem;
47class QLineEdit; 47class QLineEdit;
48class MenuButton; 48class MenuButton;
49 49
50class QToolButton; 50class QToolButton;
51class Ir; 51class Ir;
52 52
53class AdvancedFm : public QMainWindow 53class AdvancedFm : public QMainWindow
54{ 54{
55 Q_OBJECT 55 Q_OBJECT
56public: 56public:
57 static QString appName() { return QString::fromLatin1("advancedfm"); } 57 static QString appName() { return QString::fromLatin1("advancedfm"); }
58 AdvancedFm(QWidget *p = 0, const char* name = 0, WFlags fl = 0); 58 AdvancedFm(QWidget *p = 0, const char* name = 0, WFlags fl = 0);
59 ~AdvancedFm(); 59 ~AdvancedFm();
60protected: 60protected:
61 61
62 Opie::Ui::OSplitter *TabWidget; 62 Opie::Ui::OSplitter *TabWidget;
63 QCopChannel * channel; 63 QCopChannel * channel;
64 QPixmap unknownXpm; 64 QPixmap unknownXpm;
65 int whichTab; 65 int whichTab;
66// QTabWidget *TabWidget; 66// QTabWidget *TabWidget;
67 QWidget *tab, *tab_2, *tab_3; 67 QWidget *tab, *tab_2, *tab_3;
68 QListView *Local_View, *Remote_View; 68 QListView *Local_View, *Remote_View;
69 69
70 QLineEdit *currentPathEdit; 70 QLineEdit *currentPathEdit;
71 QPopupMenu *fileMenu, *localMenu, *remoteMenu, *viewMenu /*, *customDirMenu*/; 71 QPopupMenu *fileMenu, *localMenu, *remoteMenu, *viewMenu /*, *customDirMenu*/;
72 QToolButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; 72 QToolButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton;
73// QPushButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; 73// QPushButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton;
74 QDir currentDir, currentRemoteDir; 74 QDir currentDir, currentRemoteDir;
75 QComboBox *currentPathCombo; 75 QComboBox *currentPathCombo;
76 QString filterStr, s_addBookmark, s_removeBookmark; 76 QString filterStr, s_addBookmark, s_removeBookmark;
77 QListViewItem * item; 77 QListViewItem * item;
78 bool b; 78 bool b;
79 QStringList fileSystemTypeList, fsList; 79 QStringList fileSystemTypeList, fsList;
80 int currentServerConfig; 80 int currentServerConfig;
81 bool zaurusDevice; 81 bool zaurusDevice;
82 QGridLayout *tabLayout, *tabLayout_2, *tabLayout_3; 82 QGridLayout *tabLayout, *tabLayout_2, *tabLayout_3;
83 QStringList remoteDirPathStringList, localDirPathStringList; 83 QStringList remoteDirPathStringList, localDirPathStringList;
84 QLineEdit *renameBox; 84 QLineEdit *renameBox;
85 85
86 void init(); 86 void init();
87 void initConnections(); 87 void initConnections();
88 void keyReleaseEvent( QKeyEvent *); 88 void keyReleaseEvent( QKeyEvent *);
89 void keyPressEvent( QKeyEvent *); 89 void keyPressEvent( QKeyEvent *);
90 QString getFileSystemType(const QString &); 90 QString getFileSystemType(const QString &);
91 QString getDiskSpace(const QString &); 91 QString getDiskSpace(const QString &);
92 void parsetab(const QString &fileName); 92 void parsetab(const QString &fileName);
93 QString checkDiskSpace(const QString &); 93 QString checkDiskSpace(const QString &);
94 QString dealWithSymName(const QString &); 94 QString dealWithSymName(const QString &);
95 QDir *CurrentDir(); 95 QDir *CurrentDir();
96 QDir *OtherDir(); 96 QDir *OtherDir();
97 QListView *CurrentView(); 97 QListView *CurrentView();
98 QListView *OtherView(); 98 QListView *OtherView();
99 void setOtherTabCurrent(); 99 void setOtherTabCurrent();
100 void changeTo(QString & dir); 100 void changeTo(QString dir);
101 101
102//protected signals: 102//protected signals:
103 // void newPath(QString); 103 // void newPath(QString);
104 104
105protected slots: 105protected slots:
106 void slotSwitchMenu(int); 106 void slotSwitchMenu(int);
107 void selectAll(); 107 void selectAll();
108 void addToDocs(); 108 void addToDocs();
109 void doDirChange(); 109 void doDirChange();
110 void mkDir(); 110 void mkDir();
111 void del(); 111 void del();
112 void rn(); 112 void rn();
113 void populateView(); 113 void populateView();
114 void rePopulate(); 114 void rePopulate();
115 void showHidden(); 115 void showHidden();
116 void showMenuHidden(); 116 void showMenuHidden();
117 void ListClicked(QListViewItem *); 117 void ListClicked(QListViewItem *);
118 void ListPressed( int, QListViewItem *, const QPoint&, int); 118 void ListPressed( int, QListViewItem *, const QPoint&, int);
119 void makeDir(); 119 void makeDir();
120 void doDelete(); 120 void doDelete();
121 void tabChanged(QWidget*); 121 void tabChanged(QWidget*);
122 void cleanUp(); 122 void cleanUp();
123 void renameIt(); 123 void renameIt();
124 void runThis(); 124 void runThis();
125 void runText(); 125 void runText();
126 void filePerms(); 126 void filePerms();
127 void doProperties(); 127 void doProperties();
128 void runCommand(); 128 void runCommand();
129 void runCommandStd(); 129 void runCommandStd();
130 QStringList getPath(); 130 QStringList getPath();
131 void mkSym(); 131 void mkSym();
132 void switchToLocalTab(); 132 void switchToLocalTab();
133 void switchToRemoteTab(); 133 void switchToRemoteTab();
134 void refreshCurrentTab(); 134 void refreshCurrentTab();
135 135
136 void openSearch(); 136 void openSearch();
137 void dirMenuSelected(int); 137 void dirMenuSelected(int);
138 void showFileMenu(); 138 void showFileMenu();
139 void homeButtonPushed(); 139 void homeButtonPushed();
140 void docButtonPushed(); 140 void docButtonPushed();
141 void SDButtonPushed(); 141 void SDButtonPushed();
142 void CFButtonPushed(); 142 void CFButtonPushed();
143 void QPEButtonPushed(); 143 void QPEButtonPushed();
144 void upDir(); 144 void upDir();
145 void currentPathComboChanged(); 145 void currentPathComboChanged();
146 146
147 void copy(); 147 void copy();
148 void copyTimer(); 148 void copyTimer();
149 void copyAs(); 149 void copyAs();
150 void copyAsTimer(); 150 void copyAsTimer();
151 void copySameDir(); 151 void copySameDir();
152 void copySameDirTimer(); 152 void copySameDirTimer();
153 void move(); 153 void move();
154 void moveTimer(); 154 void moveTimer();
155 155
156 void currentPathComboActivated(const QString &); 156 void currentPathComboActivated(const QString &);
157 void fillCombo(const QString &); 157 void fillCombo(const QString &);
158 bool copyFile( const QString & , const QString & ); 158 bool copyFile( const QString & , const QString & );
159 void fileStatus(); 159 void fileStatus();
160 void doAbout(); 160 void doAbout();
161 void doBeam(); 161 void doBeam();
162 void fileBeamFinished( Ir *); 162 void fileBeamFinished( Ir *);
163 bool copyDirectory( const QString & , const QString & ); 163 bool copyDirectory( const QString & , const QString & );
164// void navigateToSelected(); 164// void navigateToSelected();