2016-12-30 10:35:25 +01:00
|
|
|
from gi.repository import Gtk
|
|
|
|
|
|
|
|
from sugar3.graphics.toolbarbox import ToolbarBox
|
|
|
|
from sugar3.graphics.toggletoolbutton import ToggleToolButton
|
|
|
|
|
|
|
|
import common
|
|
|
|
|
|
|
|
|
|
|
|
test = common.Test()
|
|
|
|
test.show()
|
|
|
|
|
2017-01-11 18:23:08 +01:00
|
|
|
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
|
|
|
test.pack_start(box, True, True, 0)
|
|
|
|
box.show()
|
2016-12-30 10:35:25 +01:00
|
|
|
|
|
|
|
toolbar_box = ToolbarBox()
|
2017-01-11 18:23:08 +01:00
|
|
|
box.pack_start(toolbar_box, False, False, 0)
|
2016-12-30 10:35:25 +01:00
|
|
|
toolbar_box.show()
|
|
|
|
|
|
|
|
favorite_button = ToggleToolButton('emblem-favorite')
|
|
|
|
favorite_button.set_tooltip('Favorite')
|
|
|
|
toolbar_box.toolbar.insert(favorite_button, -1)
|
|
|
|
favorite_button.show()
|
|
|
|
|
|
|
|
favorite_button2 = ToggleToolButton('emblem-favorite')
|
|
|
|
favorite_button2.set_tooltip('Favorite')
|
|
|
|
toolbar_box.toolbar.insert(favorite_button2, -1)
|
|
|
|
favorite_button2.set_active(True)
|
|
|
|
favorite_button2.show()
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
common.main(test)
|