Re: [patch] Selection stats in statusbar

2022-08-19 Thread Pavel Sanda
On Thu, Aug 18, 2022 at 09:55:50AM +0200, Jürgen Spitzmüller wrote: > showMessage() is triggered on any cursor action. That's way too often. > E.g., it would fire down statistics unnecessarily if you move with the > arrow keys through your document. I'll add just few observational notes collected

Re: [patch] Selection stats in statusbar

2022-08-19 Thread Jürgen Spitzmüller
Am Freitag, dem 19.08.2022 um 07:06 +0200 schrieb Jürgen Spitzmüller: > The crash is fixed in the attached patch, which works well for me. I have still crashes (when pasting). I don't have time to work on it further for the time being, so I put it on hold. -- Jürgen signature.asc Description:

Re: [patch] Selection stats in statusbar[RESOLVED]

2022-08-19 Thread Kornel Benko
Am Fri, 19 Aug 2022 10:47:06 +0200 schrieb Kornel Benko : > Am Fri, 19 Aug 2022 10:44:23 +0200 > schrieb Kornel Benko : > > > Am Fri, 19 Aug 2022 10:16:43 +0200 > > schrieb "Jürgen Spitzmüller" : > > > > > Am Freitag, dem 19.08.2022 um 10:07 +0200 schrieb Kornel Benko: > > > > Both.

Re: [patch] Selection stats in statusbar

2022-08-19 Thread Kornel Benko
Am Fri, 19 Aug 2022 10:44:23 +0200 schrieb Kornel Benko : > Am Fri, 19 Aug 2022 10:16:43 +0200 > schrieb "Jürgen Spitzmüller" : > > > Am Freitag, dem 19.08.2022 um 10:07 +0200 schrieb Kornel Benko: > > > Both. > > > > Interesting. I'd need a recipe for the latter. > > > > Nothing speci

Re: [patch] Selection stats in statusbar

2022-08-19 Thread Kornel Benko
Am Fri, 19 Aug 2022 10:16:43 +0200 schrieb "Jürgen Spitzmüller" : > Am Freitag, dem 19.08.2022 um 10:07 +0200 schrieb Kornel Benko: > > Both. > > Interesting. I'd need a recipe for the latter. > Nothing specific. Does not matter what or how I select some parts, the number of spaces is wrong (

Re: [patch] Selection stats in statusbar

2022-08-19 Thread Jürgen Spitzmüller
Am Freitag, dem 19.08.2022 um 10:07 +0200 schrieb Kornel Benko: > Both. Interesting. I'd need a recipe for the latter. -- Jürgen signature.asc Description: This is a digitally signed message part -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel

Re: [patch] Selection stats in statusbar

2022-08-19 Thread Kornel Benko
Am Fri, 19 Aug 2022 09:59:45 +0200 schrieb "Jürgen Spitzmüller" : > Am Freitag, dem 19.08.2022 um 09:54 +0200 schrieb Kornel Benko: > > I seen it in the status bar. Dialog shows OK. > > And only of you select whole words (e.g. via double click)? Or also if > you select manually? > Both.

Re: [patch] Selection stats in statusbar

2022-08-19 Thread Jürgen Spitzmüller
Am Freitag, dem 19.08.2022 um 09:54 +0200 schrieb Kornel Benko: > I seen it in the status bar. Dialog shows OK. And only of you select whole words (e.g. via double click)? Or also if you select manually? -- Jürgen signature.asc Description: This is a digitally signed message part -- lyx-devel

Re: [patch] Selection stats in statusbar

2022-08-19 Thread Kornel Benko
Am Fri, 19 Aug 2022 09:34:29 +0200 schrieb "Jürgen Spitzmüller" : > Am Freitag, dem 19.08.2022 um 08:42 +0200 schrieb Kornel Benko: > > There is something not correct with showing number of spaces in > > Chinese docs. > > > > 1.) Open zh_CN/Tutorial.lyx > > 2.) Select a single word e.g. 参考文献和交叉引用

Re: [patch] Selection stats in statusbar

2022-08-19 Thread Jürgen Spitzmüller
Am Freitag, dem 19.08.2022 um 08:42 +0200 schrieb Kornel Benko: > There is something not correct with showing number of spaces in > Chinese docs. > > 1.) Open zh_CN/Tutorial.lyx > 2.) Select a single word e.g. 参考文献和交叉引用有点像 >     => you get >    number of words1 >    number of char 

Re: [patch] Selection stats in statusbar

2022-08-19 Thread Kornel Benko
Am Fri, 19 Aug 2022 08:42:20 +0200 schrieb Kornel Benko : > Am Fri, 19 Aug 2022 07:06:57 +0200 > schrieb "Jürgen Spitzmüller" : > > > Am Donnerstag, dem 18.08.2022 um 18:43 +0200 schrieb Jean-Marc > > Lasgouttes: > > > Indeed, threads create lots of interesting bugs... It would be better > > >

