Changes
Jump to navigation
Jump to search
Line 9:
Line 9:
− +
− +
− +
− def __init__(self):+
− +
Line 27:
Line 27:
− +
Development Team/Almanac/Code Snippets (view source)
Revision as of 07:49, 24 February 2007
, 07:49, 24 February 2007no edit summary
import gtk
import gtk
from sugar.activity.Activity import Activity
from sugar.activity import activity
from sugar.graphics.toolbar import Toolbar
from sugar.graphics.toolbar import Toolbar
from sugar.graphics.button import Button
from sugar.graphics.iconbutton import IconButton
class FooActivity(Activity):
class FooActivity(activity.Activity):
def __init__(self, handle):
Activity.__init__(self)
activity.Activity.__init__(self, handle)
canvas = hippo.Canvas()
canvas = hippo.Canvas()
vbox.append(toolbar)
vbox.append(toolbar)
button = Button('theme:stock-close')
button = IconButton(icon_name='theme:stock-close')
button.connect("activated", self._button_activated_cb)
button.connect("activated", self._button_activated_cb)
toolbar.append(button)
toolbar.append(button)