mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 10:18:50 +00:00
FindAndReplace: more simplification.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27669 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b718b83074
commit
6f305f211d
@ -44,11 +44,10 @@ namespace lyx {
|
|||||||
namespace frontend {
|
namespace frontend {
|
||||||
|
|
||||||
FindAndReplace::FindAndReplace(GuiView & parent)
|
FindAndReplace::FindAndReplace(GuiView & parent)
|
||||||
: DockView(parent, "Find LyX", "Find LyX Dialog", Qt::RightDockWidgetArea),
|
: DockView(parent, "Find LyX", "Find LyX Dialog", Qt::RightDockWidgetArea)
|
||||||
parent_view_(parent)
|
|
||||||
{
|
{
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
find_work_area_->setGuiView(parent_view_);
|
find_work_area_->setGuiView(parent);
|
||||||
find_work_area_->init();
|
find_work_area_->init();
|
||||||
setFocusProxy(find_work_area_);
|
setFocusProxy(find_work_area_);
|
||||||
}
|
}
|
||||||
@ -144,13 +143,16 @@ bool FindAndReplace::initialiseParams(std::string const &)
|
|||||||
|
|
||||||
void FindAndReplace::find(bool backwards)
|
void FindAndReplace::find(bool backwards)
|
||||||
{
|
{
|
||||||
parent_view_.setCurrentWorkArea(parent_view_.currentMainWorkArea());
|
// FIXME: create a Dialog::returnFocus() or something instead of this:
|
||||||
|
GuiView & gv = const_cast<GuiView &>(lyxview());
|
||||||
|
gv.setCurrentWorkArea(gv.currentMainWorkArea());
|
||||||
|
// FIXME: This should be an LFUN.
|
||||||
findAdv(caseCB->isChecked(),
|
findAdv(caseCB->isChecked(),
|
||||||
wordsCB->isChecked(),
|
wordsCB->isChecked(),
|
||||||
backwards,
|
backwards,
|
||||||
expandMacrosCB->isChecked(),
|
expandMacrosCB->isChecked(),
|
||||||
ignoreFormatCB->isChecked());
|
ignoreFormatCB->isChecked());
|
||||||
parent_view_.currentMainWorkArea()->redraw();
|
gv.currentMainWorkArea()->redraw();
|
||||||
find_work_area_->setFocus();
|
find_work_area_->setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -174,9 +176,7 @@ void FindAndReplace::on_regexpInsertCombo_currentIndexChanged(int index)
|
|||||||
|
|
||||||
void FindAndReplace::on_closePB_clicked()
|
void FindAndReplace::on_closePB_clicked()
|
||||||
{
|
{
|
||||||
find_work_area_->disable();
|
dispatch(FuncRequest(LFUN_DIALOG_TOGGLE, "findreplaceadv"));
|
||||||
LYXERR(Debug::DEBUG, "Dispatching dialog-hide findreplaceadv" << std::endl);
|
|
||||||
parent_view_.dispatch(FuncRequest(LFUN_DIALOG_TOGGLE, "findreplaceadv"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,10 +65,6 @@ private:
|
|||||||
bool matchword, bool backwards,
|
bool matchword, bool backwards,
|
||||||
bool expandmacros, bool ignoreformat);
|
bool expandmacros, bool ignoreformat);
|
||||||
|
|
||||||
GuiView & parent_view_;
|
|
||||||
|
|
||||||
GuiWorkArea * searchWorkArea_; // The work area defining what to search
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// Apply changes
|
/// Apply changes
|
||||||
virtual void apply() {}
|
virtual void apply() {}
|
||||||
|
Loading…
Reference in New Issue
Block a user