diff options
author | Ken Moore <moorekou@gmail.com> | 2015-08-26 16:23:16 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-08-26 16:23:16 -0400 |
commit | 5c4b5d57dacd1f442bad56cb442c7517028bab0d (patch) | |
tree | c2669ffe4b176739489ec77902b69ebc81806854 /lumina-fileinfo | |
parent | Add support for the "New [File/Dir]" buttons back into lumina-fm. (diff) | |
download | lumina-5c4b5d57dacd1f442bad56cb442c7517028bab0d.tar.gz lumina-5c4b5d57dacd1f442bad56cb442c7517028bab0d.tar.bz2 lumina-5c4b5d57dacd1f442bad56cb442c7517028bab0d.zip |
Fix the mimetype display for directories in lumina-fileinfo.
Diffstat (limited to 'lumina-fileinfo')
-rw-r--r-- | lumina-fileinfo/dialog.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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<QByteArray> fmt = QImageReader::supportedImageFormats(); bool foundimage=false; for(int i=0; i<fmt.length(); i++){ @@ -149,8 +148,11 @@ void Dialog::LoadDesktopFile(QString input) ui->label_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); |