Re: [patch] Selection stats in statusbar

2022-08-18 Thread Kornel Benko
Am Fri, 19 Aug 2022 07:06:57 +0200 schrieb "Jürgen Spitzmüller" : > Am Donnerstag, dem 18.08.2022 um 18:43 +0200 schrieb Jean-Marc > Lasgouttes: > > Indeed, threads create lots of interesting bugs... It would be better > > if we could avoid them > > The UX difference to the timer approach is h

Re: [patch] Selection stats in statusbar

2022-08-18 Thread Jürgen Spitzmüller
Am Donnerstag, dem 18.08.2022 um 18:43 +0200 schrieb Jean-Marc Lasgouttes: > Indeed, threads create lots of interesting bugs... It would be better > if we could avoid them The UX difference to the timer approach is huge. The threaded calculation feels smooth and is almost instant. The crash is f

Re: [patch] Selection stats in statusbar

2022-08-18 Thread Jean-Marc Lasgouttes
Indeed, threads create lots of interesting bugs... It would be better if we could avoid them JMarc Le 18 août 2022 18:13:38 GMT+02:00, "Jürgen Spitzmüller" a écrit  >Performance is an issue in larger documents (e.g., UserGuide). > >This one, using threads, is snappy and seems to update relia

Re: [patch] Selection stats in statusbar

