]> git.lyx.org Git - features.git/blobdiff - src/frontends/controllers/ControlSearch.C
*duck*
[features.git] / src / frontends / controllers / ControlSearch.C
index 224930cea91ef2ac5e3795a3804815376f6dc37c..867ef54425a9f521b0c1276b7bd96bcffa9aa1ee 100644 (file)
 #endif
 
 #include "ControlSearch.h"
-#include "ViewBase.h"
-#include "ButtonControllerBase.h"
-#include "Dialogs.h"
 #include "Liason.h"
 #include "buffer.h"
 #include "lyxfind.h"
-#include "debug.h"
 #include "gettext.h"
 #include "BufferView.h"
 
 
 #include "support/lstrings.h"
 
-#include <boost/bind.hpp>
-
 using Liason::setMinibuffer;
 
+
 ControlSearch::ControlSearch(LyXView & lv, Dialogs & d)
        : ControlDialogBD(lv, d)
-{
-       d_.showSearch = boost::bind(&ControlSearch::show, this);
-
-       // perhaps in the future we'd like a
-       // "search again" button/keybinding
-       // d_.searchAgain.connect(SigC::slot(this, &ControlSearch::FindNext));
-}
+{}
 
 
 void ControlSearch::find(string const & search,
                         bool casesensitive, bool matchword, bool forward) const
 {
-       bool const found = LyXFind(lv_.view(), search,
-                                  forward, false, casesensitive, matchword);
+       bool const found = lyxfind::LyXFind(lv_.view(), search,
+                                           forward, casesensitive,
+                                           matchword);
 
        if (!found)
                setMinibuffer(&lv_, _("String not found!"));
@@ -65,9 +55,10 @@ void ControlSearch::replace(string const & search, string const & replace,
        // move on to the next instance once the present instance has been
        // changed
        bool const once = !all;
-       int const replace_count = LyXReplace(lv_.view(),
-                                            search, replace, true, casesensitive,
-                                            matchword, all, once);
+       int const replace_count =
+               lyxfind::LyXReplace(lv_.view(),
+                                   search, replace, true, casesensitive,
+                                   matchword, all, once);
 
        if (replace_count == 0) {
                setMinibuffer(&lv_, _("String not found!"));