Re: [Geany-devel] switch dialog bug - Re: [ANNOUNCE] gproject - yet another geany project plugin

2010-06-09 Thread Jiří Techet
On Wed, Jun 9, 2010 at 14:56, Nick Treleaven
nick.trelea...@btinternet.com wrote:
 On Tue, 8 Jun 2010 18:59:35 +0200
 Jiří Techet tec...@gmail.com wrote:

 And this fix should definitely go to 0.19:

 http://gitorious.org/~techy/geany/techys-geany/commit/62deb4ec5c2b8de4d0979c55f853f529efde223f

 I think I didn't properly describe this one in the commit log - there
 is a 600ms interval in which the panel displaying the current file
 name isn't displayed. If you switch tabs with a keybinding and do it
 too quickly (press it twice in the 600ms period), the wrong file is
 put on top of the stack. The patch could be smaller but I found the
 code a little confusing so I tried to make it clearer a bit.

 Thanks for finding  fixing the bug. However, I'm not sure we should
 put this in the release as the bug isn't too important and the fix
 changes quite a bit of code.


Sure, as you wish. On the other hand I've been using geany with this
modification for 2 months without any problem (and I find this feature
quite important as I work with lots of files and want to be able to
switch between them reliably) while before the tab switching just
didn't work for me.

 BTW, why do you destroy the dialog instead of hiding it?

It's just that I can write

if (switch_dialog)

instead of

if (switch_dialog  GTK_WIDGET_VISIBLE(switch_dialog))

but I can change that if your preference is different.

Regards,

Jiri
___
Geany-devel mailing list
Geany-devel@uvena.de
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] switch dialog bug - Re: [ANNOUNCE] gproject - yet another geany project plugin

2010-06-09 Thread Jiří Techet
On Wed, Jun 9, 2010 at 18:17, Nick Treleaven
nick.trelea...@btinternet.com wrote:
 On Wed, 9 Jun 2010 15:10:22 +0200
 Jiří Techet tec...@gmail.com wrote:

  BTW, why do you destroy the dialog instead of hiding it?

 It's just that I can write

 if (switch_dialog)

 instead of

 if (switch_dialog  GTK_WIDGET_VISIBLE(switch_dialog))

 but I can change that if your preference is different.

 When I wrote the code I assumed it would be faster to keep the dialog
 than reconstruct it each time, but I didn't do any benchmarking.

Optimizations like this would make sense only if you were trying to
open the window 1000-times per second, otherwise the performance
difference is absolutely unimportant.


 Another general issue is that doing more than one change in a
 'patch' makes it harder to review.

I wanted to make the code a bit more readable, that's why there are
more changes. For instance I renamed

switch_dialog_cancelled

to

switch_in_progress

(and inverted the boolean value) because the name was a bit confusing
(switch_dialog_cancelled is set to FALSE [read uncancelled, which is
a bit ugly] 600ms before the switch dialog actually appears). If you
wish, I can try to split it into more patches, I'm just afraid I
introduce some extra bugs on the way.

I've also noticed that I mix spaces and tabs for indents - I'll fix that.

Regards,

Jiri



 Regards,
 Nick
 ___
 Geany-devel mailing list
 Geany-devel@uvena.de
 http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

___
Geany-devel mailing list
Geany-devel@uvena.de
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] switch dialog bug - Re: [ANNOUNCE] gproject - yet another geany project plugin

2010-06-09 Thread Nick Treleaven
On Wed, 9 Jun 2010 18:48:51 +0200
Jiří Techet tec...@gmail.com wrote:

   BTW, why do you destroy the dialog instead of hiding it?
 
  It's just that I can write
 
  if (switch_dialog)
 
  instead of
 
  if (switch_dialog  GTK_WIDGET_VISIBLE(switch_dialog))
 
  but I can change that if your preference is different.
 
  When I wrote the code I assumed it would be faster to keep the dialog
  than reconstruct it each time, but I didn't do any benchmarking.
 
 Optimizations like this would make sense only if you were trying to
 open the window 1000-times per second, otherwise the performance
 difference is absolutely unimportant.

I suppose so in this case. For the Open dialog it may be important as
that can be slow to populate.

 
 
  Another general issue is that doing more than one change in a
  'patch' makes it harder to review.
 
 I wanted to make the code a bit more readable, that's why there are
 more changes. For instance I renamed
 
 switch_dialog_cancelled
 
 to
 
 switch_in_progress
 
 (and inverted the boolean value) because the name was a bit confusing
 (switch_dialog_cancelled is set to FALSE [read uncancelled, which is
 a bit ugly] 600ms before the switch dialog actually appears). If you
 wish, I can try to split it into more patches, I'm just afraid I
 introduce some extra bugs on the way.

OK, don't bother.

 
 I've also noticed that I mix spaces and tabs for indents - I'll fix that.

Regards,
Nick
___
Geany-devel mailing list
Geany-devel@uvena.de
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel