#include "bufferview_funcs.h"
#include "debug.h"
#include "lastfiles.h"
-#include "frontends/LyXView.h"
#include "lyxrc.h"
#include "lyxtext.h"
#include "gettext.h"
#include "BufferView.h"
-#include "lyxtextclasslist.h"
#include "insets/insetlabel.h"
+#include "frontends/lyx_gui.h"
+#include "frontends/LyXView.h"
#include "frontends/Alert.h"
#include "frontends/FileDialog.h"
extern BufferList bufferlist;
// this should be static, but I need it in buffer.C
bool quitting; // flag, that we are quitting the program
-extern bool finished; // all cleanup done just let it run through now.
void ShowMessage(Buffer const * buf,
DestroyLyXTmpDir(system_tempdir);
- finished = true;
+ lyx_gui::exit();
}
string const tmp_ret = lyx::tempName(string(), "lyxauto");
if (!tmp_ret.empty()) {
- bv->buffer()->writeFile(tmp_ret, 1);
+ bv->buffer()->writeFile(tmp_ret);
// assume successful write of tmp_ret
if (!lyx::rename(tmp_ret, fname)) {
failed = true;
if (failed) {
// failed to write/rename tmp_ret so try writing direct
- if (!bv->buffer()->writeFile(fname, 1)) {
+ if (!bv->buffer()->writeFile(fname)) {
// It is dangerous to do this in the child,
// but safe in the parent, so...
if (pid == -1)
// create new file with template
// SERVERCMD !
//
-Buffer * NewLyxFile(string const & filename)
+Buffer * NewFile(string const & filename)
{
// Split argument by :
string name;
void MenuInsertLabel(BufferView * bv, string const & arg)
{
- string label(arg);
+ string label = arg;
bv->owner()->prohibitInput();
if (label.empty()) {
Paragraph * par = bv->getLyXText()->cursor.par();
pair<bool, string> result =
Alert::askForText(_("Enter new label to insert:"), text);
if (result.first) {
- label = frontStrip(strip(result.second));
+ label = trim(result.second);
}
}
if (!label.empty()) {