summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-04-22 12:11:02 (UTC)
committer llornkcor <llornkcor>2002-04-22 12:11:02 (UTC)
commite79c930fb498f2bc3387da7133a57cd085244346 (patch) (side-by-side diff)
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
@@ -63,8 +63,8 @@ FileItem::FileItem( QListView * parent, const QFileInfo & fi )
MimeType mt(fi.filePath());
- if ( fi.isSymLink() )
- setText( 3, "symlink" );
+ if ( fi.isSymLink() )
+ setText( 3, "symlink" );
else if( fi.isDir() )
- setText( 3, "directory" );
+ setText( 3, "directory" );
else if( isLib() )
setText( 3, "library" );
@@ -88,8 +88,8 @@ FileItem::FileItem( QListView * parent, const QFileInfo & fi )
pm = Resource::loadPixmap("UnknownDocument-14");
if( fi.isSymLink() ){
- // overlay link image
- QPixmap lnk = Resource::loadPixmap( "filebrowser/symlink" );
- QPainter painter( &pm );
- painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk );
+ // overlay link image
+ QPixmap lnk = Resource::loadPixmap( "filebrowser/symlink" );
+ QPainter painter( &pm );
+ painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk );
pm.setMask( pm.createHeuristicMask( FALSE ) );
}
@@ -176,6 +176,6 @@ bool FileItem::rename( const QString & name )
//
FileView::FileView( const QString & dir, QWidget * parent,
- const char * name,
- bool hidden, bool symlinks )
+ const char * name,
+ bool hidden, bool symlinks )
: QListView( parent, name ),
menuTimer( this ),
@@ -184,9 +184,9 @@ FileView::FileView( const QString & dir, QWidget * parent,
showHidden( hidden ),
showSymlinks( symlinks),
- menuKeepsOpen( FALSE )
+ menuKeepsOpen( FALSE )
{
addColumn( "Name" );
- addColumn( "Date" );
addColumn( "Size" );
+ addColumn( "Date" );
addColumn( "Type" );
@@ -237,8 +237,8 @@ void FileView::setDir( const QString & dir )
void FileView::generateDir( const QString & dir )
{
- if(menuKeepsOpen){
- cancelMenuTimer();
+ if(menuKeepsOpen){
+ cancelMenuTimer();
}
- QDir d( dir );
+ QDir d( dir );
if( d.exists() && !d.isReadable() ) return;
@@ -264,8 +264,8 @@ void FileView::generateDir( const QString & dir )
continue;
}
- if(!showSymlinks && fi->isSymLink()){
- ++it;
- continue;
- }
+ if(!showSymlinks && fi->isSymLink()){
+ ++it;
+ continue;
+ }
(void) new FileItem( (QListView *) this, *fi );
++it;
@@ -590,9 +590,9 @@ void FileView::itemClicked( QListViewItem * i)
void FileView::itemDblClicked( QListViewItem * i)
{
- if(menuKeepsOpen){
- cancelMenuTimer();
- }
+ if(menuKeepsOpen){
+ cancelMenuTimer();
+ }
- FileItem * t = (FileItem *) i;
+ FileItem * t = (FileItem *) i;
if(t == NULL) return;
@@ -626,8 +626,8 @@ void FileView::contentsMouseReleaseEvent( QMouseEvent * e )
{
QListView::contentsMouseReleaseEvent( e );
- if(!menuKeepsOpen){
- menuTimer.stop();
- }
-
+ if(!menuKeepsOpen){
+ menuTimer.stop();
+ }
+
}
@@ -705,15 +705,15 @@ void FileView::showFileMenu()
void FileView::setShowHidden(bool hidden)
{
- showHidden=hidden;
+ showHidden=hidden;
}
void FileView::setShowSymlinks(bool symlinks)
{
- showSymlinks=symlinks;
+ showSymlinks=symlinks;
}
void FileView::setMenuKeepsOpen(bool keepOpen)
{
- menuKeepsOpen=keepOpen;
+ menuKeepsOpen=keepOpen;
}
@@ -737,17 +737,17 @@ void FileBrowser::init(const QString & dir)
setIcon( Resource::loadPixmap( "filebrowser_icon" ) );
- Config cfg("Filebrowser");
- cfg.setGroup("View");
- bool showHidden=(cfg.readEntry("Hidden","FALSE") == "TRUE");
- bool showSymlinks=(cfg.readEntry("Symlinks","FALSE") == "TRUE");
+ Config cfg("Filebrowser");
+ cfg.setGroup("View");
+ bool showHidden=(cfg.readEntry("Hidden","FALSE") == "TRUE");
+ bool showSymlinks=(cfg.readEntry("Symlinks","FALSE") == "TRUE");
- cfg.setGroup("Menu");
- bool menuKeepsOpen=(cfg.readEntry("KeepOpen", "FALSE") == "TRUE");
-
+ cfg.setGroup("Menu");
+ bool menuKeepsOpen=(cfg.readEntry("KeepOpen", "FALSE") == "TRUE");
+
fileView = new FileView( dir, this, 0, showHidden, showSymlinks );
fileView->setAllColumnsShowFocus( TRUE );
- fileView->setMenuKeepsOpen(menuKeepsOpen);
-
+ fileView->setMenuKeepsOpen(menuKeepsOpen);
+
setCentralWidget( fileView );
setToolBarsMovable( FALSE );
@@ -774,10 +774,10 @@ void FileBrowser::init(const QString & dir)
viewMenu = new QPopupMenu( this);
- viewMenu->insertItem( tr( "Hidden"), this, SLOT( updateShowHidden() ) );
- viewMenu->insertItem( tr( "Symlinks"), this, SLOT( updateShowSymlinks() ) );
+ viewMenu->insertItem( tr( "Hidden"), this, SLOT( updateShowHidden() ) );
+ viewMenu->insertItem( tr( "Symlinks"), this, SLOT( updateShowSymlinks() ) );
viewMenu->setItemChecked( viewMenu->idAt( 0 ), showHidden );
viewMenu->setItemChecked( viewMenu->idAt( 1 ), showSymlinks );
- menuBar->insertItem( tr("View"), viewMenu );
+ menuBar->insertItem( tr("View"), viewMenu );
toolBar = new QPEToolBar( this );
@@ -957,8 +957,8 @@ void FileView::chPerm() {
void FileBrowser::updateShowHidden()
{
- bool valShowHidden=viewMenu->isItemChecked( viewMenu->idAt( 0 ) );
- valShowHidden=!valShowHidden;
- viewMenu->setItemChecked( viewMenu->idAt( 0 ), valShowHidden );
- fileView->setShowHidden(valShowHidden);
+ bool valShowHidden=viewMenu->isItemChecked( viewMenu->idAt( 0 ) );
+ valShowHidden=!valShowHidden;
+ viewMenu->setItemChecked( viewMenu->idAt( 0 ), valShowHidden );
+ fileView->setShowHidden(valShowHidden);
Config cfg("Filebrowser");
@@ -966,13 +966,13 @@ void FileBrowser::updateShowHidden()
cfg.writeEntry("Hidden",valShowHidden?"TRUE":"FALSE");
- fileView->updateDir();
+ fileView->updateDir();
}
void FileBrowser::updateShowSymlinks()
{
- bool valShowSymlinks=viewMenu->isItemChecked( viewMenu->idAt( 1 ) );
- valShowSymlinks=!valShowSymlinks;
- viewMenu->setItemChecked( viewMenu->idAt( 1 ), valShowSymlinks );
- fileView->setShowSymlinks(valShowSymlinks);
+ bool valShowSymlinks=viewMenu->isItemChecked( viewMenu->idAt( 1 ) );
+ valShowSymlinks=!valShowSymlinks;
+ viewMenu->setItemChecked( viewMenu->idAt( 1 ), valShowSymlinks );
+ fileView->setShowSymlinks(valShowSymlinks);
Config cfg("Filebrowser");
@@ -980,4 +980,4 @@ void FileBrowser::updateShowSymlinks()
cfg.writeEntry("Symlinks",valShowSymlinks?"TRUE":"FALSE");
- fileView->updateDir();
+ fileView->updateDir();
}