summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-10-16 15:48:52 (UTC)
committer llornkcor <llornkcor>2002-10-16 15:48:52 (UTC)
commit0176ce245c348baf392dba790878458a5e39077f (patch) (unidiff)
tree91665a3e143c14d3a785d1c660df88e2aafde9fc
parent321cea04e34658fde3de47c104682b5cefce6eeb (diff)
downloadopie-0176ce245c348baf392dba790878458a5e39077f.zip
opie-0176ce245c348baf392dba790878458a5e39077f.tar.gz
opie-0176ce245c348baf392dba790878458a5e39077f.tar.bz2
fix showhidden files handling
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp9
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp18
2 files changed, 12 insertions, 15 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index b6e7a30..f23fd86 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -726,14 +726,10 @@ void AdvancedFm::showFileMenu() {
726 726
727 MimeType mt( curApp ); 727 MimeType mt( curApp );
728
729 const AppLnk* app = mt.application(); 728 const AppLnk* app = mt.application();
730
731 QFile fi(curApp); 729 QFile fi(curApp);
732
733 QPopupMenu *m = new QPopupMenu(0); 730 QPopupMenu *m = new QPopupMenu(0);
734 QPopupMenu *n = new QPopupMenu(0); 731 QPopupMenu *n = new QPopupMenu(0);
735 // QPopupMenu *o = new QPopupMenu(0); 732 // QPopupMenu *o = new QPopupMenu(0);
736 733 m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showMenuHidden() ));
737 m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() ));
738 734
739 if ( QFileInfo(fi).isDir() ) { 735 if ( QFileInfo(fi).isDir() ) {
@@ -746,6 +742,5 @@ void AdvancedFm::showFileMenu() {
746 + app->name() ), this, SLOT( runThis() ) ); 742 + app->name() ), this, SLOT( runThis() ) );
747 else if( QFileInfo(fi).isExecutable() ) //damn opie doesnt like this 743 else if( QFileInfo(fi).isExecutable() ) //damn opie doesnt like this
748 m->insertItem( /*Resource::loadPixmap( app->name()),*/ tr( "Execute" ), this, SLOT( runThis() ) ); 744 m->insertItem( tr( "Execute" ), this, SLOT( runThis() ) );
749
750 m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) ); 745 m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) );
751 } 746 }
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index 6d37904..5fa8d0c 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -54,7 +54,10 @@ void AdvancedFm::doRemoteCd() {
54 54
55void AdvancedFm::showMenuHidden() { 55void AdvancedFm::showMenuHidden() {
56 showHidden(); 56 if(TabWidget->currentPageIndex() == 0)
57 if(b) b= false; else b=true; 57 showHidden();
58 showRemoteHidden(); 58 else
59 showRemoteHidden();
60// if(b) qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<< true");
61 if(b) b = false; else b = true;
59} 62}
60 63
@@ -63,13 +66,12 @@ void AdvancedFm::showHidden() {
63 currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); 66 currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
64 fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); 67 fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
65 b=FALSE; 68// b=FALSE;
66 69
67 } else { 70 } else {
68 currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); 71 currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
69 fileMenu->setItemChecked( fileMenu->idAt(0),FALSE); 72 fileMenu->setItemChecked( fileMenu->idAt(0),FALSE);
70 b=TRUE; 73// b=TRUE;
71 } 74 }
72 populateLocalView(); 75 populateLocalView();
73
74} 76}
75 77
@@ -77,9 +79,9 @@ void AdvancedFm::showRemoteHidden() {
77 if (b) { 79 if (b) {
78 currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); 80 currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
79 b=TRUE; 81// b=TRUE;
80 82
81 } else { 83 } else {
82 currentRemoteDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); 84 currentRemoteDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
83 b=FALSE; 85// b=FALSE;
84 } 86 }
85 populateRemoteView(); 87 populateRemoteView();