// 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_->setClearButton(true);
filter_->setPlaceholderText(qt_("All avail. citations"));
filterBarL->addWidget(filter_, 0);
addPB, deletePB, upPB, downPB, &available_model_, &selected_model_, 1);
connect(selectionManager, SIGNAL(selectionChanged()),
this, SLOT(setCitedKeys()));
+ connect(selectionManager, SIGNAL(updateHook()),
+ this, SLOT(setCitedKeys()));
connect(selectionManager, SIGNAL(updateHook()),
this, SLOT(updateControls()));
connect(selectionManager, SIGNAL(okHook()),
this, SLOT(filterChanged(QString)));
connect(filter_, SIGNAL(returnPressed()),
this, SLOT(filterPressed()));
-#if (QT_VERSION < 0x050000)
- connect(filter_, SIGNAL(downPressed()),
- availableLV, SLOT(setFocus()));
-#else
connect(filter_, &FancyLineEdit::downPressed,
availableLV, [this](){ focusAndHighlight(availableLV); });
-#endif
connect(regexp_, SIGNAL(triggered()),
this, SLOT(regexChanged()));
connect(casesense_, SIGNAL(triggered()),
connect(instant_, SIGNAL(triggered(bool)),
this, SLOT(instantChanged(bool)));
-#if (QT_VERSION < 0x050000)
- selectedLV->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
-#else
selectedLV->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
-#endif
selectedLV->setToolTip(qt_("Ordered list of all cited references.\n"
"You can reorder, add and remove references with the buttons on the left."));
QString const after = textAfterED->text();
applyParams(choice, full, force, before, after);
-
- // If we have just created a citation inset, then we want to attach the
- // dialog to it. This (i) allows further modification of that inset and
- // (ii) prevents an additional click on Apply or OK from unexpectedly
- // creating another inset. (See #3964.)
- GuiView & view = const_cast<GuiView &>(lyxview());
- BufferView * bv = view.currentBufferView();
- // should have one, but just to be safe...
- if (bv) {
- // are we attached to an inset already?
- Inset * ins = bv->editedInset("citation");
- if (!ins) {
- // no, so we just inserted one, and now we are behind it.
- Cursor const & cur = bv->cursor();
- ins = cur.prevInset();
- if (ins)
- bv->editInset("citation", ins);
- }
- }
+ connectToNewInset();
}