2012-08-24 02:08:24 +02:00
|
|
|
from gi.repository import Gtk
|
|
|
|
|
|
|
|
from sugar3.graphics.toolbarbox import ToolbarBox
|
|
|
|
from sugar3.graphics.colorbutton import ColorToolButton
|
|
|
|
from sugar3.graphics.radiotoolbutton import RadioToolButton
|
|
|
|
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()
|
2012-08-24 02:08:24 +02:00
|
|
|
|
|
|
|
toolbar_box = ToolbarBox()
|
2017-01-11 18:23:08 +01:00
|
|
|
box.pack_start(toolbar_box, False, False, 0)
|
2012-08-24 02:08:24 +02:00
|
|
|
toolbar_box.show()
|
|
|
|
|
2012-10-10 05:20:31 +02:00
|
|
|
radial_button = RadioToolButton(icon_name='view-radial')
|
2012-08-24 02:08:24 +02:00
|
|
|
toolbar_box.toolbar.insert(radial_button, -1)
|
|
|
|
radial_button.show()
|
|
|
|
|
2012-10-10 05:20:31 +02:00
|
|
|
list_button = RadioToolButton(icon_name='view-list')
|
2012-08-24 02:08:24 +02:00
|
|
|
list_button.props.group = radial_button
|
|
|
|
toolbar_box.toolbar.insert(list_button, -1)
|
|
|
|
list_button.show()
|
|
|
|
|
|
|
|
separator = Gtk.SeparatorToolItem()
|
|
|
|
toolbar_box.toolbar.insert(separator, -1)
|
|
|
|
separator.show()
|
|
|
|
|
|
|
|
color_button = ColorToolButton()
|
|
|
|
toolbar_box.toolbar.insert(color_button, -1)
|
|
|
|
color_button.show()
|
|
|
|
|
|
|
|
favorite_button = ToggleToolButton('emblem-favorite')
|
2013-02-15 13:58:58 +01:00
|
|
|
favorite_button.set_tooltip('Favorite')
|
2012-08-24 02:08:24 +02:00
|
|
|
toolbar_box.toolbar.insert(favorite_button, -1)
|
|
|
|
favorite_button.show()
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
common.main(test)
|