Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Martin Vermeer wrote: This is actually an ugly corner of LyX. There is no clean way to modify the layout file tree in cases like this. But of course one could take it philosophically and say that, just like with ERT, you're on your own if you write your own layouts. I suppose it would be better if we had a graphical interface to create layout files: then those would always include, or offer to include whatever you need for a certain version of LyX to get certain functionality. (But then, how to move old layout files forward? Allow only one level of include?) If this problem is solvable for single-level include then it is easy enough for multi-include too - one just have to do the extra work of traversing the inclusion tree once. Then you have a list of included files that can be processed as in the single-level case. Helge Hafting
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Martin Vermeer wrote: This is actually an ugly corner of LyX. There is no clean way to modify the layout file tree in cases like this. But of course one could take it philosophically and say that, just like with ERT, you're on your own if you write your own layouts. I suppose it would be better if we had a graphical interface to create layout files: then those would always include, or offer to include whatever you need for a certain version of LyX to get certain functionality. (But then, how to move old layout files forward? Allow only one level of include?) If this problem is solvable for single-level include then it is easy enough for multi-include too - one just have to do the extra work of traversing the inclusion tree once. Then you have a list of included files that can be processed as in the single-level case. Helge Hafting
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Sat, Aug 25, 2007 at 10:03:36PM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Btw, did you notice that when using the IEEEtran class, ERT becomes EBT? No... disable the pixmap cache maybe? ;-) I meant that the text in an ERT is not Red but Black, and the font is also wrong. This happens for a few classes, eg. IEEEtran and AMS. -- Enrico
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Sun, Aug 26, 2007 at 09:09:28AM +0200, Enrico Forestieri wrote: On Sat, Aug 25, 2007 at 10:03:36PM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Btw, did you notice that when using the IEEEtran class, ERT becomes EBT? No... disable the pixmap cache maybe? ;-) I meant that the text in an ERT is not Red but Black, and the font is also wrong. This happens for a few classes, eg. IEEEtran and AMS. This is due to the configurable insets patch. You should modify the layout files involved to include the file 'stdinsets.inc'. - Martin
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: I meant that the text in an ERT is not Red but Black, and the font is also wrong. This happens for a few classes, eg. IEEEtran and AMS. Maybe related to Martin's and Richard's layout works? Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Martin Vermeer wrote: On Sun, Aug 26, 2007 at 09:09:28AM +0200, Enrico Forestieri wrote: On Sat, Aug 25, 2007 at 10:03:36PM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Btw, did you notice that when using the IEEEtran class, ERT becomes EBT? No... disable the pixmap cache maybe? ;-) I meant that the text in an ERT is not Red but Black, and the font is also wrong. This happens for a few classes, eg. IEEEtran and AMS. This is due to the configurable insets patch. You should modify the layout files involved to include the file 'stdinsets.inc'. I guess we need layout2layout support then, don't we? Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Sun, Aug 26, 2007 at 10:20:25AM +0200, Abdelrazak Younes wrote: Martin Vermeer wrote: On Sun, Aug 26, 2007 at 09:09:28AM +0200, Enrico Forestieri wrote: On Sat, Aug 25, 2007 at 10:03:36PM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Btw, did you notice that when using the IEEEtran class, ERT becomes EBT? No... disable the pixmap cache maybe? ;-) I meant that the text in an ERT is not Red but Black, and the font is also wrong. This happens for a few classes, eg. IEEEtran and AMS. This is due to the configurable insets patch. You should modify the layout files involved to include the file 'stdinsets.inc'. I guess we need layout2layout support then, don't we? Abdel. I just updated all the remaining files to version 5, so LyX doesn't have to do it when starting up. Also I added stdinset.inc everywhere I felt confident doing so. Some may be missing still. - Martin
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Martin Vermeer wrote: On Sun, Aug 26, 2007 at 10:20:25AM +0200, Abdelrazak Younes wrote: Martin Vermeer wrote: On Sun, Aug 26, 2007 at 09:09:28AM +0200, Enrico Forestieri wrote: On Sat, Aug 25, 2007 at 10:03:36PM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Btw, did you notice that when using the IEEEtran class, ERT becomes EBT? No... disable the pixmap cache maybe? ;-) I meant that the text in an ERT is not Red but Black, and the font is also wrong. This happens for a few classes, eg. IEEEtran and AMS. This is due to the configurable insets patch. You should modify the layout files involved to include the file 'stdinsets.inc'. I guess we need layout2layout support then, don't we? Abdel. I just updated all the remaining files to version 5, so LyX doesn't have to do it when starting up. Also I added stdinset.inc everywhere I felt confident doing so. Some may be missing still. What about user created layouts? Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Sun, Aug 26, 2007 at 12:15:03PM +0200, Abdelrazak Younes wrote: Martin Vermeer wrote: On Sun, Aug 26, 2007 at 10:20:25AM +0200, Abdelrazak Younes wrote: Martin Vermeer wrote: On Sun, Aug 26, 2007 at 09:09:28AM +0200, Enrico Forestieri wrote: On Sat, Aug 25, 2007 at 10:03:36PM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Btw, did you notice that when using the IEEEtran class, ERT becomes EBT? No... disable the pixmap cache maybe? ;-) I meant that the text in an ERT is not Red but Black, and the font is also wrong. This happens for a few classes, eg. IEEEtran and AMS. This is due to the configurable insets patch. You should modify the layout files involved to include the file 'stdinsets.inc'. I guess we need layout2layout support then, don't we? Abdel. I just updated all the remaining files to version 5, so LyX doesn't have to do it when starting up. Also I added stdinset.inc everywhere I felt confident doing so. Some may be missing still. What about user created layouts? They should remember to add stdinsets.inc. I don't believe there is an easy automated way for this, as some layout files do it through stdclass.inc, scrclass.inc etc. Those user layouts that include these, should be safe. - Martin
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Martin Vermeer wrote: On Sun, Aug 26, 2007 at 12:15:03PM +0200, Abdelrazak Younes wrote: Martin Vermeer wrote: On Sun, Aug 26, 2007 at 10:20:25AM +0200, Abdelrazak Younes wrote: Martin Vermeer wrote: On Sun, Aug 26, 2007 at 09:09:28AM +0200, Enrico Forestieri wrote: On Sat, Aug 25, 2007 at 10:03:36PM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Btw, did you notice that when using the IEEEtran class, ERT becomes EBT? No... disable the pixmap cache maybe? ;-) I meant that the text in an ERT is not Red but Black, and the font is also wrong. This happens for a few classes, eg. IEEEtran and AMS. This is due to the configurable insets patch. You should modify the layout files involved to include the file 'stdinsets.inc'. I guess we need layout2layout support then, don't we? Abdel. I just updated all the remaining files to version 5, so LyX doesn't have to do it when starting up. Also I added stdinset.inc everywhere I felt confident doing so. Some may be missing still. What about user created layouts? They should remember to add stdinsets.inc. I don't believe there is an easy automated way for this, as some layout files do it through stdclass.inc, scrclass.inc etc. Those user layouts that include these, should be safe. OK, thanks for the explanation. Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Sun, Aug 26, 2007 at 12:31:50PM +0200, Abdelrazak Younes wrote: Martin Vermeer wrote: On Sun, Aug 26, 2007 at 12:15:03PM +0200, Abdelrazak Younes wrote: Martin Vermeer wrote: On Sun, Aug 26, 2007 at 10:20:25AM +0200, Abdelrazak Younes wrote: Martin Vermeer wrote: On Sun, Aug 26, 2007 at 09:09:28AM +0200, Enrico Forestieri wrote: On Sat, Aug 25, 2007 at 10:03:36PM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Btw, did you notice that when using the IEEEtran class, ERT becomes EBT? No... disable the pixmap cache maybe? ;-) I meant that the text in an ERT is not Red but Black, and the font is also wrong. This happens for a few classes, eg. IEEEtran and AMS. This is due to the configurable insets patch. You should modify the layout files involved to include the file 'stdinsets.inc'. I guess we need layout2layout support then, don't we? Abdel. I just updated all the remaining files to version 5, so LyX doesn't have to do it when starting up. Also I added stdinset.inc everywhere I felt confident doing so. Some may be missing still. What about user created layouts? They should remember to add stdinsets.inc. I don't believe there is an easy automated way for this, as some layout files do it through stdclass.inc, scrclass.inc etc. Those user layouts that include these, should be safe. OK, thanks for the explanation. This is actually an ugly corner of LyX. There is no clean way to modify the layout file tree in cases like this. But of course one could take it philosophically and say that, just like with ERT, you're on your own if you write your own layouts. I suppose it would be better if we had a graphical interface to create layout files: then those would always include, or offer to include whatever you need for a certain version of LyX to get certain functionality. (But then, how to move old layout files forward? Allow only one level of include?) - Martin
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Sun, Aug 26, 2007 at 10:19:14AM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: I meant that the text in an ERT is not Red but Black, and the font is also wrong. This happens for a few classes, eg. IEEEtran and AMS. Maybe related to Martin's and Richard's layout works? Yes, I suspected that. Only wanted to make a witty remark. -- Enrico
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Sun, Aug 26, 2007 at 11:17:23AM +0300, Martin Vermeer wrote: On Sun, Aug 26, 2007 at 09:09:28AM +0200, Enrico Forestieri wrote: On Sat, Aug 25, 2007 at 10:03:36PM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Btw, did you notice that when using the IEEEtran class, ERT becomes EBT? No... disable the pixmap cache maybe? ;-) I meant that the text in an ERT is not Red but Black, and the font is also wrong. This happens for a few classes, eg. IEEEtran and AMS. This is due to the configurable insets patch. You should modify the layout files involved to include the file 'stdinsets.inc'. Thanks for the suggestion, Martin. -- Enrico
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Sat, Aug 25, 2007 at 10:03:36PM +0200, Abdelrazak Younes wrote: > Enrico Forestieri wrote: > > Btw, did you notice that when using the IEEEtran class, ERT becomes EBT? > > No... disable the pixmap cache maybe? ;-) I meant that the text in an ERT is not Red but Black, and the font is also wrong. This happens for a few classes, eg. IEEEtran and AMS. -- Enrico
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Sun, Aug 26, 2007 at 09:09:28AM +0200, Enrico Forestieri wrote: > On Sat, Aug 25, 2007 at 10:03:36PM +0200, Abdelrazak Younes wrote: > > > Enrico Forestieri wrote: > > > > Btw, did you notice that when using the IEEEtran class, ERT becomes EBT? > > > > No... disable the pixmap cache maybe? > > ;-) > > I meant that the text in an ERT is not Red but Black, and the font > is also wrong. This happens for a few classes, eg. IEEEtran and AMS. This is due to the configurable insets patch. You should modify the layout files involved to include the file 'stdinsets.inc'. - Martin
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: I meant that the text in an ERT is not Red but Black, and the font is also wrong. This happens for a few classes, eg. IEEEtran and AMS. Maybe related to Martin's and Richard's layout works? Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Martin Vermeer wrote: On Sun, Aug 26, 2007 at 09:09:28AM +0200, Enrico Forestieri wrote: On Sat, Aug 25, 2007 at 10:03:36PM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Btw, did you notice that when using the IEEEtran class, ERT becomes EBT? No... disable the pixmap cache maybe? ;-) I meant that the text in an ERT is not Red but Black, and the font is also wrong. This happens for a few classes, eg. IEEEtran and AMS. This is due to the configurable insets patch. You should modify the layout files involved to include the file 'stdinsets.inc'. I guess we need layout2layout support then, don't we? Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Sun, Aug 26, 2007 at 10:20:25AM +0200, Abdelrazak Younes wrote: > Martin Vermeer wrote: > > On Sun, Aug 26, 2007 at 09:09:28AM +0200, Enrico Forestieri wrote: > >> On Sat, Aug 25, 2007 at 10:03:36PM +0200, Abdelrazak Younes wrote: > >> > >>> Enrico Forestieri wrote: > Btw, did you notice that when using the IEEEtran class, ERT becomes EBT? > >>> No... disable the pixmap cache maybe? > >> ;-) > >> > >> I meant that the text in an ERT is not Red but Black, and the font > >> is also wrong. This happens for a few classes, eg. IEEEtran and AMS. > > This is due to the configurable insets patch. You should modify the layout > > files involved to include the file 'stdinsets.inc'. > > I guess we need layout2layout support then, don't we? > > Abdel. I just updated all the remaining files to version 5, so LyX doesn't have to do it when starting up. Also I added stdinset.inc everywhere I felt confident doing so. Some may be missing still. - Martin
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Martin Vermeer wrote: On Sun, Aug 26, 2007 at 10:20:25AM +0200, Abdelrazak Younes wrote: Martin Vermeer wrote: On Sun, Aug 26, 2007 at 09:09:28AM +0200, Enrico Forestieri wrote: On Sat, Aug 25, 2007 at 10:03:36PM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Btw, did you notice that when using the IEEEtran class, ERT becomes EBT? No... disable the pixmap cache maybe? ;-) I meant that the text in an ERT is not Red but Black, and the font is also wrong. This happens for a few classes, eg. IEEEtran and AMS. This is due to the configurable insets patch. You should modify the layout files involved to include the file 'stdinsets.inc'. I guess we need layout2layout support then, don't we? Abdel. I just updated all the remaining files to version 5, so LyX doesn't have to do it when starting up. Also I added stdinset.inc everywhere I felt confident doing so. Some may be missing still. What about user created layouts? Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Sun, Aug 26, 2007 at 12:15:03PM +0200, Abdelrazak Younes wrote: > Martin Vermeer wrote: > > On Sun, Aug 26, 2007 at 10:20:25AM +0200, Abdelrazak Younes wrote: > >> Martin Vermeer wrote: > >>> On Sun, Aug 26, 2007 at 09:09:28AM +0200, Enrico Forestieri wrote: > On Sat, Aug 25, 2007 at 10:03:36PM +0200, Abdelrazak Younes wrote: > > > Enrico Forestieri wrote: > >> Btw, did you notice that when using the IEEEtran class, ERT becomes > >> EBT? > > No... disable the pixmap cache maybe? > ;-) > > I meant that the text in an ERT is not Red but Black, and the font > is also wrong. This happens for a few classes, eg. IEEEtran and AMS. > >>> This is due to the configurable insets patch. You should modify the > >>> layout files involved to include the file 'stdinsets.inc'. > >> I guess we need layout2layout support then, don't we? > >> > >> Abdel. > > I just updated all the remaining files to version 5, so LyX doesn't > > have to do it when starting up. Also I added stdinset.inc everywhere > > I felt confident doing so. Some may be missing still. > > What about user created layouts? > They should remember to add stdinsets.inc. I don't believe there is an easy automated way for this, as some layout files do it through stdclass.inc, scrclass.inc etc. Those user layouts that include these, should be safe. - Martin
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Martin Vermeer wrote: On Sun, Aug 26, 2007 at 12:15:03PM +0200, Abdelrazak Younes wrote: Martin Vermeer wrote: On Sun, Aug 26, 2007 at 10:20:25AM +0200, Abdelrazak Younes wrote: Martin Vermeer wrote: On Sun, Aug 26, 2007 at 09:09:28AM +0200, Enrico Forestieri wrote: On Sat, Aug 25, 2007 at 10:03:36PM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Btw, did you notice that when using the IEEEtran class, ERT becomes EBT? No... disable the pixmap cache maybe? ;-) I meant that the text in an ERT is not Red but Black, and the font is also wrong. This happens for a few classes, eg. IEEEtran and AMS. This is due to the configurable insets patch. You should modify the layout files involved to include the file 'stdinsets.inc'. I guess we need layout2layout support then, don't we? Abdel. I just updated all the remaining files to version 5, so LyX doesn't have to do it when starting up. Also I added stdinset.inc everywhere I felt confident doing so. Some may be missing still. What about user created layouts? They should remember to add stdinsets.inc. I don't believe there is an easy automated way for this, as some layout files do it through stdclass.inc, scrclass.inc etc. Those user layouts that include these, should be safe. OK, thanks for the explanation. Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Sun, Aug 26, 2007 at 12:31:50PM +0200, Abdelrazak Younes wrote: > Martin Vermeer wrote: > > On Sun, Aug 26, 2007 at 12:15:03PM +0200, Abdelrazak Younes wrote: > >> Martin Vermeer wrote: > >>> On Sun, Aug 26, 2007 at 10:20:25AM +0200, Abdelrazak Younes wrote: > Martin Vermeer wrote: > > On Sun, Aug 26, 2007 at 09:09:28AM +0200, Enrico Forestieri wrote: > >> On Sat, Aug 25, 2007 at 10:03:36PM +0200, Abdelrazak Younes wrote: > >> > >>> Enrico Forestieri wrote: > Btw, did you notice that when using the IEEEtran class, ERT becomes > EBT? > >>> No... disable the pixmap cache maybe? > >> ;-) > >> > >> I meant that the text in an ERT is not Red but Black, and the font > >> is also wrong. This happens for a few classes, eg. IEEEtran and AMS. > > This is due to the configurable insets patch. You should modify the > > layout files involved to include the file 'stdinsets.inc'. > I guess we need layout2layout support then, don't we? > > Abdel. > >>> I just updated all the remaining files to version 5, so LyX doesn't > >>> have to do it when starting up. Also I added stdinset.inc everywhere > >>> I felt confident doing so. Some may be missing still. > >> What about user created layouts? > >> > > They should remember to add stdinsets.inc. I don't believe there is an > > easy automated way for this, as some layout files do it through > > stdclass.inc, > > scrclass.inc etc. Those user layouts that include these, should be safe. > > OK, thanks for the explanation. This is actually an ugly corner of LyX. There is no clean way to modify the layout file tree in cases like this. But of course one could take it philosophically and say that, just like with ERT, you're on your own if you write your own layouts. I suppose it would be better if we had a graphical interface to create layout files: then those would always include, or offer to include whatever you need for a certain version of LyX to get certain functionality. (But then, how to move old layout files forward? Allow only one level of include?) - Martin
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Sun, Aug 26, 2007 at 10:19:14AM +0200, Abdelrazak Younes wrote: > Enrico Forestieri wrote: > > > I meant that the text in an ERT is not Red but Black, and the font > > is also wrong. This happens for a few classes, eg. IEEEtran and AMS. > > Maybe related to Martin's and Richard's layout works? Yes, I suspected that. Only wanted to make a witty remark. -- Enrico
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Sun, Aug 26, 2007 at 11:17:23AM +0300, Martin Vermeer wrote: > On Sun, Aug 26, 2007 at 09:09:28AM +0200, Enrico Forestieri wrote: > > On Sat, Aug 25, 2007 at 10:03:36PM +0200, Abdelrazak Younes wrote: > > > > > Enrico Forestieri wrote: > > > > > > Btw, did you notice that when using the IEEEtran class, ERT becomes EBT? > > > > > > No... disable the pixmap cache maybe? > > > > ;-) > > > > I meant that the text in an ERT is not Red but Black, and the font > > is also wrong. This happens for a few classes, eg. IEEEtran and AMS. > > This is due to the configurable insets patch. You should modify > the layout files involved to include the file 'stdinsets.inc'. Thanks for the suggestion, Martin. -- Enrico
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Sat, Aug 25, 2007 at 12:17:03AM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: I suspect that solving these issues might also solve the missing close tab button problem. nope, the close button did not automagically appeared :-( Hmprf... I thought that those Cannot assign to pixmap warnings could be responsible for that. It is puzzling that only Qt 4.3 displays that button. Btw, did you notice that when using the IEEEtran class, ERT becomes EBT? -- Enrico
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: On Sat, Aug 25, 2007 at 12:17:03AM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: I suspect that solving these issues might also solve the missing close tab button problem. nope, the close button did not automagically appeared :-( Hmprf... I thought that those Cannot assign to pixmap warnings could be responsible for that. It is puzzling that only Qt 4.3 displays that button. Btw, did you notice that when using the IEEEtran class, ERT becomes EBT? No... disable the pixmap cache maybe? Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Sat, Aug 25, 2007 at 12:17:03AM +0200, Abdelrazak Younes wrote: > Enrico Forestieri wrote: > > I suspect that solving these issues might also solve the missing close > > tab button problem. > > nope, the close button did not automagically appeared :-( Hmprf... I thought that those "Cannot assign to pixmap" warnings could be responsible for that. It is puzzling that only Qt 4.3 displays that button. Btw, did you notice that when using the IEEEtran class, ERT becomes EBT? -- Enrico
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: On Sat, Aug 25, 2007 at 12:17:03AM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: I suspect that solving these issues might also solve the missing close tab button problem. nope, the close button did not automagically appeared :-( Hmprf... I thought that those "Cannot assign to pixmap" warnings could be responsible for that. It is puzzling that only Qt 4.3 displays that button. Btw, did you notice that when using the IEEEtran class, ERT becomes EBT? No... disable the pixmap cache maybe? Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: On Wed, Aug 22, 2007 at 09:25:12AM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Here is another one for you. This happens with Qt 4.1. When loading a second document, lyx crashes as follows: Is this on windows? Yes. Does this happen on any document? When trying to load any _second_ document. Only happens with Qt 4.1, though. Could you please try to disable the pixmap cache in QLPainter.cpp? Doesn't change anything. Here is the backtrace (part of it, as it's exceptionally long): The backtrace is long because there is a recursive loop. #31 0x00985248 in lyx::frontend::GuiView::update_view_state_qt () Ah... this update_view_state_qt() again... This message display handling is mess! #32 0x0087ef89 in lyx::frontend::WorkArea::resizeBufferView () OK, should be easy to solve. Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: Another problem: lyx allows opening multiple times the same file. Fixed. We could also offer the user a choice to revert to existing display or to create a new display for the same document. Opinions? Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: Here is another one for you. This happens with Qt 4.1. When loading a second document, lyx crashes as follows: Fixed. Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Friday 24 August 2007 08:22:38 Abdelrazak Younes wrote: Fixed. We could also offer the user a choice to revert to existing display or to create a new display for the same document. Opinions? When in doubt do what emacs does: create a new display for the same document. Abdel. -- José Abílio
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Fri, Aug 24, 2007 at 09:03:13AM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Here is another one for you. This happens with Qt 4.1. When loading a second document, lyx crashes as follows: Fixed. Great! Many thanks, Abdel. However, there seems to be some more glitches, still. When opening another document, the following is printed to the console: QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting Painter must be active to set rendering hints [repeated many times here] Painter must be active to set rendering hints QPainter::end: Painter is not active, aborted QPixmap::operator=: Cannot assign to pixmap during painting QPixmap::operator=: Cannot assign to pixmap during painting currentTabChanged 1File/c/work/file2.lyx and, when closing LyX: QPixmap::operator=: Cannot assign to pixmap during painting QPaintDevice: Cannot destroy paint device that is being painted. Be sure to QPainter::end() painters! I suspect that solving these issues might also solve the missing close tab button problem. -- Enrico
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: On Fri, Aug 24, 2007 at 09:03:13AM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Here is another one for you. This happens with Qt 4.1. When loading a second document, lyx crashes as follows: Fixed. Great! Many thanks, Abdel. However, there seems to be some more glitches, still. When opening another document, the following is printed to the console: This is fixed now but... I suspect that solving these issues might also solve the missing close tab button problem. nope, the close button did not automagically appeared :-( Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: On Wed, Aug 22, 2007 at 09:25:12AM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Here is another one for you. This happens with Qt 4.1. When loading a second document, lyx crashes as follows: Is this on windows? Yes. Does this happen on any document? When trying to load any _second_ document. Only happens with Qt 4.1, though. Could you please try to disable the pixmap cache in QLPainter.cpp? Doesn't change anything. Here is the backtrace (part of it, as it's exceptionally long): The backtrace is long because there is a recursive loop. #31 0x00985248 in lyx::frontend::GuiView::update_view_state_qt () Ah... this update_view_state_qt() again... This message display handling is mess! #32 0x0087ef89 in lyx::frontend::WorkArea::resizeBufferView () OK, should be easy to solve. Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: Another problem: lyx allows opening multiple times the same file. Fixed. We could also offer the user a choice to revert to existing display or to create a new display for the same document. Opinions? Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: Here is another one for you. This happens with Qt 4.1. When loading a second document, lyx crashes as follows: Fixed. Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Friday 24 August 2007 08:22:38 Abdelrazak Younes wrote: > Fixed. We could also offer the user a choice to revert to existing > display or to create a new display for the same document. > > Opinions? When in doubt do what emacs does: create a new display for the same document. > Abdel. -- José Abílio
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Fri, Aug 24, 2007 at 09:03:13AM +0200, Abdelrazak Younes wrote: > Enrico Forestieri wrote: > > Here is another one for you. This happens with Qt 4.1. When loading > > a second document, lyx crashes as follows: > > Fixed. Great! Many thanks, Abdel. However, there seems to be some more glitches, still. When opening another document, the following is printed to the console: QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting Painter must be active to set rendering hints [repeated many times here] Painter must be active to set rendering hints QPainter::end: Painter is not active, aborted QPixmap::operator=: Cannot assign to pixmap during painting QPixmap::operator=: Cannot assign to pixmap during painting currentTabChanged 1File/c/work/file2.lyx and, when closing LyX: QPixmap::operator=: Cannot assign to pixmap during painting QPaintDevice: Cannot destroy paint device that is being painted. Be sure to QPainter::end() painters! I suspect that solving these issues might also solve the missing close tab button problem. -- Enrico
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: On Fri, Aug 24, 2007 at 09:03:13AM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Here is another one for you. This happens with Qt 4.1. When loading a second document, lyx crashes as follows: Fixed. Great! Many thanks, Abdel. However, there seems to be some more glitches, still. When opening another document, the following is printed to the console: This is fixed now but... I suspect that solving these issues might also solve the missing close tab button problem. nope, the close button did not automagically appeared :-( Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: Nuisance: - Even with only one file opened, a toolbar with a tab appears. This is fixed. Problems: - The main window bar does not show the filename of a loaded file. However, after opening another file, the name shows up. I don't see this bug. - The list of recently opened files is not updated. This is fixed. Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Thu, Aug 23, 2007 at 11:09:49AM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Nuisance: - Even with only one file opened, a toolbar with a tab appears. This is fixed. Ok, thanks. Problems: - The main window bar does not show the filename of a loaded file. However, after opening another file, the name shows up. I don't see this bug. It is no more there, probably fixed as a side effect of some other change. - The list of recently opened files is not updated. This is fixed. Ok, thanks. Another problem: lyx allows opening multiple times the same file. And there's still the crash with Qt 4.1 when opening a second file. This does not happen with X11, only on Windows. I by far prefer Qt 4.1 over recent versions, so I would be grateful if you could solve this problem. Alternatively, Qt 4.2 should be declared as the oldest supported version. Oh, wait a moment, given that the close tab button works with Qt 4.3.0, maybe we should not support anything less than that. Hmm, on second thought, it is better requiring Qt 4.3.1 which has already been released. -- Enrico
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Thursday 23 August 2007 19:49:07 Enrico Forestieri wrote: Hmm, on second thought, it is better requiring Qt 4.3.1 which has already been released. -- Enrico Why, is that a problem? ;-) $ rpm -qi qt4 Name: qt4 Relocations: (not relocatable) Version : 4.3.1 Vendor: Fedora Project Release : 2.fc7 Build Date: Mon 13 Aug 2007 01:23:12 AM WEST Install Date: Wed 15 Aug 2007 11:42:54 AM WEST Build Host: xenbuilder2.fedora.redhat.com Group : System Environment/Libraries Source RPM: qt4-4.3.1-2.fc7.src.rpm Size: 5600420 License: GPLv2 Signature : DSA/SHA1, Mon 13 Aug 2007 03:34:35 PM WEST, Key ID da84cbd430c9ecf8 Packager: Fedora Project URL : http://www.trolltech.com/products/qt/ Summary : Qt toolkit Description : Qt is a software toolkit for developing applications. This package contains base tools, like string, xml, and network handling. And this coming from the same person that packages lyx for Fedora (Rex Dieter). :-) -- José Abílio
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Thu, Aug 23, 2007 at 08:52:00PM +0100, José Matos wrote: On Thursday 23 August 2007 19:49:07 Enrico Forestieri wrote: Hmm, on second thought, it is better requiring Qt 4.3.1 which has already been released. -- Enrico Why, is that a problem? ;-) Not at all. $ ./src/lyx.exe -version LyX 1.6.0svn (not released yet) Built on Aug 23 2007, 16:51:59 Configuration Host type:i686-pc-cygwin Special build flags: aiksaurus assertions warnings use-aspell use-ispell C Compiler: gcc C Compiler LyX flags: C Compiler flags: -pipe -O2 C++ Compiler: g++ (3.4.4) C++ Compiler LyX flags: C++ Compiler flags: -pipe -O2 Linker flags: Linker user flags: -L/usr/local/lib Qt 4 Frontend: Qt 4 version: 4.3.1 Packaging:posix LyX binary dir: /usr/local/bin LyX files dir:/usr/local/share/lyx-1.6.0svn On third thought, maybe we should only allow Qt snaspshots, just to be sure. Don't we already use boost snapshots? -- Enrico
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: On Thu, Aug 23, 2007 at 11:09:49AM +0200, Abdelrazak Younes wrote: Another problem: lyx allows opening multiple times the same file. Really? I'll have a look... Do you mean multiple BufferView or multiple Buffer? The later would be embarrassing. And there's still the crash with Qt 4.1 when opening a second file. This does not happen with X11, only on Windows. Weird. I by far prefer Qt 4.1 over recent versions, so I would be grateful if you could solve this problem. I'll try but this will take some time as I have to install and compile 4.1. Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Thursday 23 August 2007 21:31:25 Enrico Forestieri wrote: On third thought, maybe we should only allow Qt snaspshots, just to be sure. Don't we already use boost snapshots? Now that you mention it the solution is to carry our own copy of qt, then qt and boost will be on the same level... ;-) -- Enrico -- José Abílio
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Thu, Aug 23, 2007 at 10:36:10PM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: On Thu, Aug 23, 2007 at 11:09:49AM +0200, Abdelrazak Younes wrote: Another problem: lyx allows opening multiple times the same file. Really? I'll have a look... Do you mean multiple BufferView or multiple Buffer? The later would be embarrassing. File-Load and you can open how many times you like the same file. And there's still the crash with Qt 4.1 when opening a second file. This does not happen with X11, only on Windows. Weird. Not more than the fact that the tab close button works with Qt 4.3 but not with 4.2 (and 4.1, for that matter, tested when a toolbar was also appearing with only a file loaded). I by far prefer Qt 4.1 over recent versions, so I would be grateful if you could solve this problem. I'll try but this will take some time as I have to install and compile 4.1. Trolltech already distributes a mingw binary: ftp://ftp.trolltech.com/qt/source/qt-win-opensource-4.1.5-mingw.exe -- Enrico
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Thu, Aug 23, 2007 at 10:31:25PM +0200, Enrico Forestieri wrote: On Thu, Aug 23, 2007 at 08:52:00PM +0100, José Matos wrote: On Thursday 23 August 2007 19:49:07 Enrico Forestieri wrote: Hmm, on second thought, it is better requiring Qt 4.3.1 which has already been released. -- Enrico Why, is that a problem? ;-) Not at all. $ ./src/lyx.exe -version LyX 1.6.0svn (not released yet) Built on Aug 23 2007, 16:51:59 Configuration Host type:i686-pc-cygwin Special build flags: aiksaurus assertions warnings use-aspell use-ispell C Compiler: gcc C Compiler LyX flags: C Compiler flags: -pipe -O2 C++ Compiler: g++ (3.4.4) C++ Compiler LyX flags: C++ Compiler flags: -pipe -O2 Linker flags: Linker user flags: -L/usr/local/lib Qt 4 Frontend: Qt 4 version: 4.3.1 Packaging:posix LyX binary dir: /usr/local/bin LyX files dir:/usr/local/share/lyx-1.6.0svn On third thought, maybe we should only allow Qt snaspshots, Qt snapshots are usually pretty old as they are created just once a day. So they can be out-of-date by 24 hours, sometimes even more. Just use qt main from the perforce repository... Or maybe even pull from the developers' private branches directly. *sigh* Are you happy now? Andre'
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: On Thu, Aug 23, 2007 at 10:36:10PM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: On Thu, Aug 23, 2007 at 11:09:49AM +0200, Abdelrazak Younes wrote: Another problem: lyx allows opening multiple times the same file. Really? I'll have a look... Do you mean multiple BufferView or multiple Buffer? The later would be embarrassing. File-Load and you can open how many times you like the same file. Yes. But it's the same Buffer really, the file is opened only once. I'll correct that. This mean by the way that we can now duplicate tabs and work on different part of the same document within the same view :-) And there's still the crash with Qt 4.1 when opening a second file. This does not happen with X11, only on Windows. Weird. Not more than the fact that the tab close button works with Qt 4.3 but not with 4.2 (and 4.1, for that matter, tested when a toolbar was also appearing with only a file loaded). Ah... I wondered where this close button has gone. Qt 4.3 fount it! I by far prefer Qt 4.1 over recent versions, so I would be grateful if you could solve this problem. I'll try but this will take some time as I have to install and compile 4.1. Trolltech already distributes a mingw binary: ftp://ftp.trolltech.com/qt/source/qt-win-opensource-4.1.5-mingw.exe I use MSVC so I need to rebuild it. Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: Nuisance: - Even with only one file opened, a toolbar with a tab appears. This is fixed. Problems: - The main window bar does not show the filename of a loaded file. However, after opening another file, the name shows up. I don't see this bug. - The list of recently opened files is not updated. This is fixed. Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Thu, Aug 23, 2007 at 11:09:49AM +0200, Abdelrazak Younes wrote: > Enrico Forestieri wrote: > > Nuisance: > > - Even with only one file opened, a toolbar with a tab appears. > > This is fixed. Ok, thanks. > > Problems: > > - The main window bar does not show the filename of a loaded file. > > However, after opening another file, the name shows up. > > I don't see this bug. It is no more there, probably fixed as a side effect of some other change. > > - The list of recently opened files is not updated. > > This is fixed. Ok, thanks. Another problem: lyx allows opening multiple times the same file. And there's still the crash with Qt 4.1 when opening a second file. This does not happen with X11, only on Windows. I by far prefer Qt 4.1 over recent versions, so I would be grateful if you could solve this problem. Alternatively, Qt 4.2 should be declared as the oldest supported version. Oh, wait a moment, given that the close tab button works with Qt 4.3.0, maybe we should not support anything less than that. Hmm, on second thought, it is better requiring Qt 4.3.1 which has already been released. -- Enrico
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Thursday 23 August 2007 19:49:07 Enrico Forestieri wrote: > Hmm, on second > thought, it is better requiring Qt 4.3.1 which has already been released. > > -- > Enrico Why, is that a problem? ;-) $ rpm -qi qt4 Name: qt4 Relocations: (not relocatable) Version : 4.3.1 Vendor: Fedora Project Release : 2.fc7 Build Date: Mon 13 Aug 2007 01:23:12 AM WEST Install Date: Wed 15 Aug 2007 11:42:54 AM WEST Build Host: xenbuilder2.fedora.redhat.com Group : System Environment/Libraries Source RPM: qt4-4.3.1-2.fc7.src.rpm Size: 5600420 License: GPLv2 Signature : DSA/SHA1, Mon 13 Aug 2007 03:34:35 PM WEST, Key ID da84cbd430c9ecf8 Packager: Fedora Project URL : http://www.trolltech.com/products/qt/ Summary : Qt toolkit Description : Qt is a software toolkit for developing applications. This package contains base tools, like string, xml, and network handling. And this coming from the same person that packages lyx for Fedora (Rex Dieter). :-) -- José Abílio
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Thu, Aug 23, 2007 at 08:52:00PM +0100, José Matos wrote: > On Thursday 23 August 2007 19:49:07 Enrico Forestieri wrote: > > Hmm, on second > > thought, it is better requiring Qt 4.3.1 which has already been released. > > > > -- > > Enrico > > Why, is that a problem? ;-) Not at all. $ ./src/lyx.exe -version LyX 1.6.0svn (not released yet) Built on Aug 23 2007, 16:51:59 Configuration Host type:i686-pc-cygwin Special build flags: aiksaurus assertions warnings use-aspell use-ispell C Compiler: gcc C Compiler LyX flags: C Compiler flags: -pipe -O2 C++ Compiler: g++ (3.4.4) C++ Compiler LyX flags: C++ Compiler flags: -pipe -O2 Linker flags: Linker user flags: -L/usr/local/lib Qt 4 Frontend: Qt 4 version: 4.3.1 Packaging:posix LyX binary dir: /usr/local/bin LyX files dir:/usr/local/share/lyx-1.6.0svn On third thought, maybe we should only allow Qt snaspshots, just to be sure. Don't we already use boost snapshots? -- Enrico
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: On Thu, Aug 23, 2007 at 11:09:49AM +0200, Abdelrazak Younes wrote: Another problem: lyx allows opening multiple times the same file. Really? I'll have a look... Do you mean multiple BufferView or multiple Buffer? The later would be embarrassing. And there's still the crash with Qt 4.1 when opening a second file. This does not happen with X11, only on Windows. Weird. I by far prefer Qt 4.1 over recent versions, so I would be grateful if you could solve this problem. I'll try but this will take some time as I have to install and compile 4.1. Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Thursday 23 August 2007 21:31:25 Enrico Forestieri wrote: > On third thought, maybe we should only allow Qt snaspshots, > just to be sure. Don't we already use boost snapshots? Now that you mention it the solution is to carry our own copy of qt, then qt and boost will be on the same level... ;-) > -- > Enrico -- José Abílio
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Thu, Aug 23, 2007 at 10:36:10PM +0200, Abdelrazak Younes wrote: > Enrico Forestieri wrote: > > On Thu, Aug 23, 2007 at 11:09:49AM +0200, Abdelrazak Younes wrote: > > > Another problem: lyx allows opening multiple times the same file. > > Really? I'll have a look... Do you mean multiple BufferView or multiple > Buffer? The later would be embarrassing. File->Load and you can open how many times you like the same file. > > And there's still the crash with Qt 4.1 when opening a second file. > > This does not happen with X11, only on Windows. > > Weird. Not more than the fact that the tab close button works with Qt 4.3 but not with 4.2 (and 4.1, for that matter, tested when a toolbar was also appearing with only a file loaded). > > I by far prefer Qt 4.1 > > over recent versions, so I would be grateful if you could solve this > > problem. > > I'll try but this will take some time as I have to install and compile 4.1. Trolltech already distributes a mingw binary: ftp://ftp.trolltech.com/qt/source/qt-win-opensource-4.1.5-mingw.exe -- Enrico
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Thu, Aug 23, 2007 at 10:31:25PM +0200, Enrico Forestieri wrote: > On Thu, Aug 23, 2007 at 08:52:00PM +0100, José Matos wrote: > > > On Thursday 23 August 2007 19:49:07 Enrico Forestieri wrote: > > > Hmm, on second > > > thought, it is better requiring Qt 4.3.1 which has already been released. > > > > > > -- > > > Enrico > > > > Why, is that a problem? ;-) > > Not at all. > > $ ./src/lyx.exe -version > LyX 1.6.0svn (not released yet) > Built on Aug 23 2007, 16:51:59 > Configuration > Host type:i686-pc-cygwin > Special build flags: aiksaurus assertions warnings use-aspell > use-ispell > C Compiler: gcc > C Compiler LyX flags: > C Compiler flags: -pipe -O2 > C++ Compiler: g++ (3.4.4) > C++ Compiler LyX flags: > C++ Compiler flags: -pipe -O2 > Linker flags: > Linker user flags: -L/usr/local/lib > Qt 4 Frontend: > Qt 4 version: 4.3.1 > Packaging:posix > LyX binary dir: /usr/local/bin > LyX files dir:/usr/local/share/lyx-1.6.0svn > > On third thought, maybe we should only allow Qt snaspshots, Qt snapshots are usually pretty old as they are created just once a day. So they can be out-of-date by 24 hours, sometimes even more. Just use qt main from the perforce repository... Or maybe even pull from the developers' private branches directly. *sigh* Are you happy now? Andre'
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: On Thu, Aug 23, 2007 at 10:36:10PM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: On Thu, Aug 23, 2007 at 11:09:49AM +0200, Abdelrazak Younes wrote: Another problem: lyx allows opening multiple times the same file. Really? I'll have a look... Do you mean multiple BufferView or multiple Buffer? The later would be embarrassing. File->Load and you can open how many times you like the same file. Yes. But it's the same Buffer really, the file is opened only once. I'll correct that. This mean by the way that we can now duplicate tabs and work on different part of the same document within the same view :-) And there's still the crash with Qt 4.1 when opening a second file. This does not happen with X11, only on Windows. Weird. Not more than the fact that the tab close button works with Qt 4.3 but not with 4.2 (and 4.1, for that matter, tested when a toolbar was also appearing with only a file loaded). Ah... I wondered where this close button has gone. Qt 4.3 fount it! I by far prefer Qt 4.1 over recent versions, so I would be grateful if you could solve this problem. I'll try but this will take some time as I have to install and compile 4.1. Trolltech already distributes a mingw binary: ftp://ftp.trolltech.com/qt/source/qt-win-opensource-4.1.5-mingw.exe I use MSVC so I need to rebuild it. Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Tue, Aug 21, 2007 at 11:44:51PM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: On Tue, Aug 21, 2007 at 09:36:35AM +0200, Abdelrazak Younes wrote: Abdelrazak Younes wrote: Abdelrazak Younes wrote: Abdelrazak Younes wrote: Here is my most recent patch. What is not working yet: - the close tab button: it is implemented but does not show up. - the splash screen: it is implemented but does not show up. I solved the splash screen bug Here is a patch with this fix against latest trunk. Updated and committed. Nuisance: - Even with only one file opened, a toolbar with a tab appears. I know. Haven't looked at it yet but am sure this is solvable. Problems: - The main window bar does not show the filename of a loaded file. However, after opening another file, the name shows up. I'll have a look thanks. - The list of recently opened files is not updated. ditto. Crash: When loading the attached file, the cursor is not visible and the text is out of view. No scrollbar is present, but if you click in the window, the view is adjusted (and the scrollbar appears). However, if you don't click in the window and instead try to roll the mouse wheel in an attempt to scroll the view, lyx crashes: ditto. Here is another one for you. This happens with Qt 4.1. When loading a second document, lyx crashes as follows: $ ./src/lyx.exe stack widget! QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=:
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: Here is another one for you. This happens with Qt 4.1. When loading a second document, lyx crashes as follows: Is this on windows? Does this happen on any document? Could you please try to disable the pixmap cache in QLPainter.cpp? Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Wed, Aug 22, 2007 at 09:25:12AM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Here is another one for you. This happens with Qt 4.1. When loading a second document, lyx crashes as follows: Is this on windows? Yes. Does this happen on any document? When trying to load any _second_ document. Only happens with Qt 4.1, though. Could you please try to disable the pixmap cache in QLPainter.cpp? Doesn't change anything. Here is the backtrace (part of it, as it's exceptionally long): #0 0x610fa78f in done () from /usr/bin/cygwin1.dll #1 0x01f1a250 in ?? () #2 0x00c4b2c0 in QRasterPaintEnginePrivate::updateClip_helper () #3 0x00c4bd2b in QRasterPaintEngine::updateClipPath () #4 0x00c4c39d in QRasterPaintEngine::begin () #5 0x00be936d in QPainter::begin () #6 0x00bea2bb in QPainter::QPainter () #7 0x00cb2ed0 in QScrollBar::paintEvent () #8 0x00aed46d in QWidget::event () #9 0x00cb2e8c in QScrollBar::event () #10 0x00ad1bf9 in QApplicationPrivate::notify_helper () #11 0x00ad1d48 in QApplication::notify () #12 0x00882398 in lyx::frontend::GuiApplication::notify () #13 0x00bcc715 in qt_sendSpontaneousEvent () #14 0x00b08d3b in QWidgetPrivate::drawWidget () #15 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #16 0x00b093bc in QWidgetBackingStore::paintSiblingsRecursive () #17 0x00b08f59 in QWidgetPrivate::drawWidget () #18 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #19 0x00b08f59 in QWidgetPrivate::drawWidget () #20 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #21 0x00b08f59 in QWidgetPrivate::drawWidget () #22 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () ---Type return to continue, or q return to quit--- #23 0x00b08f59 in QWidgetPrivate::drawWidget () #24 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #25 0x00b093bc in QWidgetBackingStore::paintSiblingsRecursive () #26 0x00b08f59 in QWidgetPrivate::drawWidget () #27 0x00b09826 in QWidgetBackingStore::cleanRegion () #28 0x00b099b7 in QWidget::repaint () #29 0x00ae5d65 in QWidget::repaint () #30 0x00ae5ec0 in QWidget::repaint () #31 0x00985248 in lyx::frontend::GuiView::update_view_state_qt () #32 0x0087ef89 in lyx::frontend::WorkArea::resizeBufferView () #33 0x0099bd92 in lyx::frontend::GuiWorkArea::paintEvent () #34 0x00aed46d in QWidget::event () #35 0x00b92d48 in QFrame::event () #36 0x00b81a9c in QAbstractScrollArea::viewportEvent () #37 0x00b82021 in QAbstractScrollAreaViewport::event () #38 0x00ad1bf9 in QApplicationPrivate::notify_helper () #39 0x00ad1d48 in QApplication::notify () #40 0x00882398 in lyx::frontend::GuiApplication::notify () #41 0x00bcc715 in qt_sendSpontaneousEvent () #42 0x00b08d3b in QWidgetPrivate::drawWidget () #43 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #44 0x00b08f59 in QWidgetPrivate::drawWidget () #45 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () ---Type return to continue, or q return to quit--- #46 0x00b08f59 in QWidgetPrivate::drawWidget () #47 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #48 0x00b08f59 in QWidgetPrivate::drawWidget () #49 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #50 0x00b08f59 in QWidgetPrivate::drawWidget () #51 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #52 0x00b093bc in QWidgetBackingStore::paintSiblingsRecursive () #53 0x00b08f59 in QWidgetPrivate::drawWidget () #54 0x00b09826 in QWidgetBackingStore::cleanRegion () #55 0x00b099b7 in QWidget::repaint () #56 0x00ae5d65 in QWidget::repaint () #57 0x00ae5ec0 in QWidget::repaint () #58 0x0097ec51 in lyx::frontend::GuiView::message () #59 0x0087eeb3 in lyx::frontend::WorkArea::resizeBufferView () #60 0x0099bd92 in lyx::frontend::GuiWorkArea::paintEvent () #61 0x00aed46d in QWidget::event () #62 0x00b92d48 in QFrame::event () #63 0x00b81a9c in QAbstractScrollArea::viewportEvent () #64 0x00b82021 in QAbstractScrollAreaViewport::event () #65 0x00ad1bf9 in QApplicationPrivate::notify_helper () #66 0x00ad1d48 in QApplication::notify () #67 0x00882398 in lyx::frontend::GuiApplication::notify () #68 0x00bcc715 in qt_sendSpontaneousEvent () ---Type return to continue, or q return to quit--- #69 0x00b08d3b in QWidgetPrivate::drawWidget () #70 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #71 0x00b08f59 in QWidgetPrivate::drawWidget () #72 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #73 0x00b08f59 in QWidgetPrivate::drawWidget () #74 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #75 0x00b08f59 in QWidgetPrivate::drawWidget () #76 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #77 0x00b08f59 in QWidgetPrivate::drawWidget () #78 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #79 0x00b093bc in QWidgetBackingStore::paintSiblingsRecursive () #80 0x00b08f59 in QWidgetPrivate::drawWidget () #81 0x00b09826 in QWidgetBackingStore::cleanRegion () #82 0x00b099b7 in QWidget::repaint () #83 0x00ae5d65 in
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: Crash: When loading the attached file, the cursor is not visible and the text is out of view. I am not sure about this one but this one is fixed: No scrollbar is present, but if you click in the window, the view is adjusted (and the scrollbar appears). However, if you don't click in the window and instead try to roll the mouse wheel in an attempt to scroll the view, lyx crashes: $ ./src/lyx.exe stack widget! Assertion triggered in int lyx::Text::leftMargin(const lyx::Buffer, int, lyx::pit_type, lyx::pos_type) const by failing check pit = 0 in file ../../src/Text.cpp:375 Abort (core dumped)
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Wed, Aug 22, 2007 at 09:54:54AM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Crash: When loading the attached file, the cursor is not visible and the text is out of view. I am not sure about this one but this one is fixed: I started seeing it after your commit. Before that, it only happened to me on *nix with X11. It invariably occurs with a cygwin build, but only sometimes with a native mingw build. -- Enrico
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: On Wed, Aug 22, 2007 at 09:54:54AM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Crash: When loading the attached file, the cursor is not visible and the text is out of view. I am not sure about this one but this one is fixed: I started seeing it after your commit. Before that, it only happened to me on *nix with X11. It invariably occurs with a cygwin build, but only sometimes with a native mingw build. This is fixed now. Please test on X11. Backporting this to 1.5 should be easy but I don't have the time. Abdel. Author: younes Date: Wed Aug 22 16:14:52 2007 New Revision: 19721 URL: http://www.lyx.org/trac/changeset/19721 Log: Fix bug 3427: http://bugzilla.lyx.org/show_bug.cgi?id=3427 The problem was that offset_ref_ was calculated based on an empty metrics. The solution is delay the calculation up until the next metrics update. * BufferView: - center(): now just set the anchor_ref and program a new screen recentering. - updateOffsetRef(): update the offset_ref_ Modified: lyx-devel/trunk/src/BufferView.cpp lyx-devel/trunk/src/BufferView.h Modified: lyx-devel/trunk/src/BufferView.cpp URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/BufferView.cpp?rev=19721 == --- lyx-devel/trunk/src/BufferView.cpp (original) +++ lyx-devel/trunk/src/BufferView.cpp Wed Aug 22 16:14:52 2007 @@ -126,7 +126,7 @@ : width_(0), height_(0), buffer_(buf), wh_(0), cursor_(*this), multiparsel_cache_(false), anchor_ref_(0), offset_ref_(0), - intl_(new Intl), last_inset_(0) + need_centering_(false), intl_(new Intl), last_inset_(0) { xsel_cache_.set = false; intl_-initKeyMapper(lyxrc.use_kbmap); @@ -478,16 +478,37 @@ } -void BufferView::center() -{ +void BufferView::updateOffsetRef() +{ + if (!need_centering_) + return; + + if (height_ == 0) + return; + CursorSlice bot = cursor_.bottom(); TextMetrics tm = text_metrics_[bot.text()]; pit_type const pit = bot.pit(); - tm.redoParagraph(pit); ParagraphMetrics const pm = tm.parMetrics(pit); anchor_ref_ = pit; - offset_ref_ = bv_funcs::coordOffset(*this, cursor_, cursor_.boundary()).y_ - + pm.ascent() - height_ / 2; + //DocIterator dit; + //dit.push_back(bot); + //dit.pos() = 0; + + Point p = bv_funcs::coordOffset(*this, cursor_, cursor_.boundary()); + offset_ref_ = p.y_ + pm.ascent() - height_ / 2; + + lyxerr p.y_ p.y_pm.ascent() pm.ascent()h/2 height_/2 + offset_ref_ offset_ref_ endl; + + need_centering_ = false; +} + + +void BufferView::center() +{ + anchor_ref_ = cursor_.bottom().pit(); + need_centering_ = true; } @@ -1350,6 +1371,8 @@ if (!singlepar) tm.redoParagraph(pit); + updateOffsetRef(); + int y0 = tm.parMetrics(pit).ascent() - offset_ref_; // Redo paragraphs above anchor if necessary. Modified: lyx-devel/trunk/src/BufferView.h URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/BufferView.h?rev=19721 == --- lyx-devel/trunk/src/BufferView.h (original) +++ lyx-devel/trunk/src/BufferView.h Wed Aug 22 16:14:52 2007 @@ -284,6 +284,10 @@ pit_type anchor_ref_; /// int offset_ref_; + /// + void updateOffsetRef(); + /// + bool need_centering_; /// keyboard mapping object. boost::scoped_ptrIntl const intl_;
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Tue, Aug 21, 2007 at 11:44:51PM +0200, Abdelrazak Younes wrote: > Enrico Forestieri wrote: > > On Tue, Aug 21, 2007 at 09:36:35AM +0200, Abdelrazak Younes wrote: > > > >> Abdelrazak Younes wrote: > >>> Abdelrazak Younes wrote: > Abdelrazak Younes wrote: > > Here is my most recent patch. What is not working yet: > > - the close tab button: it is implemented but does not show up. > > - the splash screen: it is implemented but does not show up. > I solved the splash screen bug > >>> Here is a patch with this fix against latest trunk. > >> Updated and committed. > > > > Nuisance: > > - Even with only one file opened, a toolbar with a tab appears. > > I know. Haven't looked at it yet but am sure this is solvable. > > > > > Problems: > > - The main window bar does not show the filename of a loaded file. > > However, after opening another file, the name shows up. > > I'll have a look thanks. > > > - The list of recently opened files is not updated. > > ditto. > > > > > Crash: > > When loading the attached file, the cursor is not visible and the text > > is out of view. No scrollbar is present, but if you click in the window, > > the view is adjusted (and the scrollbar appears). However, if you don't > > click in the window and instead try to roll the mouse wheel in an attempt > > to scroll the view, lyx crashes: > > ditto. Here is another one for you. This happens with Qt 4.1. When loading a second document, lyx crashes as follows: $ ./src/lyx.exe stack widget! QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to pixmap during painting QWidget::repaint: recursive repaint detected. QPixmap::operator=: Cannot assign to
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: Here is another one for you. This happens with Qt 4.1. When loading a second document, lyx crashes as follows: Is this on windows? Does this happen on any document? Could you please try to disable the pixmap cache in QLPainter.cpp? Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Wed, Aug 22, 2007 at 09:25:12AM +0200, Abdelrazak Younes wrote: > Enrico Forestieri wrote: > > > > Here is another one for you. This happens with Qt 4.1. When loading > > a second document, lyx crashes as follows: > > Is this on windows? Yes. > Does this happen on any document? When trying to load any _second_ document. Only happens with Qt 4.1, though. > Could you please > try to disable the pixmap cache in QLPainter.cpp? Doesn't change anything. Here is the backtrace (part of it, as it's exceptionally long): #0 0x610fa78f in done () from /usr/bin/cygwin1.dll #1 0x01f1a250 in ?? () #2 0x00c4b2c0 in QRasterPaintEnginePrivate::updateClip_helper () #3 0x00c4bd2b in QRasterPaintEngine::updateClipPath () #4 0x00c4c39d in QRasterPaintEngine::begin () #5 0x00be936d in QPainter::begin () #6 0x00bea2bb in QPainter::QPainter () #7 0x00cb2ed0 in QScrollBar::paintEvent () #8 0x00aed46d in QWidget::event () #9 0x00cb2e8c in QScrollBar::event () #10 0x00ad1bf9 in QApplicationPrivate::notify_helper () #11 0x00ad1d48 in QApplication::notify () #12 0x00882398 in lyx::frontend::GuiApplication::notify () #13 0x00bcc715 in qt_sendSpontaneousEvent () #14 0x00b08d3b in QWidgetPrivate::drawWidget () #15 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #16 0x00b093bc in QWidgetBackingStore::paintSiblingsRecursive () #17 0x00b08f59 in QWidgetPrivate::drawWidget () #18 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #19 0x00b08f59 in QWidgetPrivate::drawWidget () #20 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #21 0x00b08f59 in QWidgetPrivate::drawWidget () #22 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () ---Type to continue, or q to quit--- #23 0x00b08f59 in QWidgetPrivate::drawWidget () #24 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #25 0x00b093bc in QWidgetBackingStore::paintSiblingsRecursive () #26 0x00b08f59 in QWidgetPrivate::drawWidget () #27 0x00b09826 in QWidgetBackingStore::cleanRegion () #28 0x00b099b7 in QWidget::repaint () #29 0x00ae5d65 in QWidget::repaint () #30 0x00ae5ec0 in QWidget::repaint () #31 0x00985248 in lyx::frontend::GuiView::update_view_state_qt () #32 0x0087ef89 in lyx::frontend::WorkArea::resizeBufferView () #33 0x0099bd92 in lyx::frontend::GuiWorkArea::paintEvent () #34 0x00aed46d in QWidget::event () #35 0x00b92d48 in QFrame::event () #36 0x00b81a9c in QAbstractScrollArea::viewportEvent () #37 0x00b82021 in QAbstractScrollAreaViewport::event () #38 0x00ad1bf9 in QApplicationPrivate::notify_helper () #39 0x00ad1d48 in QApplication::notify () #40 0x00882398 in lyx::frontend::GuiApplication::notify () #41 0x00bcc715 in qt_sendSpontaneousEvent () #42 0x00b08d3b in QWidgetPrivate::drawWidget () #43 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #44 0x00b08f59 in QWidgetPrivate::drawWidget () #45 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () ---Type to continue, or q to quit--- #46 0x00b08f59 in QWidgetPrivate::drawWidget () #47 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #48 0x00b08f59 in QWidgetPrivate::drawWidget () #49 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #50 0x00b08f59 in QWidgetPrivate::drawWidget () #51 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #52 0x00b093bc in QWidgetBackingStore::paintSiblingsRecursive () #53 0x00b08f59 in QWidgetPrivate::drawWidget () #54 0x00b09826 in QWidgetBackingStore::cleanRegion () #55 0x00b099b7 in QWidget::repaint () #56 0x00ae5d65 in QWidget::repaint () #57 0x00ae5ec0 in QWidget::repaint () #58 0x0097ec51 in lyx::frontend::GuiView::message () #59 0x0087eeb3 in lyx::frontend::WorkArea::resizeBufferView () #60 0x0099bd92 in lyx::frontend::GuiWorkArea::paintEvent () #61 0x00aed46d in QWidget::event () #62 0x00b92d48 in QFrame::event () #63 0x00b81a9c in QAbstractScrollArea::viewportEvent () #64 0x00b82021 in QAbstractScrollAreaViewport::event () #65 0x00ad1bf9 in QApplicationPrivate::notify_helper () #66 0x00ad1d48 in QApplication::notify () #67 0x00882398 in lyx::frontend::GuiApplication::notify () #68 0x00bcc715 in qt_sendSpontaneousEvent () ---Type to continue, or q to quit--- #69 0x00b08d3b in QWidgetPrivate::drawWidget () #70 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #71 0x00b08f59 in QWidgetPrivate::drawWidget () #72 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #73 0x00b08f59 in QWidgetPrivate::drawWidget () #74 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #75 0x00b08f59 in QWidgetPrivate::drawWidget () #76 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #77 0x00b08f59 in QWidgetPrivate::drawWidget () #78 0x00b09527 in QWidgetBackingStore::paintSiblingsRecursive () #79 0x00b093bc in QWidgetBackingStore::paintSiblingsRecursive () #80 0x00b08f59 in QWidgetPrivate::drawWidget () #81 0x00b09826 in QWidgetBackingStore::cleanRegion () #82 0x00b099b7 in QWidget::repaint () #83 0x00ae5d65 in QWidget::repaint () #84
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: Crash: When loading the attached file, the cursor is not visible and the text is out of view. I am not sure about this one but this one is fixed: No scrollbar is present, but if you click in the window, the view is adjusted (and the scrollbar appears). However, if you don't click in the window and instead try to roll the mouse wheel in an attempt to scroll the view, lyx crashes: $ ./src/lyx.exe stack widget! Assertion triggered in int lyx::Text::leftMargin(const lyx::Buffer&, int, lyx::pit_type, lyx::pos_type) const by failing check "pit >= 0" in file ../../src/Text.cpp:375 Abort (core dumped)
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Wed, Aug 22, 2007 at 09:54:54AM +0200, Abdelrazak Younes wrote: > Enrico Forestieri wrote: > > > Crash: > > When loading the attached file, the cursor is not visible and the text > > is out of view. > > I am not sure about this one but this one is fixed: I started seeing it after your commit. Before that, it only happened to me on *nix with X11. It invariably occurs with a cygwin build, but only sometimes with a native mingw build. -- Enrico
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: On Wed, Aug 22, 2007 at 09:54:54AM +0200, Abdelrazak Younes wrote: Enrico Forestieri wrote: Crash: When loading the attached file, the cursor is not visible and the text is out of view. I am not sure about this one but this one is fixed: I started seeing it after your commit. Before that, it only happened to me on *nix with X11. It invariably occurs with a cygwin build, but only sometimes with a native mingw build. This is fixed now. Please test on X11. Backporting this to 1.5 should be easy but I don't have the time. Abdel. Author: younes Date: Wed Aug 22 16:14:52 2007 New Revision: 19721 URL: http://www.lyx.org/trac/changeset/19721 Log: Fix bug 3427: http://bugzilla.lyx.org/show_bug.cgi?id=3427 The problem was that offset_ref_ was calculated based on an empty metrics. The solution is delay the calculation up until the next metrics update. * BufferView: - center(): now just set the anchor_ref and program a new screen recentering. - updateOffsetRef(): update the offset_ref_ Modified: lyx-devel/trunk/src/BufferView.cpp lyx-devel/trunk/src/BufferView.h Modified: lyx-devel/trunk/src/BufferView.cpp URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/BufferView.cpp?rev=19721 == --- lyx-devel/trunk/src/BufferView.cpp (original) +++ lyx-devel/trunk/src/BufferView.cpp Wed Aug 22 16:14:52 2007 @@ -126,7 +126,7 @@ : width_(0), height_(0), buffer_(buf), wh_(0), cursor_(*this), multiparsel_cache_(false), anchor_ref_(0), offset_ref_(0), - intl_(new Intl), last_inset_(0) + need_centering_(false), intl_(new Intl), last_inset_(0) { xsel_cache_.set = false; intl_->initKeyMapper(lyxrc.use_kbmap); @@ -478,16 +478,37 @@ } -void BufferView::center() -{ +void BufferView::updateOffsetRef() +{ + if (!need_centering_) + return; + + if (height_ == 0) + return; + CursorSlice & bot = cursor_.bottom(); TextMetrics & tm = text_metrics_[bot.text()]; pit_type const pit = bot.pit(); - tm.redoParagraph(pit); ParagraphMetrics const & pm = tm.parMetrics(pit); anchor_ref_ = pit; - offset_ref_ = bv_funcs::coordOffset(*this, cursor_, cursor_.boundary()).y_ - + pm.ascent() - height_ / 2; + //DocIterator dit; + //dit.push_back(bot); + //dit.pos() = 0; + + Point p = bv_funcs::coordOffset(*this, cursor_, cursor_.boundary()); + offset_ref_ = p.y_ + pm.ascent() - height_ / 2; + + lyxerr << "p.y_ " << p.y_ << " pm.ascent() " << pm.ascent() << " h/2 " << height_/2 + << " offset_ref_ " << offset_ref_ << endl; + + need_centering_ = false; +} + + +void BufferView::center() +{ + anchor_ref_ = cursor_.bottom().pit(); + need_centering_ = true; } @@ -1350,6 +1371,8 @@ if (!singlepar) tm.redoParagraph(pit); + updateOffsetRef(); + int y0 = tm.parMetrics(pit).ascent() - offset_ref_; // Redo paragraphs above anchor if necessary. Modified: lyx-devel/trunk/src/BufferView.h URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/BufferView.h?rev=19721 == --- lyx-devel/trunk/src/BufferView.h (original) +++ lyx-devel/trunk/src/BufferView.h Wed Aug 22 16:14:52 2007 @@ -284,6 +284,10 @@ pit_type anchor_ref_; /// int offset_ref_; + /// + void updateOffsetRef(); + /// + bool need_centering_; /// keyboard mapping object. boost::scoped_ptr const intl_;
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Abdelrazak Younes wrote: Abdelrazak Younes wrote: Abdelrazak Younes wrote: Here is my most recent patch. What is not working yet: - the close tab button: it is implemented but does not show up. - the splash screen: it is implemented but does not show up. I solved the splash screen bug Here is a patch with this fix against latest trunk. Updated and committed. Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Tue, Aug 21, 2007 at 09:36:35AM +0200, Abdelrazak Younes wrote: Abdelrazak Younes wrote: Abdelrazak Younes wrote: Abdelrazak Younes wrote: Here is my most recent patch. What is not working yet: - the close tab button: it is implemented but does not show up. - the splash screen: it is implemented but does not show up. I solved the splash screen bug Here is a patch with this fix against latest trunk. Updated and committed. Nuisance: - Even with only one file opened, a toolbar with a tab appears. Problems: - The main window bar does not show the filename of a loaded file. However, after opening another file, the name shows up. - The list of recently opened files is not updated. Crash: When loading the attached file, the cursor is not visible and the text is out of view. No scrollbar is present, but if you click in the window, the view is adjusted (and the scrollbar appears). However, if you don't click in the window and instead try to roll the mouse wheel in an attempt to scroll the view, lyx crashes: $ ./src/lyx.exe stack widget! Assertion triggered in int lyx::Text::leftMargin(const lyx::Buffer, int, lyx::pit_type, lyx::pos_type) const by failing check pit = 0 in file ../../src/Text.cpp:375 Abort (core dumped) -- Enrico #LyX 1.4.4 created this file. For more info see http://www.lyx.org/ \lyxformat 245 \begin_document \begin_header \textclass article \language english \inputencoding auto \fontscheme default \graphics default \paperfontsize default \papersize default \use_geometry false \use_amsmath 1 \cite_engine basic \use_bibtopic false \paperorientation portrait \secnumdepth 3 \tocdepth 3 \paragraph_separation indent \defskip medskip \quotes_language english \papercolumns 1 \papersides 1 \paperpagestyle default \tracking_changes false \output_changes false \end_header \begin_body \begin_layout Standard \begin_inset Formula $A\overset{S_{1}}{\underset{S_{2}}{\gtrless}}B$ \end_inset \end_layout \end_body \end_document
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: On Tue, Aug 21, 2007 at 09:36:35AM +0200, Abdelrazak Younes wrote: Abdelrazak Younes wrote: Abdelrazak Younes wrote: Abdelrazak Younes wrote: Here is my most recent patch. What is not working yet: - the close tab button: it is implemented but does not show up. - the splash screen: it is implemented but does not show up. I solved the splash screen bug Here is a patch with this fix against latest trunk. Updated and committed. Nuisance: - Even with only one file opened, a toolbar with a tab appears. I know. Haven't looked at it yet but am sure this is solvable. Problems: - The main window bar does not show the filename of a loaded file. However, after opening another file, the name shows up. I'll have a look thanks. - The list of recently opened files is not updated. ditto. Crash: When loading the attached file, the cursor is not visible and the text is out of view. No scrollbar is present, but if you click in the window, the view is adjusted (and the scrollbar appears). However, if you don't click in the window and instead try to roll the mouse wheel in an attempt to scroll the view, lyx crashes: ditto. Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Abdelrazak Younes wrote: Abdelrazak Younes wrote: Abdelrazak Younes wrote: Here is my most recent patch. What is not working yet: - the close tab button: it is implemented but does not show up. - the splash screen: it is implemented but does not show up. I solved the splash screen bug Here is a patch with this fix against latest trunk. Updated and committed. Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
On Tue, Aug 21, 2007 at 09:36:35AM +0200, Abdelrazak Younes wrote: > Abdelrazak Younes wrote: > > Abdelrazak Younes wrote: > >> Abdelrazak Younes wrote: > >>> Here is my most recent patch. What is not working yet: > >>> - the close tab button: it is implemented but does not show up. > >>> - the splash screen: it is implemented but does not show up. > >> > >> I solved the splash screen bug > > > > Here is a patch with this fix against latest trunk. > > Updated and committed. Nuisance: - Even with only one file opened, a toolbar with a tab appears. Problems: - The main window bar does not show the filename of a loaded file. However, after opening another file, the name shows up. - The list of recently opened files is not updated. Crash: When loading the attached file, the cursor is not visible and the text is out of view. No scrollbar is present, but if you click in the window, the view is adjusted (and the scrollbar appears). However, if you don't click in the window and instead try to roll the mouse wheel in an attempt to scroll the view, lyx crashes: $ ./src/lyx.exe stack widget! Assertion triggered in int lyx::Text::leftMargin(const lyx::Buffer&, int, lyx::pit_type, lyx::pos_type) const by failing check "pit >= 0" in file ../../src/Text.cpp:375 Abort (core dumped) -- Enrico #LyX 1.4.4 created this file. For more info see http://www.lyx.org/ \lyxformat 245 \begin_document \begin_header \textclass article \language english \inputencoding auto \fontscheme default \graphics default \paperfontsize default \papersize default \use_geometry false \use_amsmath 1 \cite_engine basic \use_bibtopic false \paperorientation portrait \secnumdepth 3 \tocdepth 3 \paragraph_separation indent \defskip medskip \quotes_language english \papercolumns 1 \papersides 1 \paperpagestyle default \tracking_changes false \output_changes false \end_header \begin_body \begin_layout Standard \begin_inset Formula $A\overset{S_{1}}{\underset{S_{2}}{\gtrless}}B$ \end_inset \end_layout \end_body \end_document
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Enrico Forestieri wrote: On Tue, Aug 21, 2007 at 09:36:35AM +0200, Abdelrazak Younes wrote: Abdelrazak Younes wrote: Abdelrazak Younes wrote: Abdelrazak Younes wrote: Here is my most recent patch. What is not working yet: - the close tab button: it is implemented but does not show up. - the splash screen: it is implemented but does not show up. I solved the splash screen bug Here is a patch with this fix against latest trunk. Updated and committed. Nuisance: - Even with only one file opened, a toolbar with a tab appears. I know. Haven't looked at it yet but am sure this is solvable. Problems: - The main window bar does not show the filename of a loaded file. However, after opening another file, the name shows up. I'll have a look thanks. - The list of recently opened files is not updated. ditto. Crash: When loading the attached file, the cursor is not visible and the text is out of view. No scrollbar is present, but if you click in the window, the view is adjusted (and the scrollbar appears). However, if you don't click in the window and instead try to roll the mouse wheel in an attempt to scroll the view, lyx crashes: ditto. Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Abdelrazak Younes wrote: Abdelrazak Younes wrote: Abdelrazak Younes wrote: Here is my most recent patch. What is not working yet: Btw, very nice design description. I think it is very useful. - the close tab button: it is implemented but does not show up. - the splash screen: it is implemented but does not show up. I solved the splash screen bug Cool. Here is a patch with this fix against latest trunk. Just for review [I did it with sr on the patched file], this is the BufferView.cpp part of the patch without the Buffer * - Buffer change (half as big). A/ Index: BufferView.cpp === --- BufferView.cpp (revision 19626) +++ BufferView.cpp (working copy) @@ -122,143 +122,45 @@ } // anon namespace -BufferView::BufferView() - : width_(0), height_(0), buffer_(0), wh_(0), +BufferView::BufferView(Buffer buf) + : width_(0), height_(0), buffer_(buf), wh_(0), cursor_(*this), multiparsel_cache_(false), anchor_ref_(0), offset_ref_(0), intl_(new Intl), last_inset_(0) { + LYXERR(Debug::INFO) BOOST_CURRENT_FUNCTION + Buffer addr: buffer_ endl; + xsel_cache_.set = false; intl_-initKeyMapper(lyxrc.use_kbmap); + + cursor_.push(buffer_-inset()); + cursor_.resetAnchor(); + buffer_-text().setCurrentFont(cursor_); + + if (graphics::Previews::status() != LyXRC::PREVIEW_OFF) + graphics::Previews::get().generateBufferPreviews(*buffer_); } BufferView::~BufferView() { + delete buffer_; } -Buffer * BufferView::buffer() const +Buffer * BufferView::buffer() { return buffer_; } -Buffer * BufferView::setBuffer(Buffer * b) +Buffer const * BufferView::buffer() const { - LYXERR(Debug::INFO) BOOST_CURRENT_FUNCTION - [ b = b ] endl; - - if (buffer_) { - // Save the current selection if any - cap::saveSelection(cursor_); - // Save the actual cursor position and anchor inside the - // buffer so that it can be restored in case we rechange - // to this buffer later on. - buffer_-saveCursor(cursor_.selectionBegin(), -cursor_.selectionEnd()); - // update bookmark pit of the current buffer before switch - for (size_t i = 0; i LyX::ref().session().bookmarks().size(); ++i) { - BookmarksSection::Bookmark const bm = LyX::ref().session().bookmarks().bookmark(i); - if (buffer()-fileName() != bm.filename.absFilename()) -continue; - // if top_id or bottom_pit, bottom_pos has been changed, update bookmark - // see http://bugzilla.lyx.org/show_bug.cgi?id=3092 - pit_type new_pit; - pos_type new_pos; - int new_id; - boost::tie(new_pit, new_pos, new_id) = moveToPosition(bm.bottom_pit, bm.bottom_pos, bm.top_id, bm.top_pos); - if (bm.bottom_pit != new_pit || bm.bottom_pos != new_pos || bm.top_id != new_id ) -const_castBookmarksSection::Bookmark (bm).updatePos(new_pit, new_pos, new_id); - } - // current buffer is going to be switched-off, save cursor pos - // Ideally, the whole cursor stack should be saved, but session - // currently can only handle bottom (whole document) level pit and pos. - // That is to say, if a cursor is in a nested inset, it will be - // restore to the left of the top level inset. - LyX::ref().session().lastFilePos().save(FileName(buffer_-fileName()), - boost::tie(cursor_.bottom().pit(), cursor_.bottom().pos()) ); - } - - // If we're quitting lyx, don't bother updating stuff - if (quitting) { - buffer_ = 0; - return 0; - } - - //FIXME Fix for bug 3440 is here. - // If we are closing current buffer, switch to the first in - // buffer list. - if (!b) { - LYXERR(Debug::INFO) BOOST_CURRENT_FUNCTION - No Buffer! endl; - // We are closing the buffer, use the first buffer as current - //FIXME 3440 - // if (last_buffer_) buffer_ = last_buffer_; - // also check that this is in theBufferList()? - buffer_ = theBufferList().first(); - } else { - //FIXME 3440 - // last_buffer = buffer_; - // Set current buffer - buffer_ = b; - } - - // Reset old cursor - cursor_ = Cursor(*this); - anchor_ref_ = 0; - offset_ref_ = 0; - - if (!buffer_) - return 0; - - LYXERR(Debug::INFO) BOOST_CURRENT_FUNCTION - Buffer addr: buffer_ endl; - cursor_.push(buffer_-inset()); - cursor_.resetAnchor(); - buffer_-text().setCurrentFont(cursor_); - - // Update the metrics now that we have a proper Cursor. - updateMetrics(false); - - // FIXME: This code won't be needed once we switch to - // one Buffer / one BufferView. - if (buffer_-getCursor().size() 0 - buffer_-getAnchor().size() 0) - { - cursor_.setCursor(buffer_-getAnchor().asDocIterator((buffer_-inset(; - cursor_.resetAnchor(); - cursor_.setCursor(buffer_-getCursor().asDocIterator((buffer_-inset(; - cursor_.setSelection(); - // do not set selection to the new buffer because we - // only paste recent selection. - - // Make sure that the restored cursor is not broken. This can happen for - // example if this Buffer has been modified by another view. - cursor_.fixIfBroken(); - -
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Alfredo Braunstein wrote: Abdelrazak Younes wrote: Abdelrazak Younes wrote: Abdelrazak Younes wrote: Here is my most recent patch. What is not working yet: Btw, very nice design description. I think it is very useful. Thanks. Don't hesitate to complement/modify it once it is in trunk. Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Abdelrazak Younes wrote: Here is a patch with this fix against latest trunk. Abdel. + void LyXView::setBuffer(Buffer * newBuffer) shouldn't this be called something like addBuffer ? A/
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Alfredo Braunstein wrote: Abdelrazak Younes wrote: Here is a patch with this fix against latest trunk. Abdel. + void LyXView::setBuffer(Buffer * newBuffer) shouldn't this be called something like addBuffer ? It's between the two notions. It will indeed add a WorkArea if it does not current exist and switch to it otherwise. Should probably be setWorkArea() instead. I'll change that afterwards, I don't want to be accused to augment the patch even more. Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Abdelrazak Younes wrote: Alfredo Braunstein wrote: Abdelrazak Younes wrote: Here is a patch with this fix against latest trunk. Abdel. + void LyXView::setBuffer(Buffer * newBuffer) shouldn't this be called something like addBuffer ? It's between the two notions. It will indeed add a WorkArea if it does not current exist and switch to it otherwise. Should probably be setWorkArea() instead. I'll change that afterwards, I don't want to be accused to augment the patch even more. Ah, right. Yes, setWorkArea seems better indeed. I just read the patch. What can I say, it is a very long patch and I couldn't follow many things, but it definitely feels like a step in the right direction. And it does seem very difficult to break it up further. Summary: I personally don't have objections. I think we can figure out missing details later. However, given the firework that the thing has started, I think it wouldn't hurt to wait until Monday evening (many here work on lyx only on weekdays and you posted the last patch on friday). On a very fast testing, I noticed two small problems (I don't think this should stop the patch though): - menu shortcuts (M-f, M-h etc) are disabled on the splash screen (menus can still be opened with the mouse) - in some cases the cursor is almost offscreen on opening (in some cases the scroll bar is missing when opening short document, but pops up when clicking.). I'm not even sure that this problem is not already on trunk. A/
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Alfredo Braunstein wrote: Abdelrazak Younes wrote: Alfredo Braunstein wrote: Abdelrazak Younes wrote: Here is a patch with this fix against latest trunk. Abdel. + void LyXView::setBuffer(Buffer * newBuffer) shouldn't this be called something like addBuffer ? It's between the two notions. It will indeed add a WorkArea if it does not current exist and switch to it otherwise. Should probably be setWorkArea() instead. I'll change that afterwards, I don't want to be accused to augment the patch even more. Ah, right. Yes, setWorkArea seems better indeed. Or even displayBuffer()... I just read the patch. What can I say, it is a very long patch and I couldn't follow many things, but it definitely feels like a step in the right direction. And it does seem very difficult to break it up further. That's what I said yes. Summary: I personally don't have objections. I think we can figure out missing details later. Yes. However, given the firework that the thing has started, I think it wouldn't hurt to wait until Monday evening (many here work on lyx only on weekdays and you posted the last patch on friday). OK. But I don't think I'll get any comment... On a very fast testing, I noticed two small problems (I don't think this should stop the patch though): - menu shortcuts (M-f, M-h etc) are disabled on the splash screen (menus can still be opened with the mouse) I'll have a look. - in some cases the cursor is almost offscreen on opening This one is already on trunk I think, though I cannot reproduced it under Windows. There a bugzilla item about it IIRC. (in some cases the scroll bar is missing when opening short document, but pops up when clicking. I actually like this behavior. Why having a scrollbar if there is no need for it? Thanks, Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Abdelrazak Younes wrote: I actually like this behavior. Why having a scrollbar if there is no need for it? Exactly, but then the scrollbar pops up even if it is useless. ;-) A/
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Alfredo Braunstein wrote: Abdelrazak Younes wrote: I actually like this behavior. Why having a scrollbar if there is no need for it? Exactly, but then the scrollbar pops up even if it is useless. ;-) Year, that's the real bug :-) Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Abdelrazak Younes wrote: > Abdelrazak Younes wrote: >> Abdelrazak Younes wrote: >>> Here is my most recent patch. What is not working yet: Btw, very nice design description. I think it is very useful. >>> - the close tab button: it is implemented but does not show up. >>> - the splash screen: it is implemented but does not show up. >> >> I solved the splash screen bug Cool. > Here is a patch with this fix against latest trunk. Just for review [I did it with s on the patched file], this is the BufferView.cpp part of the patch without the Buffer * -> Buffer & change (half as big). A/ Index: BufferView.cpp === --- BufferView.cpp (revision 19626) +++ BufferView.cpp (working copy) @@ -122,143 +122,45 @@ } // anon namespace -BufferView::BufferView() - : width_(0), height_(0), buffer_(0), wh_(0), +BufferView::BufferView(Buffer & buf) + : width_(0), height_(0), buffer_(), wh_(0), cursor_(*this), multiparsel_cache_(false), anchor_ref_(0), offset_ref_(0), intl_(new Intl), last_inset_(0) { + LYXERR(Debug::INFO) << BOOST_CURRENT_FUNCTION + << "Buffer addr: " << buffer_ << endl; + xsel_cache_.set = false; intl_->initKeyMapper(lyxrc.use_kbmap); + + cursor_.push(buffer_->inset()); + cursor_.resetAnchor(); + buffer_->text().setCurrentFont(cursor_); + + if (graphics::Previews::status() != LyXRC::PREVIEW_OFF) + graphics::Previews::get().generateBufferPreviews(*buffer_); } BufferView::~BufferView() { + delete buffer_; } -Buffer * BufferView::buffer() const +Buffer * BufferView::buffer() { return buffer_; } -Buffer * BufferView::setBuffer(Buffer * b) +Buffer const * BufferView::buffer() const { - LYXERR(Debug::INFO) << BOOST_CURRENT_FUNCTION - << "[ b = " << b << "]" << endl; - - if (buffer_) { - // Save the current selection if any - cap::saveSelection(cursor_); - // Save the actual cursor position and anchor inside the - // buffer so that it can be restored in case we rechange - // to this buffer later on. - buffer_->saveCursor(cursor_.selectionBegin(), -cursor_.selectionEnd()); - // update bookmark pit of the current buffer before switch - for (size_t i = 0; i < LyX::ref().session().bookmarks().size(); ++i) { - BookmarksSection::Bookmark const & bm = LyX::ref().session().bookmarks().bookmark(i); - if (buffer()->fileName() != bm.filename.absFilename()) -continue; - // if top_id or bottom_pit, bottom_pos has been changed, update bookmark - // see http://bugzilla.lyx.org/show_bug.cgi?id=3092 - pit_type new_pit; - pos_type new_pos; - int new_id; - boost::tie(new_pit, new_pos, new_id) = moveToPosition(bm.bottom_pit, bm.bottom_pos, bm.top_id, bm.top_pos); - if (bm.bottom_pit != new_pit || bm.bottom_pos != new_pos || bm.top_id != new_id ) -const_cast(bm).updatePos(new_pit, new_pos, new_id); - } - // current buffer is going to be switched-off, save cursor pos - // Ideally, the whole cursor stack should be saved, but session - // currently can only handle bottom (whole document) level pit and pos. - // That is to say, if a cursor is in a nested inset, it will be - // restore to the left of the top level inset. - LyX::ref().session().lastFilePos().save(FileName(buffer_->fileName()), - boost::tie(cursor_.bottom().pit(), cursor_.bottom().pos()) ); - } - - // If we're quitting lyx, don't bother updating stuff - if (quitting) { - buffer_ = 0; - return 0; - } - - //FIXME Fix for bug 3440 is here. - // If we are closing current buffer, switch to the first in - // buffer list. - if (!b) { - LYXERR(Debug::INFO) << BOOST_CURRENT_FUNCTION -<< " No Buffer!" << endl; - // We are closing the buffer, use the first buffer as current - //FIXME 3440 - // if (last_buffer_) buffer_ = last_buffer_; - // also check that this is in theBufferList()? - buffer_ = theBufferList().first(); - } else { - //FIXME 3440 - // last_buffer = buffer_; - // Set current buffer - buffer_ = b; - } - - // Reset old cursor - cursor_ = Cursor(*this); - anchor_ref_ = 0; - offset_ref_ = 0; - - if (!buffer_) - return 0; - - LYXERR(Debug::INFO) << BOOST_CURRENT_FUNCTION - << "Buffer addr: " << buffer_ << endl; - cursor_.push(buffer_->inset()); - cursor_.resetAnchor(); - buffer_->text().setCurrentFont(cursor_); - - // Update the metrics now that we have a proper Cursor. - updateMetrics(false); - - // FIXME: This code won't be needed once we switch to - // "one Buffer" / "one BufferView". - if (buffer_->getCursor().size() > 0 && - buffer_->getAnchor().size() > 0) - { - cursor_.setCursor(buffer_->getAnchor().asDocIterator(&(buffer_->inset(; - cursor_.resetAnchor(); - cursor_.setCursor(buffer_->getCursor().asDocIterator(&(buffer_->inset(; - cursor_.setSelection(); - // do not set selection to the new buffer because we - // only paste recent selection. - - // Make sure that the restored cursor is not broken. This can happen for - // example if this Buffer has been
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Alfredo Braunstein wrote: Abdelrazak Younes wrote: Abdelrazak Younes wrote: Abdelrazak Younes wrote: Here is my most recent patch. What is not working yet: Btw, very nice design description. I think it is very useful. Thanks. Don't hesitate to complement/modify it once it is in trunk. Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Abdelrazak Younes wrote: > Here is a patch with this fix against latest trunk. > > Abdel. + void LyXView::setBuffer(Buffer * newBuffer) shouldn't this be called something like addBuffer ? A/
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Alfredo Braunstein wrote: Abdelrazak Younes wrote: Here is a patch with this fix against latest trunk. Abdel. + void LyXView::setBuffer(Buffer * newBuffer) shouldn't this be called something like addBuffer ? It's between the two notions. It will indeed add a WorkArea if it does not current exist and switch to it otherwise. Should probably be setWorkArea() instead. I'll change that afterwards, I don't want to be accused to augment the patch even more. Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Abdelrazak Younes wrote: > Alfredo Braunstein wrote: >> Abdelrazak Younes wrote: >> >>> Here is a patch with this fix against latest trunk. >>> >>> Abdel. >> >> + void LyXView::setBuffer(Buffer * newBuffer) >> >> shouldn't this be called something like addBuffer ? > > It's between the two notions. It will indeed add a WorkArea if it does > not current exist and switch to it otherwise. Should probably be > setWorkArea() instead. I'll change that afterwards, I don't want to be > accused to augment the patch even more. Ah, right. Yes, setWorkArea seems better indeed. I just read the patch. What can I say, it is a very long patch and I couldn't follow many things, but it definitely feels like a step in the right direction. And it does seem very difficult to break it up further. Summary: I personally don't have objections. I think we can figure out missing details later. However, given the firework that the thing has started, I think it wouldn't hurt to wait until Monday evening (many here work on lyx only on weekdays and you posted the last patch on friday). On a very fast testing, I noticed two small problems (I don't think this should stop the patch though): - menu shortcuts (M-f, M-h etc) are disabled on the splash screen (menus can still be opened with the mouse) - in some cases the cursor is almost offscreen on opening (in some cases the scroll bar is missing when opening short document, but pops up when clicking.). I'm not even sure that this problem is not already on trunk. A/
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Alfredo Braunstein wrote: Abdelrazak Younes wrote: Alfredo Braunstein wrote: Abdelrazak Younes wrote: Here is a patch with this fix against latest trunk. Abdel. + void LyXView::setBuffer(Buffer * newBuffer) shouldn't this be called something like addBuffer ? It's between the two notions. It will indeed add a WorkArea if it does not current exist and switch to it otherwise. Should probably be setWorkArea() instead. I'll change that afterwards, I don't want to be accused to augment the patch even more. Ah, right. Yes, setWorkArea seems better indeed. Or even displayBuffer()... I just read the patch. What can I say, it is a very long patch and I couldn't follow many things, but it definitely feels like a step in the right direction. And it does seem very difficult to break it up further. That's what I said yes. Summary: I personally don't have objections. I think we can figure out missing details later. Yes. However, given the firework that the thing has started, I think it wouldn't hurt to wait until Monday evening (many here work on lyx only on weekdays and you posted the last patch on friday). OK. But I don't think I'll get any comment... On a very fast testing, I noticed two small problems (I don't think this should stop the patch though): - menu shortcuts (M-f, M-h etc) are disabled on the splash screen (menus can still be opened with the mouse) I'll have a look. - in some cases the cursor is almost offscreen on opening This one is already on trunk I think, though I cannot reproduced it under Windows. There a bugzilla item about it IIRC. (in some cases the scroll bar is missing when opening short document, but pops up when clicking. I actually like this behavior. Why having a scrollbar if there is no need for it? Thanks, Abdel.
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Abdelrazak Younes wrote: > I actually like this behavior. Why having a scrollbar if there is no > need for it? Exactly, but then the scrollbar pops up even if it is useless. ;-) A/
Re: [Updated PATCH] BufferView/WorkArea/LyXView reorg a.k.a Multiple WorkAreas
Alfredo Braunstein wrote: Abdelrazak Younes wrote: I actually like this behavior. Why having a scrollbar if there is no need for it? Exactly, but then the scrollbar pops up even if it is useless. ;-) Year, that's the real bug :-) Abdel.