Files
sugar-toolkit-gtk3/examples/alert.py
T

26 lines
527 B
Python
Raw Normal View History

from gi.repository import Gtk
2013-04-03 22:01:15 +02:00
from sugar3.graphics.alert import TimeoutAlert
2017-01-11 14:23:08 -03:00
from common import set_theme
set_theme()
2013-05-17 22:48:47 -04:00
def __start_response_cb(widget, data=None):
print 'Response: start download'
2017-01-04 21:02:26 -03:00
w = Gtk.Window()
2017-01-11 14:23:08 -03:00
w.connect("delete-event", Gtk.main_quit)
2017-01-11 14:23:08 -03:00
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
w.add(box)
alert = TimeoutAlert(9)
alert.props.title = 'Download started'
alert.props.msg = 'Sugar'
box.pack_start(alert, False, False, 0)
alert.connect('response', __start_response_cb)
w.show_all()
Gtk.main()