]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfr0.C
Dekels tabular/textinset patches
[lyx.git] / src / lyxfr0.C
index d397968b3e660594607b53c5e855fd30b47ea38a..21bd2a2e4a382d8b58e44dd169b4a64bf375a98c 100644 (file)
@@ -4,7 +4,7 @@
  *           LyX, The Document Processor
  *      
  *         Copyright 1995 Matthias Ettrich,
- *          Copyright 1995-1999 The LyX Team.
+ *          Copyright 1995-2000 The LyX Team.
  *
  * ====================================================== */
 
 #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)
@@ -57,13 +61,23 @@ void SearchReplaceCB(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);
 }
 
 
@@ -90,7 +104,7 @@ void SearchForm::StartSearch(LyXFindReplace * lfr)
                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;
@@ -102,7 +116,7 @@ void SearchForm::StartSearch(LyXFindReplace * lfr)
 
 
 // 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);
 }