X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/6e765826941e1858e7246deea3fa50c930a6df85..ec38f1cdb641f0b277100edd92b268ec856e2ece:/src/dolphinmainwindow.cpp diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index d1f1c1a86..6ca6e59f7 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -49,7 +49,6 @@ #endif #include "dolphin_generalsettings.h" -#include "dolphin_iconsmodesettings.h" #include "dolphin_searchsettings.h" #include @@ -96,6 +95,12 @@ #include #include +namespace { + // Used for GeneralSettings::version() to determine whether + // an updated version of Dolphin is running. + const int CurrentDolphinVersion = 200; +}; + /* * Menu shown when pressing the configure-button in the toolbar. */ @@ -166,7 +171,7 @@ DolphinMainWindow::DolphinMainWindow() : const DolphinSettings& settings = DolphinSettings::instance(); GeneralSettings* generalSettings = settings.generalSettings(); - const bool firstRun = generalSettings->firstRun(); + const bool firstRun = (generalSettings->version() < 200); if (firstRun) { generalSettings->setViewPropsTimestamp(QDateTime::currentDateTime()); } @@ -325,8 +330,10 @@ void DolphinMainWindow::openFiles(const QList& files) const int tabCount = m_viewTab.count(); for (int i = 0; i < tabCount; ++i) { m_viewTab[i].primaryView->view()->markUrlsAsSelected(files); + m_viewTab[i].primaryView->view()->markUrlAsCurrent(files.at(0)); if (m_viewTab[i].secondaryView) { m_viewTab[i].secondaryView->view()->markUrlsAsSelected(files); + m_viewTab[i].secondaryView->view()->markUrlAsCurrent(files.at(0)); } } } @@ -646,8 +653,7 @@ void DolphinMainWindow::closeEvent(QCloseEvent* event) } } - generalSettings->setFirstRun(false); - + generalSettings->setVersion(CurrentDolphinVersion); settings.save(); if (m_searchDockIsTemporaryVisible) { @@ -1838,8 +1844,7 @@ void DolphinMainWindow::setupDockWidgets() searchPanel, SLOT(setUrl(KUrl))); #endif - const bool firstRun = DolphinSettings::instance().generalSettings()->firstRun(); - if (firstRun) { + if (DolphinSettings::instance().generalSettings()->version() < 200) { infoDock->hide(); foldersDock->hide(); #ifndef Q_OS_WIN