[Sugar-devel] Turtle Art in GNOME 3

Peter Robinson pbrobinson at gmail.com
Tue Apr 12 02:05:32 EDT 2011


Hi Walter,

On Tue, Apr 12, 2011 at 1:33 AM, Walter Bender <walter.bender at gmail.com> wrote:
> For some reason, when I try to access the window of my drawable area,
> it is coming back as None. I wonder if this is something that has
> somehow changed in GNOME 3.

It shouldn't be due to gnome3. We're still using gtk2/metacity for
sugar. The version is gtk2-2.24.4 so you might want to check the API
docs to see if anything has changed there. Do you use pygtk?

> A DrawingArea is created using the constructor:
>
>  drawing_area = gtk.DrawingArea()
>
> A DrawingArea is initially created with a size of (0, 0) so you should
> use the following method to make the drawing_area visible by setting
> its width and height to useful values greater than zero:
>
>  drawing_area.set_size_request(width, height)
>
> To draw on a DrawingArea you must retrieve the wrapped gtk.gdk.Window
> using the window attribute of the DrawingArea as follows:
>
>  drawable = drawing_area.window
>
> But drawable (which I call area in my code) is None.
>
> I'll keep poking around.
>
> -walter

Peter


More information about the Sugar-devel mailing list