summaryrefslogtreecommitdiff
Unidiff
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
@@ -725,16 +725,12 @@ void AdvancedFm::showFileMenu() {
725 } 725 }
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() ) {
740 m->insertSeparator(); 736 m->insertSeparator();
@@ -745,8 +741,7 @@ void AdvancedFm::showFileMenu() {
745 m->insertItem( app->pixmap(), tr( "Open in " 741 m->insertItem( app->pixmap(), tr( "Open in "
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 }
752 747
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
@@ -53,34 +53,36 @@ void AdvancedFm::doRemoteCd() {
53} 53}
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
61void AdvancedFm::showHidden() { 64void AdvancedFm::showHidden() {
62 if (b) { 65 if (b) {
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
76void AdvancedFm::showRemoteHidden() { 78void 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();
86} 88}