#include "lyxfr0.h"
#include "lyxfr1.h"
#include "lyx_gui_misc.h"
+#include "frontends/Dialogs.h" // redrawGUI
+#ifdef SIGC_CXX_NAMESPACES
+using SigC::slot;
+#endif
// callbacks for form form_search
void SearchCancelCB(FL_OBJECT * ob, long)
SearchForm::SearchForm()
: search_form(0)
-{}
+{
+ r_ = Dialogs::redrawGUI.connect(slot(this, &SearchForm::redraw));
+}
SearchForm::~SearchForm()
{
// The search_form should be closed and freed when SearchForm
// is destructed.
+ r_.disconnect();
+}
+
+
+void SearchForm::redraw()
+{
+ if (search_form && search_form->form_search->visible)
+ fl_redraw_form(search_form->form_search);
}
fl_raise_form(search_form->form_search);
} else {
fl_show_form(search_form->form_search,
- FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER,
+ FL_PLACE_MOUSE | FL_FREE_SIZE, FL_TRANSIENT,
_("Find & Replace")); // RVDK_PATCH_5
if (ow < 0) {
ow = search_form->form_search->w;
// Returns the value of the replace string in the form
-string SearchForm::ReplaceString() const
+string const SearchForm::ReplaceString() const
{
return fl_get_input(search_form->input_replace);
}