Re: [Libreoffice] [PUSHED][PATCH] Word count dialog modeless

2011-11-17 Thread Caolán McNamara
On Thu, 2011-11-03 at 23:09 +0100, Jean-Baptiste Faure wrote:
 - I do not know if it possible to make the window resizable, in order do
 not mask the text area

Should put resizability aside for the moment. That's a long-standing
general problem with nearly all our dialogs which needs a some general
work to give a generic solution.

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PUSHED][PATCH] Word count dialog modeless

2011-11-05 Thread Rodolfo
I found one issue:
- When we select by shortcuts (eg, shift + left arrow) it only updates
selection counts in a next selection (showing the results of the
previous selection region)

Regards.

2011/11/3 Jean-Baptiste Faure jbf.fa...@orange.fr:
 Le 03/11/2011 03:21, Matt Pratt a écrit :
 On 11/02/2011 10:10 AM, Caolán McNamara wrote:
 On Wed, 2011-11-02 at 14:55 +, Caolán McNamara wrote:
 There are some titchy little wrinkles worth looking at, e.g. its got
 handlers for cursor and mouse move and things like that to update the
 count, but not apparently for selecting text by clicking the mouse, i.e.
 double click to select a word and single click somewhere else to
 unselect the text.

 I *think* the right thing to do is to additionally hook into EndSelect
 which gets called when a selection is completed, and Invalidate which
 seems to get called when a selection is discarded.
 i.e.
 http://cgit.freedesktop.org/libreoffice/core/commit/?id=0cbcb89fde8cc81db499bc1e388fd53ef6fa3c3f


 Seems to work anyway.

 Wow, thanks for sorting out the wrinkles and pushing the patch so quickly.

 I think with your hook into EndSelect we may be able to get rid of the
 mouse hook?

 Hi Matt,

 I tested the new Word count dialog in the master. It works well but I
 have two points:
 - I do not know if it possible to make the window resizable, in order do
 not mask the text area
 - the counts are updated when you press a character key. If you use an
 autotext (F3), the counts are updated once you have entered another
 character. To test : enter DT+F3 (if your UI is in English, DT for Dummy
 Text).

 Thank you for this patch. :-)

 Best regards.
 JBF

 --
 Seuls des formats ouverts peuvent assurer la pérennité de vos documents.
 ___
 LibreOffice mailing list
 LibreOffice@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/libreoffice

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PUSHED][PATCH] Word count dialog modeless

2011-11-03 Thread Caolán McNamara
On Wed, 2011-11-02 at 20:21 -0600, Matt Pratt wrote:
 I think with your hook into EndSelect we may be able to get rid of the 
 mouse hook?

Give it a shot. Might be the case that EndSelect is not triggered while
holding down the mouse, i.e. dragging to select text, text gets
hightlighted, but count not updated until mouse released. Unsure if
that's what would happen, and if that is what happens if that's a good
thing or a bad thing.

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PUSHED][PATCH] Word count dialog modeless

2011-11-03 Thread Jean-Baptiste Faure
Le 03/11/2011 03:21, Matt Pratt a écrit :
 On 11/02/2011 10:10 AM, Caolán McNamara wrote:
 On Wed, 2011-11-02 at 14:55 +, Caolán McNamara wrote:
 There are some titchy little wrinkles worth looking at, e.g. its got
 handlers for cursor and mouse move and things like that to update the
 count, but not apparently for selecting text by clicking the mouse, i.e.
 double click to select a word and single click somewhere else to
 unselect the text.

 I *think* the right thing to do is to additionally hook into EndSelect
 which gets called when a selection is completed, and Invalidate which
 seems to get called when a selection is discarded.
 i.e.
 http://cgit.freedesktop.org/libreoffice/core/commit/?id=0cbcb89fde8cc81db499bc1e388fd53ef6fa3c3f


 Seems to work anyway.
 
 Wow, thanks for sorting out the wrinkles and pushing the patch so quickly.
 
 I think with your hook into EndSelect we may be able to get rid of the
 mouse hook?

Hi Matt,

I tested the new Word count dialog in the master. It works well but I
have two points:
- I do not know if it possible to make the window resizable, in order do
not mask the text area
- the counts are updated when you press a character key. If you use an
autotext (F3), the counts are updated once you have entered another
character. To test : enter DT+F3 (if your UI is in English, DT for Dummy
Text).

Thank you for this patch. :-)

Best regards.
JBF

-- 
Seuls des formats ouverts peuvent assurer la pérennité de vos documents.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [PUSHED][PATCH] Word count dialog modeless

2011-11-02 Thread Caolán McNamara
On Wed, 2011-11-02 at 14:39 +, Caolán McNamara wrote:
 On Tue, 2011-11-01 at 22:58 -0600, Matt Pratt wrote:
  I was thinking of an easy hack, but I had to submit a brief summary 
  recently where word count was limited and it was a pain to have to 
  continuously open the word count dialog.
  
  I couldn't find a LO bug on this, but there is an OOo one from 2005:
  
  http://openoffice.org/bugzilla/show_bug.cgi?id=46785
 
 Looks very promising. Only catch so far is that wordcountwrapper.hxx is
 missing from the patch, can you git add that one and send again ?

Oh wait, we don't need that header. Some small chopping and it builds
without it.

So, I've pushed this now. It made me chuckle to see the counts update as
I type along.

There are some titchy little wrinkles worth looking at, e.g. its got
handlers for cursor and mouse move and things like that to update the
count, but not apparently for selecting text by clicking the mouse, i.e.
double click to select a word and single click somewhere else to
unselect the text.

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PUSHED][PATCH] Word count dialog modeless

2011-11-02 Thread Caolán McNamara
On Wed, 2011-11-02 at 14:55 +, Caolán McNamara wrote:
 There are some titchy little wrinkles worth looking at, e.g. its got
 handlers for cursor and mouse move and things like that to update the
 count, but not apparently for selecting text by clicking the mouse, i.e.
 double click to select a word and single click somewhere else to
 unselect the text.

I *think* the right thing to do is to additionally hook into EndSelect
which gets called when a selection is completed, and Invalidate which
seems to get called when a selection is discarded.
i.e.
http://cgit.freedesktop.org/libreoffice/core/commit/?id=0cbcb89fde8cc81db499bc1e388fd53ef6fa3c3f

Seems to work anyway.

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PUSHED][PATCH] Word count dialog modeless

2011-11-02 Thread Matt Pratt

On 11/02/2011 10:10 AM, Caolán McNamara wrote:

On Wed, 2011-11-02 at 14:55 +, Caolán McNamara wrote:

There are some titchy little wrinkles worth looking at, e.g. its got
handlers for cursor and mouse move and things like that to update the
count, but not apparently for selecting text by clicking the mouse, i.e.
double click to select a word and single click somewhere else to
unselect the text.


I *think* the right thing to do is to additionally hook into EndSelect
which gets called when a selection is completed, and Invalidate which
seems to get called when a selection is discarded.
i.e.
http://cgit.freedesktop.org/libreoffice/core/commit/?id=0cbcb89fde8cc81db499bc1e388fd53ef6fa3c3f

Seems to work anyway.


Wow, thanks for sorting out the wrinkles and pushing the patch so quickly.

I think with your hook into EndSelect we may be able to get rid of the 
mouse hook?

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice