]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfind.C
cleanup after svn hang-up, #undef CursorShape. Should be compilable ganin now.
[lyx.git] / src / lyxfind.C
index ce3d59b028ec9ac2f0a5f0cba609948dca570e54..d18ae9b58be9f32ad9a7906c8b8850484ba12152 100644 (file)
@@ -138,10 +138,10 @@ bool findChange(DocIterator & cur)
 bool searchAllowed(BufferView * bv, string const & str)
 {
        if (str.empty()) {
-               Alert::error(lyx::to_utf8(_("Search error")), lyx::to_utf8(_("Search string is empty")));
+               Alert::error(_("Search error"), _("Search string is empty"));
                return false;
        }
-       return bv->available();
+       return bv->buffer();
 }
 
 
@@ -192,7 +192,7 @@ int replaceAll(BufferView * bv,
                ++num;
        }
 
-       bv->text()->init(bv);
+       bv->buffer()->text().init(bv);
        bv->putSelectionAt(doc_iterator_begin(buf.inset()), 0, false);
        if (num)
                buf.markDirty();
@@ -289,7 +289,7 @@ void find(BufferView * bv, FuncRequest const & ev)
 
        if (!found)
                // emit message signal.
-               bv->message(lyx::to_utf8(_("String not found!")));
+               bv->message(_("String not found!"));
 }
 
 
@@ -320,14 +320,14 @@ void replace(BufferView * bv, FuncRequest const & ev)
 
        if (replace_count == 0) {
                // emit message signal.
-               buf->message(lyx::to_utf8(_("String not found!")));
+               buf->message(_("String not found!"));
        } else {
                if (replace_count == 1) {
                        // emit message signal.
-                       buf->message(lyx::to_utf8(_("String has been replaced.")));
+                       buf->message(_("String has been replaced."));
                } else {
-                       string str = convert<string>(replace_count);
-                       str += lyx::to_utf8(_(" strings have been replaced."));
+                       docstring str = convert<docstring>(replace_count);
+                       str += _(" strings have been replaced.");
                        // emit message signal.
                        buf->message(str);
                }
@@ -337,7 +337,7 @@ void replace(BufferView * bv, FuncRequest const & ev)
 
 bool findNextChange(BufferView * bv)
 {
-       if (!bv->available())
+       if (!bv->buffer())
                return false;
 
        DocIterator cur = bv->cursor();