#include "buffer.h"
#include "bufferlist.h"
#include "BufferView.h"
+#include "buffer_funcs.h"
#include "cursor.h"
#include "debug.h"
#include "gettext.h"
if (filename.empty()) {
FileDialog fileDlg(_("Choose a filename to save document as"),
- LFUN_WRITEAS,
+ LFUN_BUFFER_WRITE_AS,
make_pair(string(_("Documents|#o#O")),
string(lyxrc.document_path)),
make_pair(string(_("Templates|#T#t")),
Alert::warning(_("Unable to remove temporary directory"), msg);
}
- lyx_gui::exit();
+ lyx_gui::exit(0);
}
// Split argument by :
string name;
string tmpname = split(filename, name, ':');
-#ifdef __EMX__ // Fix me! lyx_cb.C may not be low level enough to allow this.
- if (name.length() == 1
- && isalpha(static_cast<unsigned char>(name[0]))
- && (prefixIs(tmpname, "/") || prefixIs(tmpname, "\\"))) {
- name += ':';
- name += token(tmpname, ':', 0);
- tmpname = split(tmpname, ':');
- }
-#endif
lyxerr[Debug::INFO] << "Arg is " << filename
<< "\nName is " << name
<< "\nTemplate is " << tmpname << endl;
- bv->newFile(name, tmpname);
+ Buffer * const b = newFile(name, tmpname);
+ if (b)
+ bv->setBuffer(b);
}
// Run configure in user lyx directory
Path p(package().user_support());
- string const configure_script =
- addName(package().system_support(), "configure.py");
- string const configure_command = "python " + quoteName(configure_script);
+ string const configure_command = package().configure_command();
Systemcall one;
one.startscript(Systemcall::Wait, configure_command);
p.pop();