]> git.lyx.org Git - features.git/commitdiff
preliminar support for multiple LyXView.
authorAbdelrazak Younes <younes@lyx.org>
Thu, 12 Oct 2006 14:58:57 +0000 (14:58 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Thu, 12 Oct 2006 14:58:57 +0000 (14:58 +0000)
* LyXFunc: new setLyXView() method

* LyXView::dispatch(): call LyXFunc::setLyXView() before lyx::dispatch()

What remains to be done is to ensure that every call to lyx::dispatch that is LyXView dependant is replaced with LyXView::dispatch().

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15308 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/LyXView.C
src/lyxfunc.C
src/lyxfunc.h

index 5199a14f0f2758b7bfc2f45bb3febeda6d851882..aa259905b60a0e6aec6cbf9fbd949b63af3ba504 100644 (file)
@@ -367,6 +367,7 @@ void LyXView::updateWindowTitle()
 
 void LyXView::dispatch(FuncRequest const & cmd)
 {
+       theLyXFunc().setLyXView(this);
        lyx::dispatch(cmd);
 }
 
index 798cb199b612049f6132e7e9167cf98235e08c09..5e09adac344417d7c0f8f6b2643f18cf71ac3362 100644 (file)
@@ -215,6 +215,11 @@ LyXFunc::LyXFunc(LyXView * lv)
 }
 
 
+void LyXFunc::setLyXView(LyXView * lv)
+{
+       owner = lv;
+}
+
 void LyXFunc::handleKeyFunc(kb_action action)
 {
        char c = encoded_last_key;
index f557e7787ad026ea3dc28db3f5a40f9bd1f35c57..399d0739d210142d16f52f42a897b0a087579d9e 100644 (file)
@@ -46,6 +46,9 @@ public:
        /// LyX dispatcher, executes lyx actions.
        void dispatch(FuncRequest const &);
 
+       ///
+       void setLyXView(LyXView * lv);
+
        /// return the status bar state string
        std::string const viewStatusMessage();