From 5c4b5d57dacd1f442bad56cb442c7517028bab0d Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 26 Aug 2015 16:23:16 -0400 Subject: Fix the mimetype display for directories in lumina-fileinfo. --- lumina-fileinfo/dialog.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lumina-fileinfo') diff --git a/lumina-fileinfo/dialog.cpp b/lumina-fileinfo/dialog.cpp index 335d05aa..fe6e69c3 100644 --- a/lumina-fileinfo/dialog.cpp +++ b/lumina-fileinfo/dialog.cpp @@ -135,7 +135,6 @@ void Dialog::LoadDesktopFile(QString input) ui->tabWidget->setCurrentIndex(0); //always start on the file info tab //Now load the file info and put it into the UI QString mime = LXDG::findAppMimeForFile(desktopFileName); - QList fmt = QImageReader::supportedImageFormats(); bool foundimage=false; for(int i=0; ilabel_file_mimetype->setText(mime); QString type; if(desktopFileName.endsWith(".desktop")){ type = tr("XDG Shortcut"); } - else if(info.isDir()){ type = tr("Directory"); ui->label_file_icon->setPixmap( LXDG::findIcon("folder","").pixmap(QSize(64,64)) ); } - else if(info.isExecutable()){ type = tr("Binary"); } + else if(info.isDir()){ + type = tr("Directory"); + ui->label_file_mimetype->setText("inode/directory"); + ui->label_file_icon->setPixmap( LXDG::findIcon("folder","").pixmap(QSize(64,64)) ); + }else if(info.isExecutable()){ type = tr("Binary"); } else{ type = info.suffix().toUpper(); } if(info.isHidden()){ type = QString(tr("Hidden %1")).arg(type); } ui->label_file_type->setText(type); -- cgit