2022-08-18 Thread Jürgen Spitzmüller
Am Donnerstag, dem 18.08.2022 um 11:42 +0200 schrieb Jürgen Spitzmüller: > The attached seems to work basically. But I haven't check for all > cases (I am dure there are cases I missed) and didn't push hard for > performance (currently the timer is commented out; if this is too > expensive, process

Re: [patch] Selection stats in statusbar

2022-08-18 Thread Jean-Marc Lasgouttes
Le 18 août 2022 14:25:28 GMT+02:00, "Jürgen Spitzmüller" a écrit : >> My method: statistics update only when idle for a long enough time >> and only once, hence, cannot interfere with continuous typing and are >> very unlikely to interfere at all. > >And it updated after that timing whether it

Re: [patch] Selection stats in statusbar

2022-08-18 Thread Daniel
On 18/08/2022 14:25, Jürgen Spitzmüller wrote: Am Donnerstag, dem 18.08.2022 um 14:08 +0200 schrieb Daniel: No function exits early on that approach. The function does not get called in the first place. I think it is really better. Currently: statistics update continuously and, hence, can inter

Re: [patch] Selection stats in statusbar

2022-08-18 Thread Jürgen Spitzmüller
Am Donnerstag, dem 18.08.2022 um 14:08 +0200 schrieb Daniel: > No function exits early on that approach. The function does not get > called in the first place. I think it is really better. > > Currently: statistics update continuously and, hence, can interfere > with continuous typing. Which is

Re: [patch] Selection stats in statusbar

2022-08-18 Thread Daniel
On 18/08/2022 11:44, Jürgen Spitzmüller wrote: Am Donnerstag, dem 18.08.2022 um 11:31 +0200 schrieb Daniel: This shouldn't be an issue. The idea is that statistics are only generated after some time has passed without interruption. They are not shown immediately. Hence, continuous arrow key move

Re: [patch] Selection stats in statusbar

2022-08-18 Thread Scott Kostyshak
On Thu, Aug 18, 2022 at 11:44:49AM +0200, Jürgen Spitzmüller wrote: > Am Donnerstag, dem 18.08.2022 um 11:31 +0200 schrieb Daniel: > > This shouldn't be an issue. The idea is that statistics are only > > generated after some time has passed without interruption. They are > > not > > shown immedia

Re: [patch] Selection stats in statusbar

2022-08-18 Thread Jürgen Spitzmüller
Am Donnerstag, dem 18.08.2022 um 11:31 +0200 schrieb Daniel: > This shouldn't be an issue. The idea is that statistics are only > generated after some time has passed without interruption. They are > not > shown immediately. Hence, continuous arrow key movement would not > trigger statistics at

Re: [patch] Selection stats in statusbar

2022-08-18 Thread Jürgen Spitzmüller
Am Donnerstag, dem 18.08.2022 um 09:55 +0200 schrieb Jürgen Spitzmüller: > You need a more suitable signal that only emits when text is edited > or loaded. The attached seems to work basically. But I haven't check for all cases (I am dure there are cases I missed) and didn't push hard for performa

Re: [patch] Selection stats in statusbar

2022-08-18 Thread Daniel
On 18/08/2022 09:55, Jürgen Spitzmüller wrote: Am Mittwoch, dem 17.08.2022 um 19:40 +0200 schrieb Daniel: What I did in https://www.lyx.org/trac/attachment/ticket/12422/0001-Show-word-count-in-status-bar.patch was just to hook it on GuiView::showMessage() because this would be updated in all c

Re: [patch] Selection stats in statusbar

2022-08-18 Thread Jürgen Spitzmüller
Am Mittwoch, dem 17.08.2022 um 19:40 +0200 schrieb Daniel: > What I did in > > https://www.lyx.org/trac/attachment/ticket/12422/0001-Show-word-count-in-status-bar.patch > > was just to hook it on GuiView::showMessage() because this would be > updated in all cases where text stuff changes.  show

Re: [patch] Selection stats in statusbar

2022-08-17 Thread Daniel
On 2022-08-17 18:41, Jürgen Spitzmüller wrote: Am Mittwoch, dem 10.08.2022 um 08:01 +0200 schrieb Daniel: 1. The delay timer seems not to be working as expected. Normally, i.e. in other word processors, the idea is this: While typing, no updating takes place, only once the typing stops, the upd

Re: [patch] Selection stats in statusbar

2022-08-17 Thread Jürgen Spitzmüller
Am Mittwoch, dem 10.08.2022 um 08:01 +0200 schrieb Daniel: > 1. The delay timer seems not to be working as expected. Normally, > i.e. > in other word processors, the idea is this: > > While typing, no updating takes place, only once the typing stops, > the > update timer starts. Once typing is c

Re: [patch] Selection stats in statusbar

2022-08-17 Thread Daniel
On 11/08/2022 08:54, Pavel Sanda wrote: On Wed, Aug 10, 2022 at 08:01:47AM +0200, Daniel wrote: I just tested the new feature. Here are a couple of things that came to my mind: 1. The delay timer seems not to be working as expected. Normally, i.e. in other word processors, the idea is this: Wh

Re: [patch] Selection stats in statusbar

2022-08-17 Thread Jürgen Spitzmüller
Am Mittwoch, dem 17.08.2022 um 14:21 +0200 schrieb Pavel Sanda: > I am travelling now, so please do as you see fit, I trust your UI > eye. Thanks, done. Have a good trip. -- Jürgen signature.asc Description: This is a digitally signed message part -- lyx-devel mailing list lyx-devel@lists.lyx

Re: [patch] Selection stats in statusbar

2022-08-17 Thread Pavel Sanda
On Wed, Aug 17, 2022 at 11:00:39AM +0200, Jürgen Spitzmüller wrote: > Am Dienstag, dem 16.08.2022 um 12:44 +0200 schrieb Jürgen Spitzmüller: > > I've seen now that you flagged it for localization. But this is still > > to anglocentric. Use bformat to construct the string. BTW there is > > also > >

Re: [patch] Selection stats in statusbar

2022-08-17 Thread Kornel Benko
Am Wed, 17 Aug 2022 12:39:01 +0200 schrieb "Jürgen Spitzmüller" : > Am Mittwoch, dem 17.08.2022 um 12:35 +0200 schrieb Daniel: > > 1 slovo > > Počet slov: 2... (Wordcount: 2... if I understood correctly) > > This could be done on po-level if desired. No code change needed. It is that way in my

Re: [patch] Selection stats in statusbar

2022-08-17 Thread Kornel Benko
Am Wed, 17 Aug 2022 12:35:05 +0200 schrieb Daniel : > On 17/08/2022 12:01, Jürgen Spitzmüller wrote: > > Am Mittwoch, dem 17.08.2022 um 11:56 +0200 schrieb Jürgen Spitzmüller: > >> If the number of inter-language variations is limited, this can be > >> supported as well. > > > > OTOH the prob

Re: [patch] Selection stats in statusbar

2022-08-17 Thread Jürgen Spitzmüller
Am Mittwoch, dem 17.08.2022 um 12:35 +0200 schrieb Daniel: > 1 slovo > Počet slov: 2... (Wordcount: 2... if I understood correctly) This could be done on po-level if desired. No code change needed. -- Jürgen signature.asc Description: This is a digitally signed message part -- lyx-devel maili

Re: [patch] Selection stats in statusbar

2022-08-17 Thread Daniel
On 17/08/2022 12:01, Jürgen Spitzmüller wrote: Am Mittwoch, dem 17.08.2022 um 11:56 +0200 schrieb Jürgen Spitzmüller: If the number of inter-language variations is limited, this can be supported as well. OTOH the problem is also unsolved in the existing statistics dialog. Word uses 1 slovo

Re: [patch] Selection stats in statusbar

2022-08-17 Thread Daniel
On 17/08/2022 11:57, Jürgen Spitzmüller wrote: Am Mittwoch, dem 17.08.2022 um 11:28 +0200 schrieb Daniel: If the usage of QStringList is fine, it can also be written a bit more concise as. Sure. Though it doesn't buy much. I guess one should choose (even slightly) less complex code whenever

Re: [patch] Selection stats in statusbar

2022-08-17 Thread Jürgen Spitzmüller
Am Mittwoch, dem 17.08.2022 um 11:56 +0200 schrieb Jürgen Spitzmüller: > If the number of inter-language variations is limited, this can be > supported as well. OTOH the problem is also unsolved in the existing statistics dialog. -- Jürgen signature.asc Description: This is a digitally signed

Re: [patch] Selection stats in statusbar

2022-08-17 Thread Jürgen Spitzmüller
Am Mittwoch, dem 17.08.2022 um 11:28 +0200 schrieb Daniel: > If the usage of QStringList is fine, it can also be written a bit > more concise as.  Sure. Though it doesn't buy much. > Also, chars_with_blanks should probably be inside the > second "if statement" No, this is re-used further below.

Re: [patch] Selection stats in statusbar

2022-08-17 Thread Jürgen Spitzmüller
Am Mittwoch, dem 17.08.2022 um 11:41 +0200 schrieb Kornel Benko: > What about languages with different plurals. > > In Slovak for example it would be > 1 slovo > 2..4 slová > 5..\infty slov If the number of inter-language variations is limited, this can be supported as well. -- Jürgen signatu

Re: [patch] Selection stats in statusbar

2022-08-17 Thread Kornel Benko
Am Wed, 17 Aug 2022 11:28:53 +0200 schrieb Daniel : > On 17/08/2022 11:13, Jürgen Spitzmüller wrote: > > Am Mittwoch, dem 17.08.2022 um 11:00 +0200 schrieb Jürgen Spitzmüller: > >> Attached the way I'd recommend to do it: > >> > >> * do not use abbreviations > >> * allow to enable the stats meas

Re: [patch] Selection stats in statusbar

2022-08-17 Thread Daniel
On 17/08/2022 11:13, Jürgen Spitzmüller wrote: Am Mittwoch, dem 17.08.2022 um 11:00 +0200 schrieb Jürgen Spitzmüller: Attached the way I'd recommend to do it: * do not use abbreviations * allow to enable the stats measures individually * left click on stats in status bar opens stats dialog (as

Re: [patch] Selection stats in statusbar

2022-08-17 Thread Jürgen Spitzmüller
Am Mittwoch, dem 17.08.2022 um 11:00 +0200 schrieb Jürgen Spitzmüller: > Attached the way I'd recommend to do it: > > * do not use abbreviations > * allow to enable the stats measures individually > * left click on stats in status bar opens stats dialog (as in LO and > Word) > > The rationale bes

Re: [patch] Selection stats in statusbar

2022-08-17 Thread Jürgen Spitzmüller
Am Dienstag, dem 16.08.2022 um 12:44 +0200 schrieb Jürgen Spitzmüller: > I've seen now that you flagged it for localization. But this is still > to anglocentric. Use bformat to construct the string. BTW there is > also > a qt_() function, no need for toqstr(_()). > > My point that one-letter abbre

Re: [patch] Selection stats in statusbar

2022-08-16 Thread Jürgen Spitzmüller
Am Dienstag, dem 16.08.2022 um 12:12 +0200 schrieb Jürgen Spitzmüller: > It's horrible, really. You need not only to spell it out, but also > localize it. I've seen now that you flagged it for localization. But this is still to anglocentric. Use bformat to construct the string. BTW there is also a

Re: [patch] Selection stats in statusbar

2022-08-16 Thread Jürgen Spitzmüller
Am Donnerstag, dem 11.08.2022 um 08:54 +0200 schrieb Pavel Sanda: > > 2. The display is quite cryptic since it is not immediately clear > > what "w", > > "c" and "cb" is. Minimally, I suggest to add a tooltip explaining > > this. > > Ideally, I would write at least "3 words, 23 characters" out, as

Re: [patch] Selection stats in statusbar

2022-08-10 Thread Pavel Sanda
On Wed, Aug 10, 2022 at 08:01:47AM +0200, Daniel wrote: > I just tested the new feature. Here are a couple of things that came to my > mind: > > 1. The delay timer seems not to be working as expected. Normally, i.e. in > other word processors, the idea is this: > > While typing, no updating takes

Re: [patch] Selection stats in statusbar

2022-08-09 Thread Daniel
On 2022-08-09 23:53, Pavel Sanda wrote: On Sat, Aug 06, 2022 at 12:23:25PM -0400, Scott Kostyshak wrote: I suggest we put this into master and let ppl test on their machines if any noticeable changes are visible when editing documents. At worst we can disable this feature by default. Sounds go

Re: [patch] Selection stats in statusbar

2022-08-09 Thread Scott Kostyshak
On Tue, Aug 09, 2022 at 11:53:05PM +0200, Pavel Sanda wrote: > On Sat, Aug 06, 2022 at 12:23:25PM -0400, Scott Kostyshak wrote: > > > I suggest we put this into master and let ppl test on their machines > > > if any noticeable changes are visible when editing documents. At worst > > > we can disabl

Re: [patch] Selection stats in statusbar

2022-08-09 Thread Pavel Sanda
On Sat, Aug 06, 2022 at 12:23:25PM -0400, Scott Kostyshak wrote: > > I suggest we put this into master and let ppl test on their machines > > if any noticeable changes are visible when editing documents. At worst > > we can disable this feature by default. > > Sounds good to me. Thanks for the pat

Re: [patch] Selection stats in statusbar

2022-08-06 Thread Scott Kostyshak
On Thu, Aug 04, 2022 at 11:35:31PM +0200, Pavel Sanda wrote: > On Sun, Jul 31, 2022 at 07:29:35AM -0400, Scott Kostyshak wrote: > > On Sun, Jul 31, 2022 at 11:34:25AM +0200, Pavel Sanda wrote: > > > On Sun, Jul 31, 2022 at 05:16:17AM -0400, Scott Kostyshak wrote: > > > > I'm on vacation and won't b

Re: [patch] Selection stats in statusbar

2022-08-04 Thread Pavel Sanda
On Sun, Jul 31, 2022 at 07:29:35AM -0400, Scott Kostyshak wrote: > On Sun, Jul 31, 2022 at 11:34:25AM +0200, Pavel Sanda wrote: > > On Sun, Jul 31, 2022 at 05:16:17AM -0400, Scott Kostyshak wrote: > > > I'm on vacation and won't be able to test for a few weeks. Can you do > > > the test I described

Re: [patch] Selection stats in statusbar

2022-07-31 Thread Scott Kostyshak
On Sun, Jul 31, 2022 at 11:34:25AM +0200, Pavel Sanda wrote: > On Sun, Jul 31, 2022 at 05:16:17AM -0400, Scott Kostyshak wrote: > > I'm on vacation and won't be able to test for a few weeks. Can you do > > the test I described before? Just select a big document, and then hold > > Shift + to decrea

Re: [patch] Selection stats in statusbar

2022-07-31 Thread Pavel Sanda
On Sun, Jul 31, 2022 at 05:16:17AM -0400, Scott Kostyshak wrote: > I'm on vacation and won't be able to test for a few weeks. Can you do > the test I described before? Just select a big document, and then hold > Shift + to decrease the selection towards the beginning of the > document. I just coun

Re: [patch] Selection stats in statusbar

2022-07-31 Thread Scott Kostyshak
On Sun, Jul 31, 2022 at 12:35:30AM +0200, Pavel Sanda wrote: > On Fri, Jul 15, 2022 at 12:05:25AM +0200, Pavel Sanda wrote: > > On Thu, Jul 14, 2022 at 09:31:06AM +0200, Daniel wrote: > > > >The drawback is that's it's difficult to understand the interaction > > > >between > > > >the two timers no

Re: [patch] Selection stats in statusbar

2022-07-30 Thread Pavel Sanda
On Fri, Jul 15, 2022 at 12:05:25AM +0200, Pavel Sanda wrote: > On Thu, Jul 14, 2022 at 09:31:06AM +0200, Daniel wrote: > > >The drawback is that's it's difficult to understand the interaction between > > >the two timers now. I stared on the code for couple minutes and it was > > >not clear to me wh

Re: [patch] Selection stats in statusbar

2022-07-14 Thread Pavel Sanda
On Thu, Jul 14, 2022 at 09:31:06AM +0200, Daniel wrote: > >The drawback is that's it's difficult to understand the interaction between > >the two timers now. I stared on the code for couple minutes and it was > >not clear to me what is the idea behind your stop/start changes. > > Some comments wou

Re: [patch] Selection stats in statusbar

2022-07-14 Thread Daniel
On 2022-07-14 00:13, Pavel Sanda wrote: On Wed, Jul 13, 2022 at 08:54:28AM +0200, Daniel wrote: Hi, There is also a patch for instant counts at https://www.lyx.org/trac/ticket/12422. It works with delayed calculations. I have no idea how this does performance wise, but it might be worth checkin

Re: [patch] Selection stats in statusbar

2022-07-13 Thread Pavel Sanda
On Wed, Jul 13, 2022 at 08:54:28AM +0200, Daniel wrote: > Hi, > > There is also a patch for instant counts at > https://www.lyx.org/trac/ticket/12422. It works with delayed calculations. I > have no idea how this does performance wise, but it might be worth checking > out. Yes, that's lazy man ap

Re: [patch] Selection stats in statusbar

2022-07-12 Thread Daniel
On 2022-07-13 00:50, Pavel Sanda wrote: On Tue, Jul 12, 2022 at 04:31:20PM -0400, Scott Kostyshak wrote: However, it seems to have a pretty big hit on performance. The way I checked was starting with select-all on a document, and then doing shift + up and seeing how long it took to get to the to

Re: [patch] Selection stats in statusbar

2022-07-12 Thread Pavel Sanda
On Tue, Jul 12, 2022 at 04:31:20PM -0400, Scott Kostyshak wrote: > However, it seems to have a pretty big hit on performance. The way I > checked was starting with select-all on a document, and then doing shift > + up and seeing how long it took to get to the top. It took 16 seconds > without the p

Re: [patch] Selection stats in statusbar

2022-07-12 Thread Jean-Marc Lasgouttes
Le 12/07/2022 à 22:31, Scott Kostyshak a écrit : Part of it is that I just like to bother JMarc, I am glad to humor you. As for how to solve the performance issue, is there any smart caching that can be done? The first thing to do would be to scrap the current method and create a new ver

Re: [patch] Selection stats in statusbar

2022-07-12 Thread Scott Kostyshak
On Tue, Jul 12, 2022 at 09:12:56PM +0200, Pavel Sanda wrote: > Hi, > > I need to adhere precise word/character counts in sections of a document. > For this I need to have instantaneous visual feedback of stats when selecting > blocks of text. > > The attached patch does this. Is there some object

Re: [patch] Selection stats in statusbar

2022-07-12 Thread Jean-Marc Lasgouttes
Le 12/07/2022 à 21:12, Pavel Sanda a écrit : Hi, I need to adhere precise word/character counts in sections of a document. For this I need to have instantaneous visual feedback of stats when selecting blocks of text. The attached patch does this. Is there some objection to push this into master

Re: [patch] Selection painting in Insets

2008-10-13 Thread Andre Poenitz
On Tue, Oct 14, 2008 at 01:02:24AM +0200, Pavel Sanda wrote: > Abdelrazak Younes wrote: > > OK, I missed that part of the patch indeed. Dov confirmed that it is OK so, > > Pavel, if you have it applied locally please commit. > > even if i don't speak french? That's fine as long as you eat whale.

Re: [patch] Selection painting in Insets

2008-10-13 Thread Pavel Sanda
Abdelrazak Younes wrote: > OK, I missed that part of the patch indeed. Dov confirmed that it is OK so, > Pavel, if you have it applied locally please commit. even if i don't speak french? pavel

Re: [patch] Selection painting in Insets

2008-10-13 Thread Abdelrazak Younes
On 13/10/2008 22:11, Vincent van Ravesteijn wrote: The piece of code you showed is indeed just renaming, but I think this makes more sense than the way it was before: if the end margin is selected, only the left margin is important for RTL text and the right margin for LTR text. By the way, bv_-

Re: [patch] Selection painting in Insets

2008-10-13 Thread Vincent van Ravesteijn
On Mon, 2008-10-13 at 09:01 +0200, Abdelrazak Younes wrote: > On 12/10/2008 21:24, Vincent van Ravesteijn wrote: > > Vincent van Ravesteijn wrote: > > > >> This patch solves some problems with painting selections in Insets. > >> These are: > >> - multiline selections paint in left margin of the

Re: [patch] Selection painting in Insets

2008-10-13 Thread Dov Feldstern
Abdelrazak Younes wrote: On 13/10/2008 16:23, Dov Feldstern wrote: Abdelrazak Younes wrote: +if (row.end_margin_sel) { if (text_->isRTL(buffer, beg.paragraph())) { -int rm = bv_->rightMargin(); -pi.pain.fillRectangle(x + rm, y1, x2 - rm, y2 - y1, Color_sel

Re: [patch] Selection painting in Insets

2008-10-13 Thread Abdelrazak Younes
On 13/10/2008 16:23, Dov Feldstern wrote: Abdelrazak Younes wrote: +if (row.end_margin_sel) { if (text_->isRTL(buffer, beg.paragraph())) { -int rm = bv_->rightMargin(); -pi.pain.fillRectangle(x + rm, y1, x2 - rm, y2 - y1, Color_selection); +pi.

Re: [patch] Selection painting in Insets

2008-10-13 Thread Dov Feldstern
Abdelrazak Younes wrote: On 12/10/2008 21:24, Vincent van Ravesteijn wrote: Vincent van Ravesteijn wrote: This patch solves some problems with painting selections in Insets. These are: - multiline selections paint in left margin of the main text (bug 5270), - the margins to the left and righ

Re: [patch] Selection painting in Insets

2008-10-13 Thread Abdelrazak Younes
On 12/10/2008 21:24, Vincent van Ravesteijn wrote: Vincent van Ravesteijn wrote: This patch solves some problems with painting selections in Insets. These are: - multiline selections paint in left margin of the main text (bug 5270), - the margins to the left and right side of the inset are n

Re: [patch] Selection painting in Insets

2008-10-12 Thread Pavel Sanda
Vincent van Ravesteijn wrote: > > I renamed the Row::left_margin_sel back to Row::begin_margin_sel > > because > > of RTL text. > > > > Is there yet a verdict for this patch ? i tested the last version and from the functional point of view it was ok. but i know nothing about painting, so somebo

Re: [patch] Selection painting in Insets

2008-10-12 Thread Vincent van Ravesteijn
Vincent van Ravesteijn wrote: > This patch solves some problems with painting selections in Insets. > These are: > - multiline selections paint in left margin of the main text > (bug 5270), > - the margins to the left and right side of the inset are not correct, > - wrong painting of e.g. a multil

Re: [patch] Selection painting in Insets

2008-10-09 Thread Pavel Sanda
Abdelrazak Younes wrote: > On 05/10/2008 18:53, rgheck wrote: >> Pavel Sanda wrote: >>> diff --git a/src/BufferView.h b/src/BufferView.h >>> index d418260..585792d 100644 >>> --- a/src/BufferView.h >>> +++ b/src/BufferView.h >>> @@ -92,9 +92,11 @@ public: >>> /// >>> void setFullScreen(bo

Re: [patch] Selection painting in Insets

2008-10-05 Thread Abdelrazak Younes
On 05/10/2008 18:53, rgheck wrote: Pavel Sanda wrote: diff --git a/src/BufferView.h b/src/BufferView.h index d418260..585792d 100644 --- a/src/BufferView.h +++ b/src/BufferView.h @@ -92,9 +92,11 @@ public: /// void setFullScreen(bool full_screen) { full_screen_ = full_screen; } +

Re: [patch] Selection painting in Insets

2008-10-05 Thread rgheck
Pavel Sanda wrote: diff --git a/src/BufferView.h b/src/BufferView.h index d418260..585792d 100644 --- a/src/BufferView.h +++ b/src/BufferView.h @@ -92,9 +92,11 @@ public: /// void setFullScreen(bool full_screen) { full_screen_ = full_screen; } + //FIXME: In RTL text this is the

Re: [patch] Selection painting in Insets

2008-10-05 Thread Pavel Sanda
Vincent van Ravesteijn wrote: > This patch solves some problems with painting selections in Insets. > These are: > - multiline selections paint in left margin of the main text (bug 5270), > - the margins to the left and right side of the inset are not correct, > - wrong painting of e.g. a multiline

Re: [patch] selection in source panel

2007-08-25 Thread Jürgen Spitzmüller
Alfredo Braunstein wrote: > I fixed some glitches and I have positive reports from Enrico and Bo. Even > if the patch seems safe, this is just a small feature. I'll wait a little > bit longer if everything works as expected for everyone. OK. Jürgen

Re: [patch] selection in source panel

2007-08-25 Thread Alfredo Braunstein
Jürgen Spitzmüller wrote: > Alfredo Braunstein wrote: >> > Yes for trunk. Wait for Juergen if you want branch too. >> >> Commited. If there are no problems with the new feature in the next days >> I'll ask Juergen. > > OK if everything works as expected and you are confident about it. I fixed so

Re: [patch] selection in source panel

2007-08-25 Thread Jürgen Spitzmüller
Alfredo Braunstein wrote: > > Yes for trunk. Wait for Juergen if you want branch too. > > Commited. If there are no problems with the new feature in the next days > I'll ask Juergen. OK if everything works as expected and you are confident about it. Jürgen

Re: [patch] selection in source panel

2007-08-17 Thread Alfredo Braunstein
Bo Peng wrote: > Just let you know that after the layout files are correctly installed, > the view panel works fine. Niiice I don't have to install qt 4.1 (or trick someone into fixing it) ;-) A/

Re: [patch] selection in source panel

2007-08-17 Thread Bo Peng
Just let you know that after the layout files are correctly installed, the view panel works fine. Cheers, Bo

Re: [patch] selection in source panel

2007-08-16 Thread Enrico Forestieri
On Thu, Aug 16, 2007 at 02:04:02PM +0200, Alfredo Braunstein wrote: > Ugh. We could set the font explicitly I guess, don't know if this makes > sense. Here you can change font size on the widget with C-MouseWheel. Cool! Didn't know that trick. It works with all Qt versions, the only difference b

Re: [patch] selection in source panel

2007-08-16 Thread Alfredo Braunstein
Enrico Forestieri wrote: > We can also rule out 4.1.4, as it differs from 4.1.5 by an epsilon. Ok. >> Wrt. to the glitch, the attached should fix it, hopefully without >> introducing other glitches. It turns out it is trickier than it may seem >> to get all corner cases right (1 position -> mul

Re: [patch] selection in source panel

2007-08-16 Thread Enrico Forestieri
On Thu, Aug 16, 2007 at 10:53:54AM +0200, Alfredo Braunstein wrote: > Enrico Forestieri wrote: > > > I don't know what exactly does not work. I am testing it with Qt 4.1.5 > > Neither do I unfortunately :-( It seems only some qt (sub)versions are > affected? Bo, could you give a specific (small)

Re: [patch] selection in source panel

2007-08-16 Thread Alfredo Braunstein
Enrico Forestieri wrote: > I don't know what exactly does not work. I am testing it with Qt 4.1.5 Neither do I unfortunately :-( It seems only some qt (sub)versions are affected? Bo, could you give a specific (small) test case? > on cygwin. After opening the View Source window, when I position t

Re: [patch] selection in source panel

2007-08-15 Thread Enrico Forestieri
On Thu, Aug 16, 2007 at 05:42:26AM +0200, Enrico Forestieri wrote: > Rather, there's a problem with Qt 4.3. The line in the View Source > window is highlighted only when clicking on the View Source scroll > bar. However, when doing so, the cursor in the main window disappears, > such that you visu

Re: [patch] selection in source panel

2007-08-15 Thread Enrico Forestieri
On Thu, Aug 16, 2007 at 12:38:28AM +0200, Alfredo Braunstein wrote: > Bo Peng wrote: > > >> > qt422, I am trying 4.1. > >> > >> qt-4.2.3 here. > > > > Qt 4.1 does not work here. Please try 4.1 (the version lyx uses) if > > possible. > > Assuming the problem is the qt version, for me installing

Re: [patch] selection in source panel

2007-08-15 Thread Alfredo Braunstein
Bo Peng wrote: >> > qt422, I am trying 4.1. >> >> qt-4.2.3 here. > > Qt 4.1 does not work here. Please try 4.1 (the version lyx uses) if > possible. Assuming the problem is the qt version, for me installing qt 4.1 is a real PITA, and I would like to avoid it if possible. So if someone with qt4.

Re: [patch] selection in source panel

2007-08-13 Thread Jean-Marc Lasgouttes
"Bo Peng" <[EMAIL PROTECTED]> writes: >> What? Do we require qt=4.1, not qt>=4.1 nowadays? > > Yeap. No, we require >= 4.1. JMarc

Re: [patch] selection in source panel

2007-08-13 Thread Alfredo Braunstein
Bo Peng wrote: >> What? Do we require qt=4.1, not qt>=4.1 nowadays? > > Yeap. That's kind of absurd... what other problems qt>4.1 gives? A/

Re: [patch] selection in source panel

2007-08-13 Thread Bo Peng
> What? Do we require qt=4.1, not qt>=4.1 nowadays? Yeap. Bo

Re: [patch] selection in source panel

2007-08-13 Thread Alfredo Braunstein
Bo Peng wrote: >> > qt422, I am trying 4.1. >> >> qt-4.2.3 here. > > Qt 4.1 does not work here. Please try 4.1 (the version lyx uses) if > possible. What? Do we require qt=4.1, not qt>=4.1 nowadays? A/

Re: [patch] selection in source panel

2007-08-13 Thread Bo Peng
> > qt422, I am trying 4.1. > > qt-4.2.3 here. Qt 4.1 does not work here. Please try 4.1 (the version lyx uses) if possible. Bo

Re: [patch] selection in source panel

2007-08-13 Thread Alfredo Braunstein
Bo Peng wrote: >> It all looks fine here, could you give a detailed explanation for a very >> short document? >> >> Btw, what's your qt version? > > > qt422, I am trying 4.1. qt-4.2.3 here. A/

Re: [patch] selection in source panel

2007-08-13 Thread Bo Peng
> It all looks fine here, could you give a detailed explanation for a very > short document? > > Btw, what's your qt version? qt422, I am trying 4.1. Bo

Re: [patch] selection in source panel

2007-08-13 Thread Alfredo Braunstein
Bo Peng wrote: >> >> Ah yes, forgot one problem with the very last line of source code, could >> you try the attached? > > Does not work either. It helps a little bit but the gray cursor either > covers the first source line, or the whole paragraph. It all looks fine here, could you give a detai

Re: [patch] selection in source panel

2007-08-13 Thread christian . ridderstrom
On Mon, 13 Aug 2007, Bo Peng wrote: But you get WYSIWYGI rather than WYSIWYM, right? What is that 'I' after WYSIWYG? bakoma can do WYSIWYG (of course with My typo, ignore the 'I' :-) /C -- Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr

Re: [patch] selection in source panel

2007-08-13 Thread Bo Peng
> > Ah yes, forgot one problem with the very last line of source code, could you > try the attached? Does not work either. It helps a little bit but the gray cursor either covers the first source line, or the whole paragraph. Bo

Re: [patch] selection in source panel

2007-08-13 Thread Bo Peng
> > I recently tested a WYSIWYG latex application called bakoma. It hacks > > dvi viewer and allow edition in dvi mode, and in latex source window. > > Using a dvi viewer/editor avoids all our layout troubles. Pretty > > impressed. > > But you get WYSIWYGI rather than WYSIWYM, right? What is that

Re: [patch] selection in source panel

2007-08-13 Thread Alfredo Braunstein
Bo Peng wrote: >> Commited. If there are no problems with the new feature in the next days >> I'll ask Juergen. > > This feature does not work in the trunk. Ah yes, forgot one problem with the very last line of source code, could you try the attached? A/ Index: TexRow.cpp =

Re: [patch] selection in source panel

2007-08-13 Thread christian . ridderstrom
On Mon, 13 Aug 2007, Bo Peng wrote: Not in the near future but... Yes! And I think that Andre's work (TeXStream) may help in this direction. In principle the TeXStream (or a class derived from it) could store the 1:1 table of correspondence between cursor positions and chunks of latex. The expor

  1   2   >