mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Adv F&R: indicate search direction
This commit is contained in:
parent
5ed0dddcf2
commit
a2a5656d07
@ -530,6 +530,12 @@ void FindAndReplaceWidget::on_replaceallPB_clicked()
|
||||
}
|
||||
|
||||
|
||||
void FindAndReplaceWidget::on_searchbackCB_clicked()
|
||||
{
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
|
||||
// Copy selected elements from bv's BufferParams to the dest_bv's
|
||||
static void copy_params(BufferView const & bv, BufferView & dest_bv) {
|
||||
Buffer const & doc_buf = bv.buffer();
|
||||
@ -577,6 +583,7 @@ bool FindAndReplaceWidget::initialiseParams(std::string const & /*params*/)
|
||||
void FindAndReplace::updateView()
|
||||
{
|
||||
widget_->updateGUI();
|
||||
widget_->updateButtons();
|
||||
}
|
||||
|
||||
|
||||
@ -633,6 +640,22 @@ void FindAndReplaceWidget::updateGUI()
|
||||
}
|
||||
|
||||
|
||||
void FindAndReplaceWidget::updateButtons()
|
||||
{
|
||||
if (searchbackCB->isChecked()) {
|
||||
findNextPB->setText(qt_("&< Find"));
|
||||
findNextPB->setToolTip(qt_("Find previous occurrence (Shift+Enter, forwards: Enter)"));
|
||||
replacePB->setText(qt_("< Rep&lace"));
|
||||
replacePB->setToolTip(qt_("Replace and find previous occurrence (Shift+Enter, forwards: Enter)"));
|
||||
} else {
|
||||
findNextPB->setText(qt_("Find &>"));
|
||||
findNextPB->setToolTip(qt_("Find next occurrence (Enter, backwards: Shift+Enter)"));
|
||||
replacePB->setText(qt_("Rep&lace >"));
|
||||
replacePB->setToolTip(qt_("Replace and find next occurrence (Enter, backwards: Shift+Enter)"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace frontend
|
||||
} // namespace lyx
|
||||
|
||||
|
@ -33,6 +33,7 @@ public:
|
||||
FindAndReplaceWidget(GuiView & view);
|
||||
bool initialiseParams(std::string const & params);
|
||||
void updateGUI();
|
||||
void updateButtons();
|
||||
|
||||
public Q_SLOTS:
|
||||
///
|
||||
@ -69,6 +70,7 @@ protected Q_SLOTS:
|
||||
void on_findNextPB_clicked();
|
||||
void on_replacePB_clicked();
|
||||
void on_replaceallPB_clicked();
|
||||
void on_searchbackCB_clicked();
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user