From 3d86c369e8b48b340e4093b034f1347defea876b Mon Sep 17 00:00:00 2001 From: zautrix Date: Sat, 18 Jun 2005 18:03:50 +0000 Subject: file dialog fixes --- 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 @@ -157,16 +157,17 @@ OFileSelectorItem::OFileSelectorItem( QListView* view, const QPixmap& pixmap, : 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 ); @@ -291,9 +292,9 @@ OFileViewFileListView::OFileViewFileListView( QWidget* parent, const QString& st 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 ); -- cgit v0.9.0.2