summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-04-22 12:11:02 (UTC)
committer llornkcor <llornkcor>2002-04-22 12:11:02 (UTC)
commite79c930fb498f2bc3387da7133a57cd085244346 (patch) (unidiff)
treec98e0d3fb6c634bdb4404eebd11d7b532093d927
parentf4c084cb531d8ee036514e4cfb2fcd0f5ffc6b8c (diff)
downloadopie-e79c930fb498f2bc3387da7133a57cd085244346.zip
opie-e79c930fb498f2bc3387da7133a57cd085244346.tar.gz
opie-e79c930fb498f2bc3387da7133a57cd085244346.tar.bz2
fixed columns mixup
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/filebrowser/filebrowser.cpp102
1 files changed, 51 insertions, 51 deletions
diff --git a/noncore/unsupported/filebrowser/filebrowser.cpp b/noncore/unsupported/filebrowser/filebrowser.cpp
index d9e2afa..1bb7984 100644
--- a/noncore/unsupported/filebrowser/filebrowser.cpp
+++ b/noncore/unsupported/filebrowser/filebrowser.cpp
@@ -64,6 +64,6 @@ FileItem::FileItem( QListView * parent, const QFileInfo & fi )
64 64
65 if ( fi.isSymLink() ) 65 if ( fi.isSymLink() )
66 setText( 3, "symlink" ); 66 setText( 3, "symlink" );
67 else if( fi.isDir() ) 67 else if( fi.isDir() )
68 setText( 3, "directory" ); 68 setText( 3, "directory" );
69 else if( isLib() ) 69 else if( isLib() )
@@ -89,6 +89,6 @@ FileItem::FileItem( QListView * parent, const QFileInfo & fi )
89 if( fi.isSymLink() ){ 89 if( fi.isSymLink() ){
90 // overlay link image 90 // overlay link image
91 QPixmap lnk = Resource::loadPixmap( "filebrowser/symlink" ); 91 QPixmap lnk = Resource::loadPixmap( "filebrowser/symlink" );
92 QPainter painter( &pm ); 92 QPainter painter( &pm );
93 painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk ); 93 painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk );
94 pm.setMask( pm.createHeuristicMask( FALSE ) ); 94 pm.setMask( pm.createHeuristicMask( FALSE ) );
@@ -177,4 +177,4 @@ bool FileItem::rename( const QString & name )
177FileView::FileView( const QString & dir, QWidget * parent, 177FileView::FileView( const QString & dir, QWidget * parent,
178 const char * name, 178 const char * name,
179 bool hidden, bool symlinks ) 179 bool hidden, bool symlinks )
180 : QListView( parent, name ), 180 : QListView( parent, name ),
@@ -185,7 +185,7 @@ FileView::FileView( const QString & dir, QWidget * parent,
185 showSymlinks( symlinks), 185 showSymlinks( symlinks),
186 menuKeepsOpen( FALSE ) 186 menuKeepsOpen( FALSE )
187{ 187{
188 addColumn( "Name" ); 188 addColumn( "Name" );
189 addColumn( "Date" );
190 addColumn( "Size" ); 189 addColumn( "Size" );
190 addColumn( "Date" );
191 addColumn( "Type" ); 191 addColumn( "Type" );
@@ -238,6 +238,6 @@ void FileView::generateDir( const QString & dir )
238{ 238{
239 if(menuKeepsOpen){ 239 if(menuKeepsOpen){
240 cancelMenuTimer(); 240 cancelMenuTimer();
241 } 241 }
242 QDir d( dir ); 242 QDir d( dir );
243 243
@@ -265,6 +265,6 @@ void FileView::generateDir( const QString & dir )
265 } 265 }
266 if(!showSymlinks && fi->isSymLink()){ 266 if(!showSymlinks && fi->isSymLink()){
267 ++it; 267 ++it;
268 continue; 268 continue;
269 } 269 }
270 (void) new FileItem( (QListView *) this, *fi ); 270 (void) new FileItem( (QListView *) this, *fi );
@@ -591,7 +591,7 @@ void FileView::itemDblClicked( QListViewItem * i)
591{ 591{
592 if(menuKeepsOpen){ 592 if(menuKeepsOpen){
593 cancelMenuTimer(); 593 cancelMenuTimer();
594 } 594 }
595 595
596 FileItem * t = (FileItem *) i; 596 FileItem * t = (FileItem *) i;
597 597
@@ -627,6 +627,6 @@ void FileView::contentsMouseReleaseEvent( QMouseEvent * e )
627 QListView::contentsMouseReleaseEvent( e ); 627 QListView::contentsMouseReleaseEvent( e );
628 if(!menuKeepsOpen){ 628 if(!menuKeepsOpen){
629 menuTimer.stop(); 629 menuTimer.stop();
630 } 630 }
631 631
632} 632}
@@ -706,3 +706,3 @@ void FileView::setShowHidden(bool hidden)
706{ 706{
707 showHidden=hidden; 707 showHidden=hidden;
708} 708}
@@ -711,3 +711,3 @@ void FileView::setShowSymlinks(bool symlinks)
711{ 711{
712 showSymlinks=symlinks; 712 showSymlinks=symlinks;
713} 713}
@@ -716,3 +716,3 @@ void FileView::setMenuKeepsOpen(bool keepOpen)
716{ 716{
717 menuKeepsOpen=keepOpen; 717 menuKeepsOpen=keepOpen;
718} 718}
@@ -738,10 +738,10 @@ void FileBrowser::init(const QString & dir)
738 738
739 Config cfg("Filebrowser"); 739 Config cfg("Filebrowser");
740 cfg.setGroup("View"); 740 cfg.setGroup("View");
741 bool showHidden=(cfg.readEntry("Hidden","FALSE") == "TRUE"); 741 bool showHidden=(cfg.readEntry("Hidden","FALSE") == "TRUE");
742 bool showSymlinks=(cfg.readEntry("Symlinks","FALSE") == "TRUE"); 742 bool showSymlinks=(cfg.readEntry("Symlinks","FALSE") == "TRUE");
743 743
744 cfg.setGroup("Menu"); 744 cfg.setGroup("Menu");
745 bool menuKeepsOpen=(cfg.readEntry("KeepOpen", "FALSE") == "TRUE"); 745 bool menuKeepsOpen=(cfg.readEntry("KeepOpen", "FALSE") == "TRUE");
746 746
747 747
@@ -749,4 +749,4 @@ void FileBrowser::init(const QString & dir)
749 fileView->setAllColumnsShowFocus( TRUE ); 749 fileView->setAllColumnsShowFocus( TRUE );
750 fileView->setMenuKeepsOpen(menuKeepsOpen); 750 fileView->setMenuKeepsOpen(menuKeepsOpen);
751 751
752 setCentralWidget( fileView ); 752 setCentralWidget( fileView );
@@ -775,4 +775,4 @@ void FileBrowser::init(const QString & dir)
775 viewMenu = new QPopupMenu( this); 775 viewMenu = new QPopupMenu( this);
776 viewMenu->insertItem( tr( "Hidden"), this, SLOT( updateShowHidden() ) ); 776 viewMenu->insertItem( tr( "Hidden"), this, SLOT( updateShowHidden() ) );
777 viewMenu->insertItem( tr( "Symlinks"), this, SLOT( updateShowSymlinks() ) ); 777 viewMenu->insertItem( tr( "Symlinks"), this, SLOT( updateShowSymlinks() ) );
778 viewMenu->setItemChecked( viewMenu->idAt( 0 ), showHidden ); 778 viewMenu->setItemChecked( viewMenu->idAt( 0 ), showHidden );
@@ -780,3 +780,3 @@ void FileBrowser::init(const QString & dir)
780 780
781 menuBar->insertItem( tr("View"), viewMenu ); 781 menuBar->insertItem( tr("View"), viewMenu );
782 782
@@ -958,6 +958,6 @@ void FileBrowser::updateShowHidden()
958{ 958{
959 bool valShowHidden=viewMenu->isItemChecked( viewMenu->idAt( 0 ) ); 959 bool valShowHidden=viewMenu->isItemChecked( viewMenu->idAt( 0 ) );
960 valShowHidden=!valShowHidden; 960 valShowHidden=!valShowHidden;
961 viewMenu->setItemChecked( viewMenu->idAt( 0 ), valShowHidden ); 961 viewMenu->setItemChecked( viewMenu->idAt( 0 ), valShowHidden );
962 fileView->setShowHidden(valShowHidden); 962 fileView->setShowHidden(valShowHidden);
963 963
@@ -967,3 +967,3 @@ void FileBrowser::updateShowHidden()
967 967
968 fileView->updateDir(); 968 fileView->updateDir();
969} 969}
@@ -972,6 +972,6 @@ void FileBrowser::updateShowSymlinks()
972{ 972{
973 bool valShowSymlinks=viewMenu->isItemChecked( viewMenu->idAt( 1 ) ); 973 bool valShowSymlinks=viewMenu->isItemChecked( viewMenu->idAt( 1 ) );
974 valShowSymlinks=!valShowSymlinks; 974 valShowSymlinks=!valShowSymlinks;
975 viewMenu->setItemChecked( viewMenu->idAt( 1 ), valShowSymlinks ); 975 viewMenu->setItemChecked( viewMenu->idAt( 1 ), valShowSymlinks );
976 fileView->setShowSymlinks(valShowSymlinks); 976 fileView->setShowSymlinks(valShowSymlinks);
977 977
@@ -981,3 +981,3 @@ void FileBrowser::updateShowSymlinks()
981 981
982 fileView->updateDir(); 982 fileView->updateDir();
983} 983}