- // Enabling is set in updateRefs. Disable for now in case no
- // call to updateContents follows (e.g. read-only documents).
- sortCB->setEnabled(false);
- caseSensitiveCB->setEnabled(false);
- caseSensitiveCB->setChecked(false);
- refsTW->setEnabled(false);
- gotoPB->setEnabled(false);
+ // The filter bar
+ filter_ = new FancyLineEdit(this);
+ filter_->setButtonPixmap(FancyLineEdit::Right, getPixmap("images/", "editclear", "svgz,png"));
+ filter_->setButtonVisible(FancyLineEdit::Right, true);
+ filter_->setButtonToolTip(FancyLineEdit::Right, qt_("Clear text"));
+ filter_->setAutoHideButton(FancyLineEdit::Right, true);
+ filter_->setPlaceholderText(qt_("All available labels"));
+ filter_->setToolTip(qt_("Enter string to filter the list of available labels"));
+#if (QT_VERSION < 0x050000)
+ connect(filter_, SIGNAL(downPressed()),
+ refsTW, SLOT(setFocus()));
+#else
+ connect(filter_, &FancyLineEdit::downPressed,
+ refsTW, [=](){ focusAndHighlight(refsTW); });
+#endif
+
+ filterBarL->addWidget(filter_, 0);
+ findKeysLA->setBuddy(filter_);
+
+ sortingCO->addItem(qt_("By Occurrence"), "unsorted");
+ sortingCO->addItem(qt_("Alphabetically (Case-Insensitive)"), "nocase");
+ sortingCO->addItem(qt_("Alphabetically (Case-Sensitive)"), "case");
+
+ buttonBox->button(QDialogButtonBox::Reset)->setText(qt_("&Update"));
+ buttonBox->button(QDialogButtonBox::Reset)->setToolTip(qt_("Update the label list"));