author | kergoth <kergoth> | 2002-04-14 03:24:23 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-04-14 03:24:23 (UTC) |
commit | 908a0fb11fd33161a3899f29c11cfbec9dcadbfc (patch) (side-by-side diff) | |
tree | 915acafe981ba9e381ff54ceaf5f2aeb1cdc15bf | |
parent | 02fc6c820f98d58e856f410e3f1167027f084bec (diff) | |
download | opie-908a0fb11fd33161a3899f29c11cfbec9dcadbfc.zip opie-908a0fb11fd33161a3899f29c11cfbec9dcadbfc.tar.gz opie-908a0fb11fd33161a3899f29c11cfbec9dcadbfc.tar.bz2 |
Fixing policy violation.. no app pics in the root of pics/\!
-rw-r--r-- | noncore/unsupported/filebrowser/filebrowser.cpp | 2 | ||||
-rw-r--r-- | noncore/unsupported/filebrowser/opie-filebrowser.control | 2 | ||||
-rw-r--r-- | pics/filebrowser/symlink.png (renamed from pics/symlink.png) | bin | 103 -> 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 @@ -43,97 +43,97 @@ #include <qmultilineedit.h> #include <qfont.h> #include <unistd.h> #include <stdlib.h> #include <sys/stat.h> // // FileItem // FileItem::FileItem( QListView * parent, const QFileInfo & fi ) : QListViewItem( parent ), fileInfo( fi ) { QDate d = fi.lastModified().date(); setText( 0, fi.fileName() ); setText( 1, sizeString( fi.size() ) + " " ); setText( 2, QString().sprintf("%4d-%02d-%02d",d.year(), d.month(), d.day() ) ); MimeType mt(fi.filePath()); if ( fi.isSymLink() ) setText( 3, "symlink" ); else if( fi.isDir() ) setText( 3, "directory" ); else if( isLib() ) setText( 3, "library" ); else setText( 3, mt.description() ); QPixmap pm; if( fi.isDir() ){ if( !QDir( fi.filePath() ).isReadable() ) pm = Resource::loadPixmap( "lockedfolder" ); else pm = Resource::loadPixmap( "folder" ); } else if( !fi.isReadable() ) pm = Resource::loadPixmap( "locked" ); else if( isLib() ) pm = Resource::loadPixmap( "library" ); else pm = mt.pixmap(); if ( pm.isNull() ) pm = Resource::loadPixmap("UnknownDocument-14"); if( fi.isSymLink() ){ // overlay link image - QPixmap lnk = Resource::loadPixmap( "symlink" ); + 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 ) ); } setPixmap(0,pm); } QString FileItem::sizeString( unsigned int s ) { double size = s; if ( size > 1024 * 1024 * 1024 ) return QString().sprintf( "%.1f", size / ( 1024 * 1024 * 1024 ) ) + "G"; else if ( size > 1024 * 1024 ) return QString().sprintf( "%.1f", size / ( 1024 * 1024 ) ) + "M"; else if ( size > 1024 ) return QString().sprintf( "%.1f", size / ( 1024 ) ) + "K"; else return QString::number( size ) + "B"; } QString FileItem::key( int column, bool ascending ) const { QString tmp; ascending = ascending; if( (column == 0) && fileInfo.isDir() ){ // Sort by name // We want the directories to appear at the top of the list tmp = (char) 0; return (tmp + text( column ).lower()); } else if( column == 2 ) { // Sort by date QDateTime epoch( QDate( 1980, 1, 1 ) ); tmp.sprintf( "%08d", epoch.secsTo( fileInfo.lastModified() ) ); return tmp; } else if( column == 1 ) { // Sort by size return tmp.sprintf( "%08d", fileInfo.size() ); } return text( column ).lower(); } bool FileItem::isLib() { // This is of course not foolproof if( !qstrncmp("lib", fileInfo.baseName(), 3) && 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 @@ -Files: bin/filebrowser apps/Applications/filebrowser.desktop +Files: bin/filebrowser apps/Applications/filebrowser.desktop pics/filebrowser/symlink.png Priority: optional Section: opie/applications Maintainer: Warwick Allison <warwick@trolltech.com> Architecture: arm Version: $QPE_VERSION-$SUB_VERSION Depends: opie-base ($QPE_VERSION) Description: Browse the file system The filebrowser for the Opie environment. diff --git a/pics/symlink.png b/pics/filebrowser/symlink.png Binary files differindex a0b267a..a0b267a 100644 --- a/pics/symlink.png +++ b/pics/filebrowser/symlink.png |