On 27/08/2009 22:08, Tommaso Cucinotta wrote:
Abdelrazak Younes ha scritto:
Tommaso Cucinotta wrote:
when clicking on a broken reference to label, the current reference is shown as BROKEN: also in the GuiRef.cpp dialog, but when clicking on it (i.e., confirming its value -- for example, because I'm going
Hello Tommaso,

Even if you are asking for comments (which is good) I see that you already committed this patch.
Hello, I didn't commit this patch. I just updated and the changes are still on my laptop (and the Trac history doesn't show commits by myself on GuiRef.cpp).

My guess is that you wanted to refer to the LyXView.{h,cpp} patch which introduces

 LyXView::documentBufferView()

where I actually violated the protocol, apologies.

Actually, I was probably mislead by a comment from Vincent, I thought he was talking about this GuiRef patch.

Things like GUI or something exclusively located on one of your own code (egg findadv) are OK for example. Things that touches core interfaces or functions are not OK.
Ok.
In the mean time, please revert.
Can you confirm, please, if you want me to revert Changeset 31203 ?


http://www.lyx.org/trac/changeset/31203/lyx-devel/trunk/src/frontends/LyXView.h

No, it's too late now, but don't do it again! just kidding :-)
I understand the reason of your patch and there is probably no other way unless we rework the dispatch() mechanism. More on that below...


On a related note, I just wanted to "complete" (but not commit) the patch by:

-) renaming the LyXView::view() method to LyXView::currentBufferView()
  [ or LyXView::selectedBufferView() might constitute an alternative ]

Why not documentBufferView() ?

I would also get rid of LyXView::buffer() and LyXView::documentBuffer(). Those can easily be accessed via bufferView()->buffer() and documentBufferView()->buffer(). Actually I have a patch that does just that that I didn't commit because I forgot to turn off QtCreator tab and whitespace handling...

-) renaming the LyXView::currentMainWorkArea() method to LyXView::currentDocumentWorkArea()

OK. On a related comment, the class Buffer could probaly be renamed to Document and BufferView to DocumentView but I am not sure...


(somebody suggested that the "main" keyword here is misleading, and I share this viewpoint, as it confuses with the "master" concept).

I agree but this is an interim solution. The real solution IMHO is to get rid of LyXFunc dispatch and let the Qt based classes handle the whole thing. Basically that means:

1) GuiApplication::dispatch(): handles what it can or delegate to GuiView::dispatch() onto the current window that has the focus. 2) GuiView::dispatch(): handles what it can or delegate selectively to either the current document workarea or the current embedded workarea that has the focus depending on the LFUN. 3) GuiWorkArea::dispatch() will then it handles what it can or delegate to BufferView::dispatch(). 4) BufferView::dispatch() will then it handles what it can or delegate to Inset::dispatch() if this is involving the current or to Buffer::dispatch() if this is a pure Buffer LFUN.

Abdel.

Reply via email to