X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fchatviewsearchbar.cpp;h=a7e6ceda05142e8c85c605d3494348c384cb7e30;hb=981b43a699b4dd6da16e45f74d59443b68ad4b9c;hp=bfa79e1e065f29e7a5c293023f02a757c795aad9;hpb=793459d97e7081a4f3db94357a55d74859571445;p=quassel.git diff --git a/src/qtui/chatviewsearchbar.cpp b/src/qtui/chatviewsearchbar.cpp index bfa79e1e..a7e6ceda 100644 --- a/src/qtui/chatviewsearchbar.cpp +++ b/src/qtui/chatviewsearchbar.cpp @@ -37,15 +37,13 @@ ChatViewSearchBar::ChatViewSearchBar(QWidget *parent) hide(); - ActionCollection *coll = QtUi::actionCollection(); + ActionCollection *coll = QtUi::actionCollection("General"); - Action *toggleSearchBar = coll->add("toggleSearchBar"); + QAction *toggleSearchBar = coll->action("ToggleSearchBar"); connect(toggleSearchBar, SIGNAL(toggled(bool)), SLOT(setVisible(bool))); - toggleSearchBar->setText(tr("Show Search Bar")); - toggleSearchBar->setShortcut(Qt::CTRL + Qt::Key_F); - toggleSearchBar->setCheckable(true); - Action *hideSearchBar = coll->add("hideSearchBar", toggleSearchBar, SLOT(setChecked(bool))); // always false + Action *hideSearchBar = coll->add("HideSearchBar", toggleSearchBar, SLOT(setChecked(bool))); + hideSearchBar->setShortcutConfigurable(false); hideSearchBar->setShortcut(Qt::Key_Escape); connect(ui.hideButton, SIGNAL(clicked()), toggleSearchBar, SLOT(toggle()));