]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Revert "Make "show filter bar" a toggle action"
authorSergey Kalinichev <kalinichev.so.0@gmail.com>
Sat, 11 Mar 2017 17:33:41 +0000 (20:33 +0300)
committerSergey Kalinichev <kalinichev.so.0@gmail.com>
Sun, 12 Mar 2017 08:48:12 +0000 (11:48 +0300)
This reverts commit edf8e5737316204e4a96e5edf4cba4cdec1c71ef.

See https://git.reviewboard.kde.org/r/129662 for discussion

src/dolphinmainwindow.cpp
src/dolphinmainwindow.h
src/dolphinviewcontainer.cpp

index 2784bd08c2ec29aa43bca31e73600e0d1b503214..431ecda443595ef8ed1fc054713f64dc97bbd2b4 100644 (file)
@@ -552,9 +552,9 @@ void DolphinMainWindow::disableStopAction()
     actionCollection()->action(QStringLiteral("stop"))->setEnabled(false);
 }
 
     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()
 }
 
 void DolphinMainWindow::toggleEditLocation()
@@ -1108,7 +1108,7 @@ void DolphinMainWindow::setupActions()
     KStandardAction::home(this, SLOT(goHome()), actionCollection());
 
     // setup 'Tools' menu
     KStandardAction::home(this, SLOT(goHome()), actionCollection());
 
     // setup 'Tools' menu
-    KToggleAction* showFilterBar = actionCollection()->add<KToggleAction>(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);
     showFilterBar->setText(i18nc("@action:inmenu Tools", "Show Filter Bar"));
     showFilterBar->setIcon(QIcon::fromTheme(QStringLiteral("view-filter")));
     actionCollection()->setDefaultShortcut(showFilterBar, Qt::CTRL | Qt::Key_I);
index 219bcdcb9b63f6a0d07e8af149a0e019bd48607a..d741eb21ed455aa84e1f85c05e3347c4fdc5b355 100644 (file)
@@ -236,7 +236,7 @@ private slots:
     void enableStopAction();
     void disableStopAction();
 
     void enableStopAction();
     void disableStopAction();
 
-    void showFilterBar(bool show);
+    void showFilterBar();
 
     /**
      * Toggles between edit and browse mode of the navigation bar.
 
     /**
      * Toggles between edit and browse mode of the navigation bar.
index a9825f47e48d05bcf95f441ce962b78ebd7c11a2..72ced931b709f21d95848b541372b618df8edab5 100644 (file)
@@ -389,7 +389,6 @@ void DolphinViewContainer::setFilterBarVisible(bool visible)
         m_filterBar->show();
         m_filterBar->setFocus();
         m_filterBar->selectAll();
         m_filterBar->show();
         m_filterBar->setFocus();
         m_filterBar->selectAll();
-        emit showFilterBarChanged(true);
     } else {
         closeFilterBar();
     }
     } else {
         closeFilterBar();
     }