aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-fileinfo
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2016-10-17 06:30:04 +0000
committerWeblate <noreply@weblate.org>2016-10-17 06:30:04 +0000
commit15f388cffbbf3b331f38ea761995dbb98534228a (patch)
tree8d2d406cb57eaf11c44d52272510b9982ecd67ec /src-qt5/desktop-utils/lumina-fileinfo
parentTranslated using Weblate (lumina_OPEN@hu (generated)) (diff)
parentOops - forgot to save the fallback CPU temperature reading into the variable. (diff)
downloadlumina-15f388cffbbf3b331f38ea761995dbb98534228a.tar.gz
lumina-15f388cffbbf3b331f38ea761995dbb98534228a.tar.bz2
lumina-15f388cffbbf3b331f38ea761995dbb98534228a.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fileinfo')
-rw-r--r--src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp b/src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp
index dfa1ec36..8a16f03f 100644
--- a/src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp
@@ -41,8 +41,8 @@ void MainUI::LoadFile(QString path, QString type){
if(INFO->exists()){ canwrite = INFO->isWritable(); }
else if(!INFO->filePath().isEmpty()){
//See if the containing directory can be written
- QFileInfo chk(INFO->absolutePath());
- canwrite = (chk.isDir() && chk.isWritable());
+ //QFileInfo chk(INFO->absolutePath());
+ canwrite = (INFO->isDir() && INFO->isWritable());
}else{
canwrite = true; //no associated file yet
}
@@ -82,21 +82,29 @@ void MainUI::LoadFile(QString path, QString type){
ui->label_file_type->setText(ftype);
//Now load the icon for the file
if(INFO->isImage()){
- ui->label_file_icon->setPixmap( QPixmap(INFO->absoluteFilePath()).scaledToHeight(64) );
+ //qDebug() << "Set Image:";
+ QPixmap pix(INFO->absoluteFilePath());
+ ui->label_file_icon->setPixmap( pix.scaledToHeight(64) );
+ ui->label_file_size->setText( ui->label_file_size->text()+" ("+QString::number(pix.width())+" x "+QString::number(pix.height())+" px)" );
+ //qDebug() << " - done with image";
}else{
ui->label_file_icon->setPixmap( LXDG::findIcon( INFO->iconfile(), "unknown").pixmap(QSize(64,64)) );
}
//Now verify the tab is available in the widget
+ //qDebug() << "Check tab widget";
if(ui->tabWidget->indexOf(ui->tab_file)<0){
+ //qDebug() << "Add File Info Tab";
ui->tabWidget->addTab(ui->tab_file, tr("File Information"));
}
+ //qDebug() << "Done with Tab Check";
}else{
if(ui->tabWidget->indexOf(ui->tab_file)>=0){
ui->tabWidget->removeTab( ui->tabWidget->indexOf(ui->tab_file) );
}
}
//Now load the special XDG desktop info
- qDebug() << INFO->isDesktopFile() << type;
+ qDebug() << "Check XDG Info:" << type;
+ //qDebug() << INFO->isDesktopFile() << type;
if(INFO->isDesktopFile() || !type.isEmpty()){
if(INFO->XDG()->type == XDGDesktop::APP){
@@ -142,6 +150,7 @@ void MainUI::LoadFile(QString path, QString type){
//Setup the tab
if(type.isEmpty()){ ui->tabWidget->setCurrentIndex(0); }
else if(ui->tabWidget->count()>1){ ui->tabWidget->setCurrentIndex(1); }
+ qDebug() << "Done Loading File";
}
void MainUI::UpdateIcons(){
bgstack15