From: Sergey Kalinichev Date: Sat, 11 Mar 2017 17:33:41 +0000 (+0300) Subject: Revert "Make "show filter bar" a toggle action" X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/042b0c84099c062847fa2ed46a145624a96f90ca Revert "Make "show filter bar" a toggle action" This reverts commit edf8e5737316204e4a96e5edf4cba4cdec1c71ef. See https://git.reviewboard.kde.org/r/129662 for discussion --- diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 2784bd08c..431ecda44 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -552,9 +552,9 @@ void DolphinMainWindow::disableStopAction() actionCollection()->action(QStringLiteral("stop"))->setEnabled(false); } -void DolphinMainWindow::showFilterBar(bool show) +void DolphinMainWindow::showFilterBar() { - m_activeViewContainer->setFilterBarVisible(show); + m_activeViewContainer->setFilterBarVisible(true); } void DolphinMainWindow::toggleEditLocation() @@ -1108,7 +1108,7 @@ void DolphinMainWindow::setupActions() KStandardAction::home(this, SLOT(goHome()), actionCollection()); // setup 'Tools' menu - KToggleAction* showFilterBar = actionCollection()->add(QStringLiteral("show_filter_bar")); + QAction* showFilterBar = actionCollection()->addAction(QStringLiteral("show_filter_bar")); showFilterBar->setText(i18nc("@action:inmenu Tools", "Show Filter Bar")); showFilterBar->setIcon(QIcon::fromTheme(QStringLiteral("view-filter"))); actionCollection()->setDefaultShortcut(showFilterBar, Qt::CTRL | Qt::Key_I); diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index 219bcdcb9..d741eb21e 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -236,7 +236,7 @@ private slots: void enableStopAction(); void disableStopAction(); - void showFilterBar(bool show); + void showFilterBar(); /** * Toggles between edit and browse mode of the navigation bar. diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index a9825f47e..72ced931b 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -389,7 +389,6 @@ void DolphinViewContainer::setFilterBarVisible(bool visible) m_filterBar->show(); m_filterBar->setFocus(); m_filterBar->selectAll(); - emit showFilterBarChanged(true); } else { closeFilterBar(); }