#include "support/systemcall.h"
#include "support/lstrings.h"
+#include "BoostFormat.h"
+
#include <fstream>
#include <algorithm>
#include <utility>
-#include <iostream>
using std::vector;
using std::ifstream;
FileDialog::Result result =
fileDlg.save(OnlyPath(fname),
- _("*.lyx|LyX Documents (*.lyx)"),
+ _("*.lyx| LyX Documents (*.lyx)"),
OnlyFilename(fname));
if (result.first == FileDialog::Later)
int AutoSaveBuffer::start()
{
- command_ = _("Auto-saving $$f");
- command_ = subst(command_, "$$f", fname_);
+#if USE_BOOST_FORMAT
+ command_ = boost::io::str(boost::format(_("Auto-saving %1$s")) % fname_);
+#else
+ command_ = _("Auto-saving ") + fname_;
+#endif
return runNonBlocking();
}
}
return pid;
}
-
+
} // namespace anon
// create autosave filename
string fname = bv->buffer()->filePath();
- fname += "#";
+ fname += '#';
fname += OnlyFilename(bv->buffer()->fileName());
- fname += "#";
+ fname += '#';
AutoSaveBuffer autosave(*bv, fname);
autosave.start();
-
+
bv->buffer()->markBakClean();
bv->owner()->resetAutosaveTimer();
}
ifstream ifs(fname.c_str());
if (!ifs) {
- Alert::err_alert(_("Error! Cannot open specified file: "),
+ Alert::err_alert(_("Error! Cannot open specified file:"),
MakeDisplayPath(fname, 50));
return string();
}
if (layout->latexname() == "theorem")
text = "thm"; // Create a correct prefix for prettyref
- text += ":";
+ text += ':';
if (layout->latextype == LATEX_PARAGRAPH ||
lyxrc.label_init_length < 0)
text.erase();