2011-10-31 19:56:13 +01:00
|
|
|
from gi.repository import Gtk
|
|
|
|
|
|
|
|
from sugar3.graphics import iconentry
|
2017-01-11 18:23:08 +01:00
|
|
|
from common import set_theme
|
|
|
|
set_theme()
|
2011-10-31 19:56:13 +01:00
|
|
|
|
2013-05-18 04:48:47 +02:00
|
|
|
|
2011-10-31 19:56:13 +01:00
|
|
|
def __go_next_cb(entry, icon_pos, data=None):
|
|
|
|
print 'Go next'
|
|
|
|
|
2013-05-18 04:48:47 +02:00
|
|
|
|
2011-10-31 19:56:13 +01:00
|
|
|
def __entry_activate_cb(widget, data=None):
|
|
|
|
print 'Entry activate'
|
|
|
|
|
2017-01-05 01:02:26 +01:00
|
|
|
|
2011-10-31 19:56:13 +01:00
|
|
|
w = Gtk.Window()
|
2017-01-11 18:23:08 +01:00
|
|
|
w.connect("delete-event", Gtk.main_quit)
|
2011-10-31 19:56:13 +01:00
|
|
|
|
2017-01-11 18:23:08 +01:00
|
|
|
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
2011-10-31 19:56:13 +01:00
|
|
|
w.add(box)
|
|
|
|
|
|
|
|
entry = iconentry.IconEntry()
|
|
|
|
entry.set_icon_from_name(iconentry.ICON_ENTRY_SECONDARY,
|
|
|
|
'go-next')
|
|
|
|
entry.connect('icon-press', __go_next_cb)
|
|
|
|
entry.connect('activate', __entry_activate_cb)
|
|
|
|
entry.set_progress_fraction(0.3)
|
|
|
|
box.pack_start(entry, False, False, 0)
|
|
|
|
|
|
|
|
w.show_all()
|
|
|
|
|
|
|
|
Gtk.main()
|