]> git.lyx.org Git - lyx.git/commit
Refactor GuiApplication::getStatus().
authorVincent van Ravesteijn <vfr@lyx.org>
Fri, 16 Apr 2010 16:04:35 +0000 (16:04 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Fri, 16 Apr 2010 16:04:35 +0000 (16:04 +0000)
commite8fcc92d8f8ac061fc08ce75369abf77d5aa2eb5
treeb9baa36df59a03bc0f3d7dd9e47c02d6d0328542
parenteb9fb942143215a6d72e74143c116b01d28ea519
Refactor GuiApplication::getStatus().

* I didn't like the fact that the heart of the dispatch/status machinery is in the default clause of a long switch statement. Now, it is clear that we enter the app in getStatus, which then asks the GuiApplication itself, the GuiView, the current BufferView, the current Buffer, the document BufferView, the document Buffer,

* Shouldn't we let BufferView call the Buffer getStatus() functions ?,

* This also makes sure that if a command is not handled, it is turned off. Before r34164 this was caused by the default clause in BufferView,

* Now it is prevented that if the document BufferView is the same as the current BufferView, that the getStatus() functions are called twice,

* A warning can be outputted if the LFUN is not handled.

PS I want to do the same for the dispatch function.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34165 a592a061-630c-0410-9148-cb99ea01b6c8
src/frontends/qt4/GuiApplication.cpp
src/frontends/qt4/GuiApplication.h