Skip to content

Commit

Permalink
Portable download & monitor settings immutable
Browse files Browse the repository at this point in the history
  • Loading branch information
sgourdas committed Sep 17, 2024
1 parent 766e940 commit d2c37ed
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions resources/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,5 +165,6 @@
"import-reading-list": "Import reading list",
"import-reading-list-error": "An error has occured during import of the reading list.",
"disable-sandbox": "Application was launched from a network drive. This is known to cause compatibility issues due to the sandbox. Do you want to take the risks and disable it?",
"portable-disabled-tooltip": "Function disabled in portable mode",
"save-page-as": "Save As..."
}
15 changes: 15 additions & 0 deletions src/settingsview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,21 @@ SettingsView::SettingsView(QWidget *parent)
ui->monitorHelp->setToolTip(gt("monitor-directory-tooltip"));
ui->moveToTrashLabel->setText(gt("move-files-to-trash"));
ui->reopenTabLabel->setText(gt("open-previous-tabs-at-startup"));
if(isPortableMode()) {
ui->browseButton->setEnabled(false);
ui->resetButton->setEnabled(false);
ui->monitorBrowse->setEnabled(false);
ui->monitorClear->setEnabled(false);
QString disabledStyle = "color: gray;";
ui->browseButton->setStyleSheet(disabledStyle);
ui->resetButton->setStyleSheet(disabledStyle);
ui->monitorBrowse->setStyleSheet(disabledStyle);
ui->monitorClear->setStyleSheet(disabledStyle);
ui->browseButton->setToolTip(gt("portable-disabled-tooltip"));
ui->resetButton->setToolTip(gt("portable-disabled-tooltip"));
ui->monitorBrowse->setToolTip(gt("portable-disabled-tooltip"));
ui->monitorClear->setToolTip(gt("portable-disabled-tooltip"));
}
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
ui->line_5->hide();
ui->moveToTrashLabel->hide();
Expand Down

0 comments on commit d2c37ed

Please sign in to comment.