updateFlags = Update::None;
break;
- case LFUN_FILE_NEW:
+ case LFUN_FILE_NEW: {
BOOST_ASSERT(lyx_view_);
- newFile(*lyx_view_, argument);
+ string name;
+ string tmpname = split(argument, name, ':'); // Split filename
+ Buffer * const b = newFile(name, tmpname);
+ if (b)
+ lyx_view_->setBuffer(b);
updateFlags = Update::None;
break;
+ }
case LFUN_FILE_OPEN:
BOOST_ASSERT(lyx_view_);
namespace Alert = frontend::Alert;
-//
-// Copyright CHT Software Service GmbH
-// Uwe C. Schroeder
-//
-// create new file with template
-// SERVERCMD !
-//
-void newFile(LyXView & lv, string const & filename)
-{
- // Split argument by :
- string name;
- string tmpname = split(filename, name, ':');
- LYXERR(Debug::INFO) << "Arg is " << filename
- << "\nName is " << name
- << "\nTemplate is " << tmpname << endl;
-
- Buffer * const b = newFile(name, tmpname);
- if (b)
- lv.setBuffer(b);
-}
-
-
// Insert plain text file (if filename is empty, prompt for one)
void insertPlaintextFile(BufferView * bv, string const & f, bool asParagraph)
{
docstring const getContentsOfPlaintextFile(BufferView * bv,
std::string const & f, bool asParagraph);
///
-void newFile(frontend::LyXView & lv, std::string const & filename);
-///
void insertPlaintextFile(BufferView * bv, std::string const & f, bool asParagraph);
///
void reconfigure(frontend::LyXView & lv, std::string const & option);