Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-29 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Yes, I'd prefer a single function that does the check in any case. Abdelrazak> This is difficult to do for now without a cleanup of Abdelrazak> LyXFunc or a reordering of object initialisation on start

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-28 Thread Andre Poenitz
On Thu, Sep 28, 2006 at 07:27:28AM +0200, Jean-Marc Lasgouttes wrote: > > "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: > > Andre> I recently wondered whether the current Cursor is The Right > Andre> Thing. > > Andre> It has 'model' parts (points to a place in a doc), yet also > Andre>

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-28 Thread Andre Poenitz
On Thu, Sep 28, 2006 at 09:30:17AM +0200, Abdelrazak Younes wrote: > >I guess in the long run this is not ideal... > > /me neither. I prefer simple class that do simple thing good. Cursor > should not be a gateway to everything in the LyX memory structure. It was a fairly uniform improvement ove

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-28 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: >> Actually, what this shows is that menus-before-expand and >> menus-after-expand should be two different classes (the first one >> should not know about status and the second one should not know >> about special menuitem kinds),

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-28 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Yes, I'd prefer a single function that does the check in any case. Abdelrazak> This is difficult to do for now without a cleanup of Abdelrazak> LyXFunc or a reordering of object initialisation on start

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-28 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: >> Yes, I'd prefer a single function that does the check in any case. Abdelrazak> This is difficult to do for now without a cleanup of Abdelrazak> LyXFunc or a reordering of object initialisation on start Abdelrazak> up. This is

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-28 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> I am not sure I understand what you mean here. Do you want Abdelrazak> a single function that does the check in any case? If yes, Abdelrazak> I am OK with that too and I don't think that there

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-28 Thread Abdelrazak Younes
Andre Poenitz wrote: On Wed, Sep 27, 2006 at 03:17:34PM +0200, Jean-Marc Lasgouttes wrote: Abdelrazak> - expandFormats needs to know if there is an opened Abdelrazak> document currently and for the need of Exporter functions. Abdelrazak> - expandFloatListInsert() and expandFloatInsert() need Abd

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-27 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> I recently wondered whether the current Cursor is The Right Andre> Thing. Andre> It has 'model' parts (points to a place in a doc), yet also Andre> conveys 'view' information in .bv(). Cursor is good in some cases, and dociterator

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-27 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | Indeed. This is no advantage. Better pass stuff down as arguments | instead of relying on globals. | | theApp->xxx is indeed current_view in disguise. I invested years of my life to get rid of that... -- Lgb

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-27 Thread Andre Poenitz
On Wed, Sep 27, 2006 at 03:17:34PM +0200, Jean-Marc Lasgouttes wrote: > Abdelrazak> - expandFormats needs to know if there is an opened > Abdelrazak> document currently and for the need of Exporter functions. > Abdelrazak> - expandFloatListInsert() and expandFloatInsert() need > Abdelrazak> some fl

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-27 Thread Georg Baum
Abdelrazak Younes wrote: > Georg Baum wrote: >> Abdelrazak Younes wrote: >> >>> For example, on a multipart document it would be a good idea to navigate >>> to whatever part of the document. So you don't want to restrain the >>> MenuBackend to be usable only for the currently visible Buffer but f

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-27 Thread Abdelrazak Younes
Georg Baum wrote: Abdelrazak Younes wrote: For example, on a multipart document it would be a good idea to navigate to whatever part of the document. So you don't want to restrain the MenuBackend to be usable only for the currently visible Buffer but for any Buffer that you pass to it. See ht

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-27 Thread Georg Baum
Abdelrazak Younes wrote: > For example, on a multipart document it would be a good idea to navigate > to whatever part of the document. So you don't want to restrain the > MenuBackend to be usable only for the currently visible Buffer but for > any Buffer that you pass to it. See http://www.lyx.o

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-27 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> No, add() do need to know what the current Buffer is, it Abdelrazak> just need some FuncRequest status via Abdelrazak> theApp->lyxFunc().getStatus(). Yes, but getStatus knows what the current

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-27 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> No, add() do need to know what the current Buffer is, it Abdelrazak> just need some FuncRequest status via Abdelrazak> theApp->lyxFunc().getStatus(). Yes, but getStatus knows what the current buffer is. >> However, s

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-27 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Simplified? The patch seems rather mechanical to me... What changes do you have in mind? Abdelrazak> I just mean that I simplified the interface of these Abdelrazak> expand functions (no Buffer passing

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-27 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: >> Simplified? The patch seems rather mechanical to me... What >> changes do you have in mind? Abdelrazak> I just mean that I simplified the interface of these Abdelrazak> expand functions (no Buffer passing) that's all. This i

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-27 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> What do you think of the attached. I even simplified some Abdelrazak> expand functions... Simplified? The patch seems rather mechanical to me... What changes do you have in mind? I just mean

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-27 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> What do you think of the attached. I even simplified some Abdelrazak> expand functions... Simplified? The patch seems rather mechanical to me... What changes do you have in mind? I think I'd still prefer a single add

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-26 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: What about removing the second parameter altogether? What are the cases when add() can be called with view == 0? Abdelrazak> in expandToc2: Abdelrazak> In expandToc: Abdelrazak> etc... I think it is

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-26 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Dear Jean-Marc, dear all, This change seems natural to me Abdelrazak> as none of the LyXView features are used. The expandFoo changes are correct, but I tend to think that the following is not

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-26 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: >> What about removing the second parameter altogether? What are the >> cases when add() can be called with view == 0? Abdelrazak> in expandToc2: Abdelrazak> In expandToc: Abdelrazak> etc... I think it is not passed there bec

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-26 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Dear Jean-Marc, dear all, This change seems natural to me Abdelrazak> as none of the LyXView features are used. The expandFoo changes are correct, but I tend to think

Re: [Patch] replace LyXView with Buffer in MenuBackend

2006-09-26 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Dear Jean-Marc, dear all, This change seems natural to me Abdelrazak> as none of the LyXView features are used. The expandFoo changes are correct, but I tend to think that the following is not the best: - Menu &