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();
}
++num;
}
- bv->text()->init(bv);
+ bv->buffer()->text().init(bv);
bv->putSelectionAt(doc_iterator_begin(buf.inset()), 0, false);
if (num)
buf.markDirty();
if (!found)
// emit message signal.
- bv->message(lyx::to_utf8(_("String not found!")));
+ bv->message(_("String not found!"));
}
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);
}
bool findNextChange(BufferView * bv)
{
- if (!bv->available())
+ if (!bv->buffer())
return false;
DocIterator cur = bv->cursor();