-rw-r--r-- | noncore/unsupported/filebrowser/filebrowser.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/noncore/unsupported/filebrowser/filebrowser.cpp b/noncore/unsupported/filebrowser/filebrowser.cpp index d9aabfd..6f82f95 100644 --- a/noncore/unsupported/filebrowser/filebrowser.cpp +++ b/noncore/unsupported/filebrowser/filebrowser.cpp | |||
@@ -199,27 +199,24 @@ FileView::FileView( const QString & dir, QWidget * parent, | |||
199 | 199 | ||
200 | void FileView::resizeEvent( QResizeEvent *e ) | 200 | void FileView::resizeEvent( QResizeEvent *e ) |
201 | { | 201 | { |
202 | setColumnWidth( 0, width() - 2 * lineWidth() - 20 - columnWidth( 1 ) - columnWidth( 2 ) ); | 202 | setColumnWidth( 0, width() - 2 * lineWidth() - 20 - columnWidth( 1 ) - columnWidth( 2 ) ); |
203 | 203 | ||
204 | // hide type column, we use it for "sort by type" only | 204 | // hide type column, we use it for "sort by type" only |
205 | setColumnWidth( 3, 0 ); | 205 | setColumnWidth( 3, 0 ); |
206 | QListView::resizeEvent( e ); | 206 | QListView::resizeEvent( e ); |
207 | } | 207 | } |
208 | 208 | ||
209 | void FileView::updateDir() | 209 | void FileView::updateDir() |
210 | { | 210 | { |
211 | setCaption( "Boogie on boogieboy"); | ||
212 | //qDebug("Caption should be "+currentDir); | ||
213 | |||
214 | generateDir( currentDir ); | 211 | generateDir( currentDir ); |
215 | } | 212 | } |
216 | 213 | ||
217 | void FileView::setDir( const QString & dir ) | 214 | void FileView::setDir( const QString & dir ) |
218 | { | 215 | { |
219 | if ( dir.startsWith( "/dev" ) ) { | 216 | if ( dir.startsWith( "/dev" ) ) { |
220 | QMessageBox::warning( this, tr( "File Manager" ), | 217 | QMessageBox::warning( this, tr( "File Manager" ), |
221 | tr( "Can't show /dev/ directory." ), tr( "&Ok" ) ); | 218 | tr( "Can't show /dev/ directory." ), tr( "&Ok" ) ); |
222 | return; | 219 | return; |
223 | } | 220 | } |
224 | dirHistory += currentDir; | 221 | dirHistory += currentDir; |
225 | generateDir( dir ); | 222 | generateDir( dir ); |
@@ -713,25 +710,26 @@ void FileBrowser::init(const QString & dir) | |||
713 | menuBar->insertItem( tr( "Dir" ), dirMenu ); | 710 | menuBar->insertItem( tr( "Dir" ), dirMenu ); |
714 | 711 | ||
715 | sortMenu = new QPopupMenu( this ); | 712 | sortMenu = new QPopupMenu( this ); |
716 | menuBar->insertItem( tr( "Sort" ), sortMenu ); | 713 | menuBar->insertItem( tr( "Sort" ), sortMenu ); |
717 | sortMenu->insertItem( tr( "by Name "), this, SLOT( sortName() ) ); | 714 | sortMenu->insertItem( tr( "by Name "), this, SLOT( sortName() ) ); |
718 | sortMenu->insertItem( tr( "by Size "), this, SLOT( sortSize() ) ); | 715 | sortMenu->insertItem( tr( "by Size "), this, SLOT( sortSize() ) ); |
719 | sortMenu->insertItem( tr( "by Date "), this, SLOT( sortDate() ) ); | 716 | sortMenu->insertItem( tr( "by Date "), this, SLOT( sortDate() ) ); |
720 | sortMenu->insertItem( tr( "by Type "), this, SLOT( sortType() ) ); | 717 | sortMenu->insertItem( tr( "by Type "), this, SLOT( sortType() ) ); |
721 | sortMenu->insertSeparator(); | 718 | sortMenu->insertSeparator(); |
722 | sortMenu->insertItem( tr( "Ascending" ), this, SLOT( updateSorting() ) ); | 719 | sortMenu->insertItem( tr( "Ascending" ), this, SLOT( updateSorting() ) ); |
723 | sortMenu->insertSeparator(); | 720 | sortMenu->insertSeparator(); |
724 | sortMenu->insertItem( tr( "Show Hidden "), this, SLOT( showHidden() ) ); | 721 | sortMenu->insertItem( tr( "Show Hidden "), this, SLOT( showHidden() ) ); |
725 | fileView->showingHidden=FALSE; | 722 | |
723 | // fileView->showingHidden=FALSE; | ||
726 | 724 | ||
727 | sortMenu->setItemChecked( sortMenu->idAt( 5 ), TRUE ); | 725 | sortMenu->setItemChecked( sortMenu->idAt( 5 ), TRUE ); |
728 | sortMenu->setItemChecked( sortMenu->idAt( 0 ), TRUE ); | 726 | sortMenu->setItemChecked( sortMenu->idAt( 0 ), TRUE ); |
729 | 727 | ||
730 | toolBar = new QPEToolBar( this ); | 728 | toolBar = new QPEToolBar( this ); |
731 | 729 | ||
732 | lastAction = new QAction( tr("Previous dir"), Resource::loadIconSet( "back" ), | 730 | lastAction = new QAction( tr("Previous dir"), Resource::loadIconSet( "back" ), |
733 | QString::null, 0, this, 0 ); | 731 | QString::null, 0, this, 0 ); |
734 | connect( lastAction, SIGNAL( activated() ), fileView, SLOT( lastDir() ) ); | 732 | connect( lastAction, SIGNAL( activated() ), fileView, SLOT( lastDir() ) ); |
735 | lastAction->addTo( toolBar ); | 733 | lastAction->addTo( toolBar ); |
736 | lastAction->setEnabled( FALSE ); | 734 | lastAction->setEnabled( FALSE ); |
737 | 735 | ||