#include "support/filetools.h"
#include "support/path.h"
#include "support/syscall.h"
-#include "lyxfunc.h"
#include "gettext.h"
using std::vector;
{
if (lyxrc.use_gui) {
string const str = msg1 + ' ' + msg2 + ' ' + msg3;
- buf->getUser()->owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE,
- str);
+ buf->getUser()->owner()->message(str);
} else
lyxerr << msg1 << msg2 << msg3 << endl;
}
return;
}
- bv->owner()->getLyXFunc()
- ->Dispatch(LFUN_MESSAGE,
- _("Autosaving current document..."));
+ bv->owner()->message(_("Autosaving current document..."));
// create autosave filename
string fname = OnlyPath(bv->buffer()->fileName());
// It is dangerous to do this in the child,
// but safe in the parent, so...
if (pid == -1)
- bv->owner()->getLyXFunc()
- ->Dispatch(LFUN_MESSAGE,
- _("Autosave Failed!"));
+ bv->owner()->message(_("Autosave Failed!"));
}
}
if (pid == 0) { // we are the child so...
string label(arg);
ProhibitInput(bv);
if (label.empty()) {
-#ifndef NEW_INSETS
- LyXParagraph * par =
- bv->text->cursor.par()->FirstPhysicalPar();
-#else
LyXParagraph * par = bv->text->cursor.par();
-#endif
LyXLayout const * layout =
&textclasslist.Style(bv->buffer()->params.textclass,
par->GetLayout());
-#ifndef NEW_INSETS
- if (layout->latextype == LATEX_PARAGRAPH && par->previous_) {
- LyXParagraph * par2 = par->previous_->FirstPhysicalPar();
-#else
if (layout->latextype == LATEX_PARAGRAPH && par->previous()) {
LyXParagraph * par2 = par->previous();
-#endif
LyXLayout const * layout2 =
&textclasslist.Style(bv->buffer()->params.textclass,
par2->GetLayout());
string text = layout->latexname().substr(0, 3);
if (layout->latexname() == "theorem")
text = "thm"; // Create a correct prefix for prettyref
-#ifndef NEW_INSETS
- if (par->footnoteflag==LyXParagraph::OPEN_FOOTNOTE)
- switch (par->footnotekind) {
- case LyXParagraph::FIG:
- case LyXParagraph::WIDE_FIG:
- text = "fig";
- break;
- case LyXParagraph::TAB:
- case LyXParagraph::WIDE_TAB:
- text = "tab";
- break;
- case LyXParagraph::ALGORITHM:
- text = "alg";
- break;
- case LyXParagraph::FOOTNOTE:
- case LyXParagraph::MARGIN:
- break;
- }
-#endif
+
text += ":";
if (layout->latextype == LATEX_PARAGRAPH ||
lyxrc.label_init_length < 0)
// reconfigure the automatic settings.
void Reconfigure(BufferView * bv)
{
- bv->owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE,
- _("Running configure..."));
+ bv->owner()->message(_("Running configure..."));
// Run configure in user lyx directory
Path p(user_lyxdir);
Systemcalls one(Systemcalls::System,
AddName(system_lyxdir, "configure"));
p.pop();
- bv->owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE,
- _("Reloading configuration..."));
+ bv->owner()->message(_("Reloading configuration..."));
lyxrc.read(LibFileSearch(string(), "lyxrc.defaults"));
WriteAlert(_("The system has been reconfigured."),
_("You need to restart LyX to make use of any"),