Diffstat (limited to 'libopie2/opieui/fileselector/ofileselector.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opieui/fileselector/ofileselector.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libopie2/opieui/fileselector/ofileselector.cpp b/libopie2/opieui/fileselector/ofileselector.cpp index 01a51a2..718f743 100644 --- a/libopie2/opieui/fileselector/ofileselector.cpp +++ b/libopie2/opieui/fileselector/ofileselector.cpp @@ -245,3 +245,3 @@ OFileSelectorItem::OFileSelectorItem( QListView* view, const QPixmap& pixmap, bool isLocked, bool isDir ) - : QListViewItem( view ) + : QListViewItem( view ), m_dir(dir), m_isDir(isDir), m_locked(isLocked) { @@ -251,5 +251,2 @@ OFileSelectorItem::OFileSelectorItem( QListView* view, const QPixmap& pixmap, setText(3, date ); - m_isDir = isDir; - m_dir = dir; - m_locked = isLocked; } @@ -283,2 +280,7 @@ QString OFileSelectorItem::key( int id, bool )const QString ke; + + /* + * id = 0 ||id == 1 : Sort By Name but Directories at Top + * id = 2 : Sort By Size: Prepend '0' to the key + */ if( id == 0 || id == 1 ) @@ -296,4 +298,5 @@ QString OFileSelectorItem::key( int id, bool )const return ke; - } - else + }else if(id == 2) { + return text(2).rightJustify(20, '0'); + }else return text( id ); |