[Sugar-devel] Turtle Art in GNOME 3

Walter Bender walter.bender at gmail.com
Tue Apr 12 06:46:11 EDT 2011


On Tue, Apr 12, 2011 at 2:05 AM, Peter Robinson <pbrobinson at gmail.com> wrote:
> 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?

I'll have to dig deeper. Everything works fine when I run it from the
GNOME shell, so it must be related to something Sugar is doing (or no
longer doing).

thanks.
-walter
>
>> 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
>



-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org


More information about the Sugar-devel mailing list