mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
shuffle code around.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20703 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
453bc40033
commit
65d1912cfe
@ -1287,11 +1287,16 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
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_);
|
||||
|
@ -91,28 +91,6 @@ using frontend::LyXView;
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -30,8 +30,6 @@ extern bool quitting;
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user