summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/filebrowser/filebrowser.cpp2
-rw-r--r--noncore/unsupported/filebrowser/opie-filebrowser.control2
-rw-r--r--pics/filebrowser/symlink.png (renamed from pics/symlink.png)bin103 -> 103 bytes
3 files changed, 2 insertions, 2 deletions
diff --git a/noncore/unsupported/filebrowser/filebrowser.cpp b/noncore/unsupported/filebrowser/filebrowser.cpp
index 34d5177..d9e2afa 100644
--- a/noncore/unsupported/filebrowser/filebrowser.cpp
+++ b/noncore/unsupported/filebrowser/filebrowser.cpp
@@ -67,49 +67,49 @@ FileItem::FileItem( QListView * parent, const QFileInfo & fi )
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() )
70 setText( 3, "library" ); 70 setText( 3, "library" );
71 else 71 else
72 setText( 3, mt.description() ); 72 setText( 3, mt.description() );
73 73
74 QPixmap pm; 74 QPixmap pm;
75 if( fi.isDir() ){ 75 if( fi.isDir() ){
76 if( !QDir( fi.filePath() ).isReadable() ) 76 if( !QDir( fi.filePath() ).isReadable() )
77 pm = Resource::loadPixmap( "lockedfolder" ); 77 pm = Resource::loadPixmap( "lockedfolder" );
78 else 78 else
79 pm = Resource::loadPixmap( "folder" ); 79 pm = Resource::loadPixmap( "folder" );
80 } 80 }
81 else if( !fi.isReadable() ) 81 else if( !fi.isReadable() )
82 pm = Resource::loadPixmap( "locked" ); 82 pm = Resource::loadPixmap( "locked" );
83 else if( isLib() ) 83 else if( isLib() )
84 pm = Resource::loadPixmap( "library" ); 84 pm = Resource::loadPixmap( "library" );
85 else 85 else
86 pm = mt.pixmap(); 86 pm = mt.pixmap();
87 if ( pm.isNull() ) 87 if ( pm.isNull() )
88 pm = Resource::loadPixmap("UnknownDocument-14"); 88 pm = Resource::loadPixmap("UnknownDocument-14");
89 if( fi.isSymLink() ){ 89 if( fi.isSymLink() ){
90 // overlay link image 90 // overlay link image
91 QPixmap lnk = Resource::loadPixmap( "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 ) );
95 } 95 }
96 setPixmap(0,pm); 96 setPixmap(0,pm);
97} 97}
98 98
99QString FileItem::sizeString( unsigned int s ) 99QString FileItem::sizeString( unsigned int s )
100{ 100{
101 double size = s; 101 double size = s;
102 102
103 if ( size > 1024 * 1024 * 1024 ) 103 if ( size > 1024 * 1024 * 1024 )
104 return QString().sprintf( "%.1f", size / ( 1024 * 1024 * 1024 ) ) + "G"; 104 return QString().sprintf( "%.1f", size / ( 1024 * 1024 * 1024 ) ) + "G";
105 else if ( size > 1024 * 1024 ) 105 else if ( size > 1024 * 1024 )
106 return QString().sprintf( "%.1f", size / ( 1024 * 1024 ) ) + "M"; 106 return QString().sprintf( "%.1f", size / ( 1024 * 1024 ) ) + "M";
107 else if ( size > 1024 ) 107 else if ( size > 1024 )
108 return QString().sprintf( "%.1f", size / ( 1024 ) ) + "K"; 108 return QString().sprintf( "%.1f", size / ( 1024 ) ) + "K";
109 else 109 else
110 return QString::number( size ) + "B"; 110 return QString::number( size ) + "B";
111} 111}
112 112
113QString FileItem::key( int column, bool ascending ) const 113QString FileItem::key( int column, bool ascending ) const
114{ 114{
115 QString tmp; 115 QString tmp;
diff --git a/noncore/unsupported/filebrowser/opie-filebrowser.control b/noncore/unsupported/filebrowser/opie-filebrowser.control
index c15ae17..9de926f 100644
--- a/noncore/unsupported/filebrowser/opie-filebrowser.control
+++ b/noncore/unsupported/filebrowser/opie-filebrowser.control
@@ -1,9 +1,9 @@
1Files: bin/filebrowser apps/Applications/filebrowser.desktop 1Files: bin/filebrowser apps/Applications/filebrowser.desktop pics/filebrowser/symlink.png
2Priority: optional 2Priority: optional
3Section: opie/applications 3Section: opie/applications
4Maintainer: Warwick Allison <warwick@trolltech.com> 4Maintainer: Warwick Allison <warwick@trolltech.com>
5Architecture: arm 5Architecture: arm
6Version: $QPE_VERSION-$SUB_VERSION 6Version: $QPE_VERSION-$SUB_VERSION
7Depends: opie-base ($QPE_VERSION) 7Depends: opie-base ($QPE_VERSION)
8Description: Browse the file system 8Description: Browse the file system
9 The filebrowser for the Opie environment. 9 The filebrowser for the Opie environment.
diff --git a/pics/symlink.png b/pics/filebrowser/symlink.png
index a0b267a..a0b267a 100644
--- a/pics/symlink.png
+++ b/pics/filebrowser/symlink.png
Binary files differ