* callback.cpp: newFile() takes a LyXView instead of a BufferView.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19564 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-08-14 15:32:58 +00:00
parent 550649963c
commit 59aa19e920
3 changed files with 4 additions and 4 deletions

View File

@ -1258,7 +1258,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
case LFUN_FILE_NEW: case LFUN_FILE_NEW:
BOOST_ASSERT(lyx_view_); BOOST_ASSERT(lyx_view_);
newFile(lyx_view_->view(), argument); newFile(*lyx_view_, argument);
break; break;
case LFUN_FILE_OPEN: case LFUN_FILE_OPEN:

View File

@ -324,7 +324,7 @@ void autoSave(BufferView * bv)
// create new file with template // create new file with template
// SERVERCMD ! // SERVERCMD !
// //
void newFile(BufferView * bv, string const & filename) void newFile(LyXView & lv, string const & filename)
{ {
// Split argument by : // Split argument by :
string name; string name;
@ -335,7 +335,7 @@ void newFile(BufferView * bv, string const & filename)
Buffer * const b = newFile(name, tmpname); Buffer * const b = newFile(name, tmpname);
if (b) if (b)
bv->setBuffer(b); lv.setBuffer(b);
} }

View File

@ -33,7 +33,7 @@ bool writeAs(Buffer * buffer, std::string const & filename = std::string());
/// ///
void autoSave(BufferView * bv); void autoSave(BufferView * bv);
/// ///
void newFile(BufferView * bv, std::string const & filename); void newFile(frontend::LyXView & lv, std::string const & filename);
/// ///
void insertPlaintextFile(BufferView * bv, std::string const & f, bool asParagraph); void insertPlaintextFile(BufferView * bv, std::string const & f, bool asParagraph);
/// read plain text file (if \p f is empty, prompt for a filename) /// read plain text file (if \p f is empty, prompt for a filename)