My immediate goal is to have less code in drawwindow.py and a clearer separation of concerns. The Window class in drawwindow.py shouldn't handle things like layer, brush and canvas view manipulation, since those are things other parts of the application wants to get to as well. So I introduced a new file gui/document.py and class Document which has exactly these responsibilities. It subclasses the lib.document.Document and holds the reference to the tileddrawwidget which displays it. Its reference is held by Application. Whats left in drawwindow, apart from own its widgets and event setup/handling, is the about/help dialogs and some window handling. That could easily be moved out later, if we want to.
I pushed the changes to branch gui_document on my clone. http://gitorious.org/~jonnor/mypaint/jonnors-clone/commits/gui_document Tell me what you think. I will obviously squash this into one or two prettier commits if you think its good. -- Regards Jon Nordby - www.jonnor.com
_______________________________________________ Mypaint-discuss mailing list [email protected] https://mail.gna.org/listinfo/mypaint-discuss
