summaryrefslogtreecommitdiffabout
path: root/microkde
Side-by-side diff
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/ofileselector_p.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/microkde/ofileselector_p.cpp b/microkde/ofileselector_p.cpp
index e2af32b..488dee2 100644
--- a/microkde/ofileselector_p.cpp
+++ b/microkde/ofileselector_p.cpp
@@ -154,22 +154,23 @@ OFileSelectorItem::OFileSelectorItem( QListView* view, const QPixmap& pixmap,
const QString& path, const QString& date,
const QString& size, const QString& dir,
bool isLocked, bool isDir )
: QListViewItem( view )
{
- QString kind;
+ QString kind = "dir";;
QString _path = path;
- if ( isDir )
- kind = "dir";
- else
- kind = "file";
+ if ( !isDir ){
+ int arrow = path.findRev( "." ,-1);
+ if (arrow > 0 ) {
+ kind = path.mid(arrow+1);
+ }
+ }
setPixmap(0, pixmap );
int arrow = path.find( "->" );
if (arrow > 0 ) {
- kind += path.mid( arrow );
_path = path.left(arrow);
}
setText(1, _path );
setText(2, size );
setText(3, date );
setText(4, kind );
@@ -288,15 +289,15 @@ OFileViewFileListView::OFileViewFileListView( QWidget* parent, const QString& st
m_view->installEventFilter(this);
QPEApplication::setStylusOperation( m_view->viewport(),
QPEApplication::RightOnHold);
m_view->addColumn(" " );
- m_view->addColumn(i18n("Name"), 135 );
+ m_view->addColumn(i18n("Name"), 150 );
m_view->addColumn(i18n("Size"), -1 );
- m_view->addColumn(i18n("Date"), 60 );
+ m_view->addColumn(i18n("Date"), -1 );
m_view->addColumn(i18n("Mime Type"), -1 );
m_view->setSorting( 1 );
m_view->setAllColumnsShowFocus( TRUE );