added new files
[meabook] / ui / fremantle_ui / common.py
1 """
2 Common UI functions
3 """
4
5 import gtk
6 import hildon
7
8
9 def create_button(title, value):
10     """Create HildonButton."""
11
12     button = hildon.Button(gtk.HILDON_SIZE_AUTO | \
13         gtk.HILDON_SIZE_FINGER_HEIGHT, \
14         hildon.BUTTON_ARRANGEMENT_VERTICAL, title, value)
15     button.set_style(hildon.BUTTON_STYLE_PICKER)
16     button.set_alignment(0, 0, 0, 0)
17     return button
18
19
20 def create_menu_button(title):
21     """Create HildonMenu button."""
22
23     return hildon.Button(gtk.HILDON_SIZE_AUTO, \
24         hildon.BUTTON_ARRANGEMENT_HORIZONTAL, title)