On Mon, 2005-01-03 at 18:11, Bill Kendrick wrote:
> On Mon, Jan 03, 2005 at 11:53:19AM -0500, Albert Cahalan wrote:
> > Much to my horror, I discovered that Tux Paint has
> > distinct near-duplicated code for handling various
> > mouse-related options. This leads to lots of trouble.
> 
> (Whistling innocently)
> 
> Honestly, 2.5 years ago, I didn't think we'd even still be messing
> with the event handling, or much of Tux Paint's internals at all! :^)
> Sorry!

Heh. Sorry for what now looks like rudeness on my part.
Perfectly reasonable code turns horrible when it gets
outgrown by the surrounding code. I'm sure it was all
quite sane before stamp options, various dialogs, etc.
Then, 10000+ lines later, it needs some reworking.

> I'm not sure about making a complete widget system, but I think some
> code consolidation might be good.

The difficulty is that there is sort of an inversion
in the control flow. Early on, events get split apart
by type. (mouse move, mouse click, mouse release, etc.)
Then, these events all end up needing the same sort of
computation to find out what screen object got affected.


_______________________________________________
Tuxpaint-dev mailing list
[email protected]
http://tux4kids.net/mailman/listinfo/tuxpaint-dev

Reply via email to