summaryrefslogtreecommitdiff
path: root/noncore/apps/advancedfm
Unidiff
Diffstat (limited to 'noncore/apps/advancedfm') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index 0dc822d..9aa0c77 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -51,63 +51,63 @@ AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags )
51 channel = new QCopChannel( "QPE/Application/advancedfm", this ); 51 channel = new QCopChannel( "QPE/Application/advancedfm", this );
52 connect(channel,SIGNAL(received(const QCString&,const QByteArray&)),this,SLOT(qcopReceive(const QCString&,const QByteArray&))); 52 connect(channel,SIGNAL(received(const QCString&,const QByteArray&)),this,SLOT(qcopReceive(const QCString&,const QByteArray&)));
53 switchToLocalTab(); 53 switchToLocalTab();
54} 54}
55 55
56AdvancedFm::~AdvancedFm() { 56AdvancedFm::~AdvancedFm() {
57} 57}
58 58
59 59
60void AdvancedFm::cleanUp() { 60void AdvancedFm::cleanUp() {
61 QString sfile=QDir::homeDirPath(); 61 QString sfile=QDir::homeDirPath();
62 if(sfile.right(1) != "/") 62 if(sfile.right(1) != "/")
63 sfile+="/._temp"; 63 sfile+="/._temp";
64 else 64 else
65 sfile+="._temp"; 65 sfile+="._temp";
66 QFile file( sfile); 66 QFile file( sfile);
67 if(file.exists()) 67 if(file.exists())
68 file.remove(); 68 file.remove();
69} 69}
70 70
71void AdvancedFm::tabChanged(QWidget *wd) { 71void AdvancedFm::tabChanged(QWidget *wd) {
72 // qDebug("tabChanged"); 72 // qDebug("tabChanged");
73 if(wd == tab) { 73 if(wd == tab) {
74 whichTab = 1; 74 whichTab = 1;
75 viewMenu->setItemChecked(viewMenu->idAt(0), true);
76 viewMenu->setItemChecked(viewMenu->idAt(1), false);
75 // qDebug("tabchanged: LOCAL VIEW SHOWN"); 77 // qDebug("tabchanged: LOCAL VIEW SHOWN");
76 } 78 }
77 else if(wd == tab_2) { 79 else if(wd == tab_2) {
78 whichTab = 2; 80 whichTab = 2;
81 viewMenu->setItemChecked(viewMenu->idAt(0), false);
82 viewMenu->setItemChecked(viewMenu->idAt(1), true);
79 // qDebug("tabchanged: REMOTE VIEW SHOWN"); 83 // qDebug("tabchanged: REMOTE VIEW SHOWN");
80 } 84 }
81 qApp->processEvents(); 85 qApp->processEvents();
82 QString path = CurrentDir()->canonicalPath(); 86 QString path = CurrentDir()->canonicalPath();
83 // qDebug(path); 87 // qDebug(path);
84 if ( TabWidget->currentWidget() == tab) { 88 if ( TabWidget->currentWidget() == tab) {
85 viewMenu->setItemChecked(viewMenu->idAt(0), true);
86 viewMenu->setItemChecked(viewMenu->idAt(1), false);
87 } else { 89 } else {
88 viewMenu->setItemChecked(viewMenu->idAt(0), false);
89 viewMenu->setItemChecked(viewMenu->idAt(1), true);
90 } 90 }
91 91
92 chdir( path.latin1()); 92 chdir( path.latin1());
93 currentPathCombo->lineEdit()->setText(path); 93 currentPathCombo->lineEdit()->setText(path);
94} 94}
95 95
96 96
97void AdvancedFm::populateView() { 97void AdvancedFm::populateView() {
98 98
99 QPixmap pm; 99 QPixmap pm;
100 QListView *thisView = CurrentView(); 100 QListView *thisView = CurrentView();
101 QDir *thisDir = CurrentDir(); 101 QDir *thisDir = CurrentDir();
102 QString path = thisDir->canonicalPath(); 102 QString path = thisDir->canonicalPath();
103 103
104 thisView->clear(); 104 thisView->clear();
105 thisDir->setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); 105 thisDir->setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst);
106 thisDir->setMatchAllDirs(TRUE); 106 thisDir->setMatchAllDirs(TRUE);
107 thisDir->setNameFilter(filterStr); 107 thisDir->setNameFilter(filterStr);
108 QString fileL, fileS, fileDate; 108 QString fileL, fileS, fileDate;
109 109
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;
@@ -344,49 +344,49 @@ void AdvancedFm::SDButtonPushed() {
344void AdvancedFm::CFButtonPushed() { 344void AdvancedFm::CFButtonPushed() {
345 Opie::Core::OStorageInfo info; 345 Opie::Core::OStorageInfo info;
346 changeTo(info.cfPath()); 346 changeTo(info.cfPath());
347} 347}
348 348
349void AdvancedFm::QPEButtonPushed() { 349void AdvancedFm::QPEButtonPushed() {
350 changeTo(QPEApplication::qpeDir()); 350 changeTo(QPEApplication::qpeDir());
351} 351}
352 352
353void AdvancedFm::doAbout() { 353void AdvancedFm::doAbout() {
354 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>")); 354 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>"));
355} 355}
356 356
357void AdvancedFm::keyPressEvent( QKeyEvent *e) { 357void AdvancedFm::keyPressEvent( QKeyEvent *e) {
358 Q_UNUSED(e); 358 Q_UNUSED(e);
359} 359}
360 360
361void AdvancedFm::keyReleaseEvent( QKeyEvent *e) { 361void AdvancedFm::keyReleaseEvent( QKeyEvent *e) {
362// if( CurrentView()->hasFocus() ) 362// if( CurrentView()->hasFocus() )
363// e->ignore(); 363// e->ignore();
364 if( currentPathCombo->lineEdit()->hasFocus()) { 364 if( currentPathCombo->lineEdit()->hasFocus()) {
365 // qDebug("shout!"); 365 // qDebug("shout!");
366 } 366 }
367 367
368 else if( e->key() == Key_Left ) 368 else if( e->key() == Key_Left )
369 upDir(); 369 upDir();
370 else if( e->key() == Key_Return || e->key() == Key_Enter) 370 else if( e->key() == Key_Return || e->key() == Key_Enter)
371 navigateToSelected(); 371 navigateToSelected();
372 else if( e->key() == Key_Tab) 372 else if( e->key() == Key_Tab)
373 setOtherTabCurrent(); 373 setOtherTabCurrent();
374 else if( e->key() == Key_Delete ) 374 else if( e->key() == Key_Delete )
375 del(); 375 del();
376 else if( e->key() == Key_A) 376 else if( e->key() == Key_A)
377 copyAs(); 377 copyAs();
378 else if( e->key() == Key_C) 378 else if( e->key() == Key_C)
379 copy(); 379 copy();
380 else if( e->key() == Key_E) 380 else if( e->key() == Key_E)
381 runThis(); 381 runThis();
382 else if( e->key() == Key_G) 382 else if( e->key() == Key_G)
383 currentPathCombo->lineEdit()->setFocus(); 383 currentPathCombo->lineEdit()->setFocus();
384 else if( e->key() == Key_H ) 384 else if( e->key() == Key_H )
385 showHidden(); 385 showHidden();
386 else if( e->key() == Key_I) 386 else if( e->key() == Key_I)
387 fileStatus(); 387 fileStatus();
388 else if( e->key() == Key_M) 388 else if( e->key() == Key_M)
389 move(); 389 move();
390 else if( e->key() == Key_N ) 390 else if( e->key() == Key_N )
391 mkDir(); 391 mkDir();
392 else if( e->key() == Key_P) 392 else if( e->key() == Key_P)