[Geany-devel] switch dialog bug - Re: [ANNOUNCE] gproject - yet another geany project plugin
techet at xxxxx
Wed Jun 9 16:48:51 UTC 2010
On Wed, Jun 9, 2010 at 18:17, Nick Treleaven
<nick.treleaven at btinternet.com> wrote:
> On Wed, 9 Jun 2010 15:10:22 +0200
> Jiří Techet <techet at 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
(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.
> Geany-devel mailing list
> Geany-devel at uvena.de
More information about the Devel