[Sugar-devel] Turtle Art in GNOME 3

Walter Bender walter.bender at gmail.com
Tue Apr 12 10:48:42 EDT 2011


On Tue, Apr 12, 2011 at 8:06 AM, Gonzalo Odiard <gonzalo at laptop.org> wrote:
> Walter,
> I don't know very well how resolve it, but I think the problem is with
> changes in GTK3.
> http://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html

Looks like gtk drawable is disappearing altogether...

http://developer.gnome.org/gtk3/stable/ch25s02.html#id1517244

But there is some more immediate problem that I have yet to narrow
down... somehow the scrollable window in which I put my drawable
region is not being initialized properly from Sugar (but is from
GNOME). Stay tuned.

-walter
>
> Gonzalo
>
>
> On Mon, Apr 11, 2011 at 9:33 PM, 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.
>>
>> 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
>>
>> --
>> Walter Bender
>> Sugar Labs
>> http://www.sugarlabs.org
>> _______________________________________________
>> Sugar-devel mailing list
>> Sugar-devel at lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>



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


More information about the Sugar-devel mailing list