┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-08-13 12:42:53 +0200
committerPeter Penz <[email protected]>2011-08-13 12:45:14 +0200
commitd11de1855fb1b93634b3b394b46fa446392c24c9 (patch)
treed93339e320e78906d01a659c124133963cea9958 /src
parent58ab93541c70de4fa7cbb90dc3423cfec556dc38 (diff)
Don't enable the search panel per default
Assure that the search panel also stays disabled when updating from an older Dolphin version. BUG: 279348 FIXED-IN: 4.7.1
Diffstat (limited to 'src')
-rw-r--r--src/dolphinmainwindow.cpp18
-rw-r--r--src/settings/dolphin_generalsettings.kcfg4
2 files changed, 20 insertions, 2 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index d1f1c1a86..f495cef54 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -96,6 +96,12 @@
#include <QToolButton>
#include <QSplitter>
+namespace {
+ // Used for GeneralSettings::version() to determine whether
+ // an updated version of Dolphin is running.
+ const int CurrentDolphinVersion = 171;
+};
+
/*
* Menu shown when pressing the configure-button in the toolbar.
*/
@@ -647,6 +653,7 @@ void DolphinMainWindow::closeEvent(QCloseEvent* event)
}
generalSettings->setFirstRun(false);
+ generalSettings->setVersion(CurrentDolphinVersion);
settings.save();
@@ -1838,17 +1845,24 @@ void DolphinMainWindow::setupDockWidgets()
searchPanel, SLOT(setUrl(KUrl)));
#endif
- const bool firstRun = DolphinSettings::instance().generalSettings()->firstRun();
+ const GeneralSettings* generalSettings = DolphinSettings::instance().generalSettings();
+ const bool firstRun = generalSettings->firstRun();
if (firstRun) {
infoDock->hide();
foldersDock->hide();
#ifndef Q_OS_WIN
terminalDock->hide();
#endif
+ }
+
#ifdef HAVE_NEPOMUK
+ // The search dock has been introduced with Dolphin 1.7.0. Hide it per
+ // default when updating from an older Dolphin version or when Dolphin is
+ // started the first time.
+ if (firstRun || generalSettings->version() < 170) {
searchDock->hide();
-#endif
}
+#endif
// Setup "Places"
DolphinDockWidget* placesDock = new DolphinDockWidget(i18nc("@title:window", "Places"));
diff --git a/src/settings/dolphin_generalsettings.kcfg b/src/settings/dolphin_generalsettings.kcfg
index ee219d953..c5f6f7456 100644
--- a/src/settings/dolphin_generalsettings.kcfg
+++ b/src/settings/dolphin_generalsettings.kcfg
@@ -24,6 +24,10 @@
<label>Is the application started the first time (internal setting not shown in the UI)</label>
<default>true</default>
</entry>
+ <entry name="Version" type="Int">
+ <label>Internal version of Dolphin, containing 3 digits for mayor, minor, bugfix</label>
+ <default>0</default>
+ </entry>
<entry name="ModifiedStartupSettings" type="Bool">
<label>Have the startup settings been modified (internal setting not shown in the UI)</label>
<default>false</default>