2011-10-31 19:56:13 +01:00
|
|
|
from gi.repository import Gtk
|
|
|
|
|
|
|
|
from sugar3.graphics.notebook import Notebook
|
2017-01-11 18:23:08 +01:00
|
|
|
from common import set_theme
|
|
|
|
set_theme()
|
2011-10-31 19:56:13 +01:00
|
|
|
|
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)
|
|
|
|
|
|
|
|
nb = Notebook(can_close_tabs=True)
|
|
|
|
box.pack_start(nb, False, False, 0)
|
|
|
|
|
|
|
|
for i in range(5):
|
2017-01-11 18:23:08 +01:00
|
|
|
bufferf = "Prepend Frame %d" % (i + 1)
|
|
|
|
bufferl = "PPage %d" % (i + 1)
|
2011-10-31 19:56:13 +01:00
|
|
|
|
|
|
|
frame = Gtk.Frame()
|
|
|
|
frame.set_border_width(10)
|
|
|
|
frame.set_size_request(100, 75)
|
|
|
|
label = Gtk.Label(bufferf)
|
|
|
|
frame.add(label)
|
|
|
|
label.show()
|
|
|
|
nb.add_page(bufferl, frame)
|
|
|
|
frame.show()
|
|
|
|
|
|
|
|
w.show_all()
|
|
|
|
|
|
|
|
Gtk.main()
|