diff options
author | Ken Moore <ken@pcbsd.org> | 2014-10-08 14:21:05 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2014-10-08 14:21:05 -0400 |
commit | 2a2869aa6e1e673d3a1e29fc3b1dfd9c7d21ba6d (patch) | |
tree | 07a6748fd0d2f6199fd799d0e579c42bfc6df9e7 /lumina-open/LFileDialog.cpp | |
parent | Clean up the default filemanager/terminal settings. Put them in the main sess... (diff) | |
download | lumina-2a2869aa6e1e673d3a1e29fc3b1dfd9c7d21ba6d.tar.gz lumina-2a2869aa6e1e673d3a1e29fc3b1dfd9c7d21ba6d.tar.bz2 lumina-2a2869aa6e1e673d3a1e29fc3b1dfd9c7d21ba6d.zip |
Add better binary detection to LuminaUtils, and setup lumina-open to use it.
Diffstat (limited to 'lumina-open/LFileDialog.cpp')
-rw-r--r-- | lumina-open/LFileDialog.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lumina-open/LFileDialog.cpp b/lumina-open/LFileDialog.cpp index e720bd65..dfd70ba2 100644 --- a/lumina-open/LFileDialog.cpp +++ b/lumina-open/LFileDialog.cpp @@ -127,10 +127,9 @@ void LFileDialog::updateUI(){ bool good = false; if(ui->radio_custom->isChecked()){ if(!ui->line_bin->text().isEmpty()){ - good = true; + good = LUtils::isValidBinary(ui->line_bin->text()); //Now verify that the file exists and is executable - QFileInfo FI(ui->line_bin->text()); - if( FI.exists() && FI.isExecutable() && FI.isFile() ){ + if( good ){ ui->label_goodbin->setPixmap(QPixmap(":/icons/good.png")); }else{ ui->label_goodbin->setPixmap(QPixmap(":/icons/bad.png")); @@ -206,7 +205,7 @@ void LFileDialog::radioChanged(){ }else{ ui->stackedWidget->setCurrentWidget(ui->page_custom); } - ui->check_default->setEnabled( !ui->radio_custom->isChecked() ); + //ui->check_default->setEnabled( !ui->radio_custom->isChecked() ); updateUI(); } @@ -219,6 +218,7 @@ void LFileDialog::radioChanged(){ void LFileDialog::on_tool_ok_clicked(){ appSelected = true; + setDefault = ui->check_default->isChecked(); if(ui->radio_custom->isChecked()){ appExec = ui->line_bin->text(); }else if(ui->radio_rec->isChecked()){ @@ -226,7 +226,6 @@ void LFileDialog::on_tool_ok_clicked(){ bool ok = false; XDGDesktop app = LXDG::loadDesktopFile(PREFAPPS[ui->combo_rec->currentIndex()], ok); //Set the output variables - setDefault = ui->check_default->isChecked(); appExec = app.exec; appPath = app.path; appFile = app.filePath; @@ -236,7 +235,6 @@ void LFileDialog::on_tool_ok_clicked(){ bool ok = false; XDGDesktop app = LXDG::loadDesktopFile(ui->tree_apps->currentItem()->whatsThis(0), ok); //Set the output variables - setDefault = ui->check_default->isChecked(); appExec = app.exec; appPath = app.path; appFile = app.filePath; |