<br><br><div class="gmail_quote">On Mon, Sep 27, 2010 at 2:01 PM, Bernhard Herzog <span dir="ltr"><<a href="mailto:bh@intevation.de">bh@intevation.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
> Modified: skencil/branches/skencil-0.6/src/Sketch/UI/tooltips.py<br>
> ===================================================================<br>
> --- skencil/branches/skencil-0.6/src/Sketch/UI/tooltips.py 2010-09-23 12:02:00 UTC (rev 736)<br>
> +++ skencil/branches/skencil-0.6/src/Sketch/UI/tooltips.py 2010-09-24 10:33:14 UTC (rev 737)<br>
> @@ -70,7 +70,23 @@<br>
> self.last_widget = widget_name<br>
> self.balloon.withdraw()<br>
> self.balloon_label['text'] = text<br>
> - x = x - self.balloon_label.winfo_reqwidth() / 2<br>
> +<br>
> + width=self.balloon_label.winfo_reqwidth()<br>
> + height=self.balloon_label.winfo_reqheight()<br>
> +<br>
> + screenwidth=self.root.winfo_screenwidth()<br>
> + screenheight=self.root.winfo_screenheight()<br>
> +<br>
> + x=self.root.winfo_pointerx()+10<br>
> + y=self.root.winfo_pointery()+20<br>
> +<br>
> + if screenwidth<(x+width):<br>
> + x=x-width<br>
> +<br>
> + if screenheight<(y+height):<br>
> + y=y-height-25<br>
> +<br>
> +# x = x - self.balloon_label.winfo_reqwidth() / 2<br>
<br>
There's no need to keep the old code around as comments. Just remove<br>
it. Also, please try to keep the coding style consistent. the new code<br>
is missing lots of spaces around the binary operators.<br>
<br>
Bernhard<br>
_______________________________________________<br>
Skencil-devel mailing list<br>
<a href="mailto:Skencil-devel@wald.intevation.org">Skencil-devel@wald.intevation.org</a><br>
<a href="http://lists.wald.intevation.org/mailman/listinfo/skencil-devel" target="_blank">http://lists.wald.intevation.org/mailman/listinfo/skencil-devel</a><br>
</blockquote></div><br><br>OK. Thank you for the note. I will check whole source code for commented pieces because <br>such obsolete fragments are sometimes found. For example in the same tooltips.py<br>module 10 lines below. The same is for code reformatted. I have committed the fix for<br>
tooltips.py.<br><br>We have started sK1 using Skencil 0.6.15 Comparing with current trunk version I can say<br>that as a python code and C-extension sources look much more better then ver.0.6.15<br>So I will try to keep code consistency.<br clear="all">
<br>-- <br>Regards,<br><br>Igor Novikov<br>sK1 Project<br><a href="http://sk1project.org" target="_blank">http://sk1project.org</a><br><br><br>