Hello,
The subject says it all. This patch is obviously the right thing to do
so I will commit soon.
Abdel.
Index: BufferView_pimpl.C
===================================================================
--- BufferView_pimpl.C (revision 14826)
+++ BufferView_pimpl.C (working copy)
@@ -630,7 +630,8 @@
cursor_.paragraph().id(),
cursor_.pos());
if (i > 0)
- owner_->message(bformat(_("Saved bookmark %1$d"), i));
+ // emit message signal.
+ buffer_->message(bformat(_("Saved bookmark %1$d"), i));
}
@@ -663,7 +664,8 @@
bv_->setCursor(makeDocIterator(par, min(par->size(),
saved_positions[i].par_pos)));
if (i > 0)
- owner_->message(bformat(_("Moved to bookmark %1$d"), i));
+ // emit message signal.
+ buffer_->message(bformat(_("Moved to bookmark %1$d"), i));
}
@@ -752,7 +754,8 @@
// check selected filename
if (filename.empty()) {
- owner_->message(_("Canceled."));
+ // emit message signal.
+ buffer_->message(_("Canceled."));
return;
}
}
@@ -762,7 +765,8 @@
filename = fileSearch(string(), filename, "lyx");
string const disp_fn = makeDisplayPath(filename);
- owner_->message(bformat(_("Inserting document %1$s..."), disp_fn));
+ // emit message signal.
+ buffer_->message(bformat(_("Inserting document %1$s..."), disp_fn));
string res;
Buffer buf("", false);
@@ -776,7 +780,8 @@
} else
res = _("Could not insert document %1$s");
- owner_->message(bformat(res, disp_fn));
+ // emit message signal.
+ buffer_->message(bformat(res, disp_fn));
buffer_->errors("Parse");
resizeCurrentBuffer();
}
Index: lyx_cb.C
===================================================================
--- lyx_cb.C (revision 14826)
+++ lyx_cb.C (working copy)
@@ -285,7 +285,8 @@
// It is dangerous to do this in the child,
// but safe in the parent, so...
if (pid == -1)
- bv_.owner()->message(_("Autosave
failed!"));
+ // emit message signal.
+ bv_.buffer()->message(_("Autosave
failed!"));
}
}
if (pid == 0) { // we are the child so...
@@ -311,7 +312,8 @@
return;
}
- bv->owner()->message(_("Autosaving current document..."));
+ // emit message signal.
+ bv->buffer()->message(_("Autosaving current document..."));
// create autosave filename
string fname = bv->buffer()->filePath();
@@ -436,7 +438,8 @@
// reconfigure the automatic settings.
void reconfigure(BufferView * bv)
{
- bv->owner()->message(_("Running configure..."));
+ // emit message signal.
+ bv->buffer()->message(_("Running configure..."));
// Run configure in user lyx directory
Path p(package().user_support());
@@ -444,7 +447,8 @@
Systemcall one;
one.startscript(Systemcall::Wait, configure_command);
p.pop();
- bv->owner()->message(_("Reloading configuration..."));
+ // emit message signal.
+ bv->buffer()->message(_("Reloading configuration..."));
lyxrc.read(libFileSearch(string(), "lyxrc.defaults"));
// Re-read packages.lst
LaTeXFeatures::getAvailable();
Index: lyxfind.C
===================================================================
--- lyxfind.C (revision 14826)
+++ lyxfind.C (working copy)
@@ -288,7 +288,8 @@
casesensitive, matchword, forward);
if (!found)
- bv->owner()->message(_("String not found!"));
+ // emit message signal.
+ bv->buffer()->message(_("String not found!"));
}
@@ -311,21 +312,24 @@
bool all = parse_bool(howto);
bool forward = parse_bool(howto);
- LyXView * lv = bv->owner();
+ Buffer * buf = bv->buffer();
int const replace_count = all
? ::replaceAll(bv, search, replace, casesensitive, matchword)
: ::replace(bv, search, replace, casesensitive, matchword,
forward);
if (replace_count == 0) {
- lv->message(_("String not found!"));
+ // emit message signal.
+ buf->message(_("String not found!"));
} else {
if (replace_count == 1) {
- lv->message(_("String has been replaced."));
+ // emit message signal.
+ buf->message(_("String has been replaced."));
} else {
string str = convert<string>(replace_count);
str += _(" strings have been replaced.");
- lv->message(str);
+ // emit message signal.
+ buf->message(str);
}
}
}