From dc6f71a1b80d08971e47ff5bb14771d835181326 Mon Sep 17 00:00:00 2001 From: nowrep Date: Tue, 11 Feb 2014 15:44:47 +0100 Subject: [PATCH] [Preferences] Update default settings on some options TabsOnTop: Enabled by default DontLoadTabsUntilSelected: Enabled by default AfterLaunch: Restore session is now default --- src/lib/app/mainapplication.cpp | 2 +- src/lib/app/qupzilla.cpp | 4 ++-- src/lib/other/qzsettings.cpp | 4 ++-- src/lib/preferences/preferences.cpp | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib/app/mainapplication.cpp b/src/lib/app/mainapplication.cpp index fda333963..0f153d39b 100644 --- a/src/lib/app/mainapplication.cpp +++ b/src/lib/app/mainapplication.cpp @@ -314,7 +314,7 @@ MainApplication::MainApplication(int &argc, char** argv) Settings settings; m_startingAfterCrash = settings.value("SessionRestore/isRunning", false).toBool(); bool checkUpdates = settings.value("Web-Browser-Settings/CheckUpdates", DEFAULT_CHECK_UPDATES).toBool(); - int afterLaunch = settings.value("Web-URL-Settings/afterLaunch", 1).toInt(); + int afterLaunch = settings.value("Web-URL-Settings/afterLaunch", 3).toInt(); settings.setValue("SessionRestore/isRunning", true); #ifndef DISABLE_UPDATES_CHECK diff --git a/src/lib/app/qupzilla.cpp b/src/lib/app/qupzilla.cpp index 3a1c0fc01..931ed6815 100644 --- a/src/lib/app/qupzilla.cpp +++ b/src/lib/app/qupzilla.cpp @@ -178,7 +178,7 @@ void QupZilla::postLaunch() loadSettings(); Settings settings; - int afterLaunch = settings.value("Web-URL-Settings/afterLaunch", 1).toInt(); + int afterLaunch = settings.value("Web-URL-Settings/afterLaunch", 3).toInt(); bool addTab = true; QUrl startUrl; @@ -2057,7 +2057,7 @@ void QupZilla::closeEvent(QCloseEvent* event) } Settings settings; - int afterLaunch = settings.value("Web-URL-Settings/afterLaunch", 1).toInt(); + int afterLaunch = settings.value("Web-URL-Settings/afterLaunch", 3).toInt(); bool askOnClose = settings.value("Browser-Tabs-Settings/AskOnClosing", true).toBool(); if (afterLaunch == 3 && mApp->windowCount() == 1) { diff --git a/src/lib/other/qzsettings.cpp b/src/lib/other/qzsettings.cpp index 4193c9dd1..05ce6d399 100644 --- a/src/lib/other/qzsettings.cpp +++ b/src/lib/other/qzsettings.cpp @@ -45,7 +45,7 @@ void QzSettings::loadSettings() settings.beginGroup("Web-Browser-Settings"); defaultZoom = settings.value("DefaultZoom", 100).toInt(); - loadTabsOnActivation = settings.value("LoadTabsOnActivation", false).toBool(); + loadTabsOnActivation = settings.value("LoadTabsOnActivation", true).toBool(); autoOpenProtocols = settings.value("AutomaticallyOpenProtocols", QStringList()).toStringList(); blockedProtocols = settings.value("BlockOpeningProtocols", QStringList()).toStringList(); allowJsGeometryChange = settings.value("allowJavaScriptGeometryChange", true).toBool(); @@ -57,7 +57,7 @@ void QzSettings::loadSettings() settings.beginGroup("Browser-Tabs-Settings"); newTabPosition = settings.value("OpenNewTabsSelected", false).toBool() ? Qz::NT_SelectedTab : Qz::NT_NotSelectedTab; - tabsOnTop = settings.value("TabsOnTop", false).toBool(); + tabsOnTop = settings.value("TabsOnTop", true).toBool(); alwaysSwitchTabsWithWheel = settings.value("AlwaysSwitchTabsWithWheel", false).toBool(); settings.endGroup(); } diff --git a/src/lib/preferences/preferences.cpp b/src/lib/preferences/preferences.cpp index 3bd23d53a..bb48cf224 100644 --- a/src/lib/preferences/preferences.cpp +++ b/src/lib/preferences/preferences.cpp @@ -126,11 +126,11 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent) m_newTabUrl = settings.value("newTabUrl", "qupzilla:speeddial").toString(); ui->homepage->setText(m_homepage); ui->newTabUrl->setText(m_newTabUrl); - int afterLaunch = settings.value("afterLaunch", 1).toInt(); + int afterLaunch = settings.value("afterLaunch", 3).toInt(); settings.endGroup(); ui->afterLaunch->setCurrentIndex(afterLaunch); ui->checkUpdates->setChecked(settings.value("Web-Browser-Settings/CheckUpdates", DEFAULT_CHECK_UPDATES).toBool()); - ui->dontLoadTabsUntilSelected->setChecked(settings.value("Web-Browser-Settings/LoadTabsOnActivation", false).toBool()); + 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());