Jean-Marc Lasgouttes wrote:
"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:

 So the tabs should have the list of buffers in current view, while
the Menu should have all buffers, irrespectively of the view,
right? This hardly requires fancy widgets.

Abdelrazak> I am not talking about fancy widget but about reusing
Abdelrazak> widget that is already doing the job for us in Qt.

I have to admit that I have 0 trust that I understand what Qt is going
to do to widgets we give it to administer (in terms of sending update
signals of unpleasant things like that). This is why I prefer to do
things by hand.

I know how you feel but trust me on this: Qt4 is really well engineered, much better engineered than what we could achieve ourself on a part-time basis. Believe me, the interaction between all GUI components is very well thought out.

If you want an example, compare the hand-made qt3 QContentPane/QWorkArea (with its hand-made scrollbar) with the solution I used in qt4.



 You mean easier than adding a 'if' in a for loop?

Abdelrazak> Yes. An if loop in the menu stuff doesn't sound right.
Abdelrazak> This looks much better to my eyes:

Abdelrazak> GuiView::addWorkArea(GuiWorkArea *)

So GuiView has a list of workareas and build a tab strip from it. The
fact that the canvas under these tabs are handled by qt or done by
hand by us seems irrelevant to us.

Indeed. But if already done by Qt using the proper widget, why do you want to do all the communication between components by hand?


Abdelrazak> Don't forget that, right now the LyXView just pass the
Abdelrazak> setBuffer() call to the BufferView inside the WorkArea. Up
Abdelrazak> until now LyXView doesn't know about documents. The
Abdelrazak> BufferView knows and I would like to keep it that way.

I see.

I do not care that much about how things are done, anyway. I do not want
to start a long discussion about that.

Well, if you are going to do it I reckon you shall know the different alternative. But I remember you have been traumatized by a recent QFocusEvent experience ;-)


 Doing drag and drop of tabs between windows would be indeed very
funny. I do not think it deserves a lot of work, however.

Abdelrazak> It is not about drag and drop. A simple right-click
Abdelrazak> "Detach" on the tab would do fine for me.

This is lame :)

This highlight the fact that we lack a good model of what we are
trying to do. How do we open a document several times? How do we close
a view of a document without closing all views? And things like that.
It may be that you worked on this recently and I missed it.

As I have described in another thread, the option chosen in LyX WRT multiple-window is similar to emacs behaviour. Let me try to answer your questions:

1) You cannot not open twice the same document. Two windows showing the same document are really two views of the same document. If you want to have another version of the document, just save it with another name. One can view this as a limitation but I really like this behaviour because I've been bitten more than once by word allowing two versions of the same document living in the same session. I insist on this, word behaviour _is_ wrong! With LyX you can work at the same time on two different part of the same document independantly (well almost, sometimes the BufferView cursor is adjusted with the Buffer content changed in the other window).

2) Closing a window will not close _any_ document at all unless it is the last opened window. All opened document will be available in the View menu of all windows.

Abdel.

Reply via email to