mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Preferences: Hide default browser check-box and push-button in portable mode.
This commit is contained in:
parent
e5de0bc4c9
commit
c8844db302
@ -141,15 +141,22 @@ Preferences::Preferences(BrowserWindow* window)
|
||||
ui->dontLoadTabsUntilSelected->setChecked(settings.value("Web-Browser-Settings/LoadTabsOnActivation", true).toBool());
|
||||
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_OS2)
|
||||
ui->checkDefaultBrowser->setChecked(settings.value("Web-Browser-Settings/CheckDefaultBrowser", DEFAULT_CHECK_DEFAULTBROWSER).toBool());
|
||||
if (mApp->associationManager()->isDefaultForAllCapabilities()) {
|
||||
ui->checkNowDefaultBrowser->setText(tr("Default"));
|
||||
ui->checkNowDefaultBrowser->setEnabled(false);
|
||||
if (!mApp->isPortable()) {
|
||||
ui->checkDefaultBrowser->setChecked(settings.value("Web-Browser-Settings/CheckDefaultBrowser",
|
||||
DEFAULT_CHECK_DEFAULTBROWSER).toBool());
|
||||
if (mApp->associationManager()->isDefaultForAllCapabilities()) {
|
||||
ui->checkNowDefaultBrowser->setText(tr("Default"));
|
||||
ui->checkNowDefaultBrowser->setEnabled(false);
|
||||
}
|
||||
else {
|
||||
ui->checkNowDefaultBrowser->setText(tr("Set as default"));
|
||||
ui->checkNowDefaultBrowser->setEnabled(true);
|
||||
connect(ui->checkNowDefaultBrowser, SIGNAL(clicked()), this, SLOT(makeFalkonDefault()));
|
||||
}
|
||||
}
|
||||
else {
|
||||
ui->checkNowDefaultBrowser->setText(tr("Set as default"));
|
||||
ui->checkNowDefaultBrowser->setEnabled(true);
|
||||
connect(ui->checkNowDefaultBrowser, SIGNAL(clicked()), this, SLOT(makeFalkonDefault()));
|
||||
ui->checkDefaultBrowser->hide();
|
||||
ui->checkNowDefaultBrowser->hide();
|
||||
}
|
||||
#else // No Default Browser settings on non-Windows platform
|
||||
ui->hSpacerDefaultBrowser->changeSize(0, 0, QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
|
Loading…
Reference in New Issue
Block a user