1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

Preferences: Hide default browser check-box and push-button in portable mode.

This commit is contained in:
Razi Alavizadeh 2018-03-26 16:59:36 +04:30
parent e5de0bc4c9
commit c8844db302

View File

@ -141,7 +141,9 @@ Preferences::Preferences(BrowserWindow* window)
ui->dontLoadTabsUntilSelected->setChecked(settings.value("Web-Browser-Settings/LoadTabsOnActivation", true).toBool()); ui->dontLoadTabsUntilSelected->setChecked(settings.value("Web-Browser-Settings/LoadTabsOnActivation", true).toBool());
#if defined(Q_OS_WIN) && !defined(Q_OS_OS2) #if defined(Q_OS_WIN) && !defined(Q_OS_OS2)
ui->checkDefaultBrowser->setChecked(settings.value("Web-Browser-Settings/CheckDefaultBrowser", DEFAULT_CHECK_DEFAULTBROWSER).toBool()); if (!mApp->isPortable()) {
ui->checkDefaultBrowser->setChecked(settings.value("Web-Browser-Settings/CheckDefaultBrowser",
DEFAULT_CHECK_DEFAULTBROWSER).toBool());
if (mApp->associationManager()->isDefaultForAllCapabilities()) { if (mApp->associationManager()->isDefaultForAllCapabilities()) {
ui->checkNowDefaultBrowser->setText(tr("Default")); ui->checkNowDefaultBrowser->setText(tr("Default"));
ui->checkNowDefaultBrowser->setEnabled(false); ui->checkNowDefaultBrowser->setEnabled(false);
@ -151,6 +153,11 @@ Preferences::Preferences(BrowserWindow* window)
ui->checkNowDefaultBrowser->setEnabled(true); ui->checkNowDefaultBrowser->setEnabled(true);
connect(ui->checkNowDefaultBrowser, SIGNAL(clicked()), this, SLOT(makeFalkonDefault())); connect(ui->checkNowDefaultBrowser, SIGNAL(clicked()), this, SLOT(makeFalkonDefault()));
} }
}
else {
ui->checkDefaultBrowser->hide();
ui->checkNowDefaultBrowser->hide();
}
#else // No Default Browser settings on non-Windows platform #else // No Default Browser settings on non-Windows platform
ui->hSpacerDefaultBrowser->changeSize(0, 0, QSizePolicy::Fixed, QSizePolicy::Fixed); ui->hSpacerDefaultBrowser->changeSize(0, 0, QSizePolicy::Fixed, QSizePolicy::Fixed);
ui->hLayoutDefaultBrowser->invalidate(); ui->hLayoutDefaultBrowser->invalidate();