summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/filebrowser/filebrowser.cpp39
-rw-r--r--noncore/unsupported/filebrowser/filebrowser.h6
2 files changed, 39 insertions, 6 deletions
diff --git a/noncore/unsupported/filebrowser/filebrowser.cpp b/noncore/unsupported/filebrowser/filebrowser.cpp
index 41e7634..d9aabfd 100644
--- a/noncore/unsupported/filebrowser/filebrowser.cpp
+++ b/noncore/unsupported/filebrowser/filebrowser.cpp
@@ -178,2 +178,4 @@ FileView::FileView( const QString & dir, QWidget * parent,
178 178
179 showingHidden=FALSE;
180
179 setMultiSelection( TRUE ); 181 setMultiSelection( TRUE );
@@ -208,2 +210,5 @@ void FileView::updateDir()
208{ 210{
211 setCaption( "Boogie on boogieboy");
212 //qDebug("Caption should be "+currentDir);
213
209 generateDir( currentDir ); 214 generateDir( currentDir );
@@ -230,5 +235,9 @@ void FileView::generateDir( const QString & dir )
230 235
236 if( !showingHidden)
231 d.setFilter( QDir::Dirs | QDir::Files ); 237 d.setFilter( QDir::Dirs | QDir::Files );
232 d.setSorting( QDir::Name | QDir::DirsFirst | QDir::IgnoreCase | 238 else
233 QDir::Reversed ); 239 d.setFilter( QDir::Dirs | QDir::Files |QDir::Hidden | QDir::All);
240
241 d.setSorting( QDir::Name | QDir::DirsFirst | QDir::IgnoreCase | QDir::Reversed );
242
234 243
@@ -240,3 +249,3 @@ void FileView::generateDir( const QString & dir )
240 while( (fi = it.current()) ){ 249 while( (fi = it.current()) ){
241 if( (fi->fileName() == ".") || (fi->fileName() == "..") ){ 250 if( (fi->fileName() == ".") || (fi->fileName() == "..") ){
242 ++it; 251 ++it;
@@ -247,3 +256,2 @@ void FileView::generateDir( const QString & dir )
247 } 256 }
248
249 emit dirChanged(); 257 emit dirChanged();
@@ -657,2 +665,3 @@ void FileView::showFileMenu()
657 m->insertItem( Resource::loadPixmap("copy"), 665 m->insertItem( Resource::loadPixmap("copy"),
666
658 tr( "Copy" ), this, SLOT( copy() ) ); 667 tr( "Copy" ), this, SLOT( copy() ) );
@@ -661,3 +670,3 @@ void FileView::showFileMenu()
661 m->insertItem( tr( "Change Permissions" ), this, SLOT( chPerm() ) ); 670 m->insertItem( tr( "Change Permissions" ), this, SLOT( chPerm() ) );
662 m->insertItem( tr( "Delete" ), this, SLOT( del() ) ); 671 m->insertItem(Resource::loadPixmap( "close" ), tr( "Delete" ), this, SLOT( del() ) );
663 m->insertSeparator(); 672 m->insertSeparator();
@@ -713,2 +722,6 @@ void FileBrowser::init(const QString & dir)
713 sortMenu->insertItem( tr( "Ascending" ), this, SLOT( updateSorting() ) ); 722 sortMenu->insertItem( tr( "Ascending" ), this, SLOT( updateSorting() ) );
723 sortMenu->insertSeparator();
724 sortMenu->insertItem( tr( "Show Hidden "), this, SLOT( showHidden() ) );
725 fileView->showingHidden=FALSE;
726
714 sortMenu->setItemChecked( sortMenu->idAt( 5 ), TRUE ); 727 sortMenu->setItemChecked( sortMenu->idAt( 5 ), TRUE );
@@ -749,2 +762,3 @@ void FileBrowser::init(const QString & dir)
749 762
763// dirLabel = new QLabel(this, "DirLabel");
750 764
@@ -766,2 +780,6 @@ void FileBrowser::pcmciaMessage( const QCString &msg, const QByteArray &)
766 780
781void FileBrowser::changeCaption(const QString & dir) {
782 setCaption( dir);
783}
784
767void FileBrowser::dirSelected( int id ) 785void FileBrowser::dirSelected( int id )
@@ -856,2 +874,13 @@ void FileBrowser::updateSorting()
856 874
875void FileBrowser::showHidden() {
876 if(! fileView->showingHidden) {
877 fileView->showingHidden=TRUE;
878 sortMenu->setItemChecked( sortMenu->idAt( 7),TRUE);
879 } else {
880 fileView->showingHidden=FALSE;
881 sortMenu->setItemChecked( sortMenu->idAt( 7),FALSE);
882 }
883 fileView->updateDir();
884}
885
857void FileView::chPerm() { 886void FileView::chPerm() {
diff --git a/noncore/unsupported/filebrowser/filebrowser.h b/noncore/unsupported/filebrowser/filebrowser.h
index c214dbe..54856a0 100644
--- a/noncore/unsupported/filebrowser/filebrowser.h
+++ b/noncore/unsupported/filebrowser/filebrowser.h
@@ -28,3 +28,3 @@
28#include <qstringlist.h> 28#include <qstringlist.h>
29 29class QLabel;
30class InlineEdit; 30class InlineEdit;
@@ -60,2 +60,3 @@ public:
60 QStringList history() const { return dirHistory; } 60 QStringList history() const { return dirHistory; }
61 bool showingHidden;
61 62
@@ -116,2 +117,4 @@ public:
116 const char * name = 0, WFlags f = 0 ); 117 const char * name = 0, WFlags f = 0 );
118public slots:
119 void changeCaption(const QString &);
117private: 120private:
@@ -138,2 +141,3 @@ private slots:
138 void dirSelected( int id ); 141 void dirSelected( int id );
142 void showHidden();
139}; 143};