]> git.lyx.org Git - features.git/commitdiff
* callback.cpp: newFile() takes a LyXView instead of a BufferView.
authorAbdelrazak Younes <younes@lyx.org>
Tue, 14 Aug 2007 15:32:58 +0000 (15:32 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 14 Aug 2007 15:32:58 +0000 (15:32 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19564 a592a061-630c-0410-9148-cb99ea01b6c8

src/LyXFunc.cpp
src/callback.cpp
src/callback.h

index 4bc66bfb920f5b3b6ff3bec6f561639c799acb6c..cc3d5fe0269e45950ad167677c4c926699e5bec9 100644 (file)
@@ -1258,7 +1258,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
 
                case LFUN_FILE_NEW:
                        BOOST_ASSERT(lyx_view_);
-                       newFile(lyx_view_->view(), argument);
+                       newFile(*lyx_view_, argument);
                        break;
 
                case LFUN_FILE_OPEN:
index 022181e7444743f108d0148f8fd18e87610f9c99..d0ee831216d7674a38ebb0bcf2d3b13f47a3e1c1 100644 (file)
@@ -324,7 +324,7 @@ void autoSave(BufferView * bv)
 // create new file with template
 // SERVERCMD !
 //
-void newFile(BufferView * bv, string const & filename)
+void newFile(LyXView & lv, string const & filename)
 {
        // Split argument by :
        string name;
@@ -335,7 +335,7 @@ void newFile(BufferView * bv, string const & filename)
 
        Buffer * const b = newFile(name, tmpname);
        if (b)
-               bv->setBuffer(b);
+               lv.setBuffer(b);
 }
 
 
index df11f506c959b97398907f887a567c5d5ea2e6fd..716e30b942dbe2734c5cf196e911eafc705951ab 100644 (file)
@@ -33,7 +33,7 @@ bool writeAs(Buffer * buffer, std::string const & filename = std::string());
 ///
 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);
 /// read plain text file (if \p f is empty, prompt for a filename)