From 4b4f9880785cef91fc97fa94c7ad82a1f95e35e5 Mon Sep 17 00:00:00 2001 From: Heiko Becker Date: Mon, 8 Nov 2021 19:58:23 +0100 Subject: [PATCH 1/4] GIT_SILENT Upgrade release service version to 21.11.80. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec87cdecc..46860b480 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16) # KDE Application Version, managed by release script set (RELEASE_SERVICE_VERSION_MAJOR "21") set (RELEASE_SERVICE_VERSION_MINOR "11") -set (RELEASE_SERVICE_VERSION_MICRO "70") +set (RELEASE_SERVICE_VERSION_MICRO "80") set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}") project(Dolphin VERSION ${RELEASE_SERVICE_VERSION}) From 1657216474020b9b345409f423d75ee34156e1d3 Mon Sep 17 00:00:00 2001 From: Eugene Popov Date: Mon, 13 Sep 2021 18:34:40 +0300 Subject: [PATCH 2/4] Fix updating window and tab titles This MR fixes an issue where the window and tab titles don't properly handle creating/deleting/renaming items in the places bar, as well as switching to the Search mode. --- src/dolphinmainwindow.cpp | 2 ++ src/dolphintabwidget.cpp | 7 +++++++ src/dolphinviewcontainer.cpp | 18 ++++++++++++++++++ src/dolphinviewcontainer.h | 12 ++++++++++++ 4 files changed, 39 insertions(+) diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index bb05fef08..cdbeba172 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -2134,6 +2134,8 @@ void DolphinMainWindow::connectViewSignals(DolphinViewContainer* container) this, &DolphinMainWindow::slotWriteStateChanged); connect(container, &DolphinViewContainer::searchModeEnabledChanged, this, &DolphinMainWindow::updateSearchAction); + connect(container, &DolphinViewContainer::captionChanged, + this, &DolphinMainWindow::updateWindowTitle); const QAction* toggleSearchAction = actionCollection()->action(QStringLiteral("toggle_search")); connect(toggleSearchAction, &QAction::triggered, container, &DolphinViewContainer::setSearchModeEnabled); diff --git a/src/dolphintabwidget.cpp b/src/dolphintabwidget.cpp index 0e7012d3b..254e654a7 100644 --- a/src/dolphintabwidget.cpp +++ b/src/dolphintabwidget.cpp @@ -162,10 +162,17 @@ void DolphinTabWidget::openNewTab(const QUrl& primaryUrl, const QUrl& secondaryU this, &DolphinTabWidget::activeViewChanged); connect(tabPage, &DolphinTabPage::activeViewUrlChanged, this, &DolphinTabWidget::tabUrlChanged); + connect(tabPage->activeViewContainer(), &DolphinViewContainer::captionChanged, this, [this, tabPage]() { + const int tabIndex = indexOf(tabPage); + Q_ASSERT(tabIndex >= 0); + tabBar()->setTabText(tabIndex, tabName(tabPage)); + }); + int newTabIndex = -1; if (!GeneralSettings::openNewTabAfterLastTab()) { newTabIndex = currentIndex() + 1; } + insertTab(newTabIndex, tabPage, QIcon() /* loaded in tabInserted */, tabName(tabPage)); if (focusWidget) { diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 194fd774b..5520bf794 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -196,6 +196,17 @@ DolphinViewContainer::DolphinViewContainer(const QUrl& url, QWidget* parent) : } }); + KFilePlacesModel *placesModel = DolphinPlacesModelSingleton::instance().placesModel(); + connect(placesModel, &KFilePlacesModel::dataChanged, + this, &DolphinViewContainer::slotPlacesModelChanged); + connect(placesModel, &KFilePlacesModel::rowsInserted, + this, &DolphinViewContainer::slotPlacesModelChanged); + connect(placesModel, &KFilePlacesModel::rowsRemoved, + this, &DolphinViewContainer::slotPlacesModelChanged); + + connect(this, &DolphinViewContainer::searchModeEnabledChanged, + this, &DolphinViewContainer::captionChanged); + // Initialize kactivities resource instance #ifdef HAVE_KACTIVITIES @@ -791,6 +802,13 @@ void DolphinViewContainer::showErrorMessage(const QString& msg) showMessage(msg, Error); } +void DolphinViewContainer::slotPlacesModelChanged() +{ + if (!GeneralSettings::showFullPathInTitlebar() && !isSearchModeEnabled()) { + Q_EMIT captionChanged(); + } +} + bool DolphinViewContainer::isSearchUrl(const QUrl& url) const { return url.scheme().contains(QLatin1String("search")); diff --git a/src/dolphinviewcontainer.h b/src/dolphinviewcontainer.h index 1a92e1fa6..304c9958d 100644 --- a/src/dolphinviewcontainer.h +++ b/src/dolphinviewcontainer.h @@ -223,6 +223,12 @@ Q_SIGNALS: */ void writeStateChanged(bool isFolderWritable); + /** + * Is emitted when the Caption has been changed. + * @see DolphinViewContainer::caption() + */ + void captionChanged(); + private Q_SLOTS: /** * Updates the number of items (= number of files + number of @@ -349,6 +355,12 @@ private Q_SLOTS: */ void showErrorMessage(const QString& msg); + /** + * Is invoked when a KFilePlacesModel has been changed + * @see DolphinPlacesModelSingleton::instance().placesModel() + */ + void slotPlacesModelChanged(); + private: /** * @return True if the URL protocol is a search URL (e. g. baloosearch:// or filenamesearch://). From 077fdfc07408b56f528601acc0d05a69576e929c Mon Sep 17 00:00:00 2001 From: Heiko Becker Date: Mon, 22 Nov 2021 23:38:07 +0100 Subject: [PATCH 3/4] GIT_SILENT Upgrade release service version to 21.11.90. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 46860b480..abffbab33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16) # KDE Application Version, managed by release script set (RELEASE_SERVICE_VERSION_MAJOR "21") set (RELEASE_SERVICE_VERSION_MINOR "11") -set (RELEASE_SERVICE_VERSION_MICRO "80") +set (RELEASE_SERVICE_VERSION_MICRO "90") set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}") project(Dolphin VERSION ${RELEASE_SERVICE_VERSION}) From ec8f757f9c7b5eafcacbd9671df283d3f20f8a19 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Sun, 28 Nov 2021 21:44:56 +0100 Subject: [PATCH 4/4] [Status Bar] Don't mess with status bar visibility in extensions "Extensions" is additions to the status bar like free space bar and zoom slider which should hide while loading. The status bar itself should only show/hide based on the global setting. BUG: 443132 --- src/statusbar/dolphinstatusbar.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/statusbar/dolphinstatusbar.cpp b/src/statusbar/dolphinstatusbar.cpp index 8ac74e71f..87dce7e0a 100644 --- a/src/statusbar/dolphinstatusbar.cpp +++ b/src/statusbar/dolphinstatusbar.cpp @@ -124,6 +124,7 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent) : topLayout->addWidget(m_progressTextLabel); topLayout->addWidget(m_progressBar); + setVisible(GeneralSettings::showStatusBar()); setExtensionsVisible(true); setWhatsThis(xi18nc("@info:whatsthis Statusbar", "This is " "the Statusbar. It contains three elements " @@ -245,6 +246,7 @@ int DolphinStatusBar::zoomLevel() const void DolphinStatusBar::readSettings() { + setVisible(GeneralSettings::showStatusBar()); setExtensionsVisible(true); } @@ -321,15 +323,13 @@ void DolphinStatusBar::updateZoomSliderToolTip(int zoomLevel) void DolphinStatusBar::setExtensionsVisible(bool visible) { - bool showStatusBar = visible; bool showSpaceInfo = visible; bool showZoomSlider = visible; if (visible) { - showStatusBar = GeneralSettings::showStatusBar(); showSpaceInfo = GeneralSettings::showSpaceInfo(); showZoomSlider = GeneralSettings::showZoomSlider(); } - setVisible(showStatusBar); + m_spaceInfo->setShown(showSpaceInfo); m_spaceInfo->setVisible(showSpaceInfo); m_zoomSlider->setVisible(showZoomSlider);