[sugar] Re: API deprecation

Dan Williams dcbw at redhat.com
Tue Feb 27 18:45:23 EST 2007


On Tue, 2007-02-27 at 23:08 +0000, NathanaëlLécaudé wrote:
> If I read correctly we need to embed all our GTK widgets inside CanvasWidget
> otherwise TamTam won't work after the stable build ??

Instead of doing:

class MyActivity(activity.activity):
    def __init__(self):
        ...
        self.add(some_widget)


do this:

class MyActivity(activity.Activity):
    def __init__(self):
        ...
        widget_item = hippo.CanvasWidget(widget=some_widget)
        self.set_root(widget_item)

where some_widget was your base activity widget, like a GtkHBox, VBox,
EventBox, or whatever.

Dan




More information about the Sugar mailing list