aboutsummaryrefslogtreecommitdiffstats
path: root/examples/elementary
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2015-04-17 21:16:09 +0200
committerDave Andreoli <dave@gurumeditation.it>2015-04-17 21:16:23 +0200
commitf6326d582bb9a80bdcc7324373322006f3c4b96e (patch)
tree5533078ce6fde52eb0053c8815de488a414bda2e /examples/elementary
parentElm.Systray: Fix compile (diff)
downloadpython-efl-f6326d582bb9a80bdcc7324373322006f3c4b96e.tar.gz
New 1.14 API: item,longressed signal for Multibuttonentry
Diffstat (limited to 'examples/elementary')
-rw-r--r--examples/elementary/test_multibuttonentry.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/examples/elementary/test_multibuttonentry.py b/examples/elementary/test_multibuttonentry.py
index ea365d7..e57a6cd 100644
--- a/examples/elementary/test_multibuttonentry.py
+++ b/examples/elementary/test_multibuttonentry.py
@@ -16,9 +16,15 @@ SCROLL_POLICY_VERT = ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO
counter = 0
-def cb_item_selected(mbe, *args, **kwargs):
- # XXX: This gets called twice
- print(mbe)
+def cb_item_selected(mbe, item):
+ print("ITEM SELECTED", item)
+
+def cb_item_clicked(mbe, item):
+ print("ITEM CLICKED", item)
+
+def cb_item_longpressed(mbe, item):
+ print("ITEM LONGPRESSED", item)
+
def cb_btn_item_prepend(btn, mbe):
global counter
@@ -75,6 +81,8 @@ def multibuttonentry_clicked(obj, item=None):
mbe = MultiButtonEntry(win, size_hint_align=FILL_BOTH,
size_hint_weight=EXPAND_BOTH, text="To: ")
mbe.callback_item_selected_add(cb_item_selected)
+ mbe.callback_item_clicked_add(cb_item_clicked)
+ mbe.callback_item_longpressed_add(cb_item_longpressed)
mbe.part_text_set("guide", "Tap to add recipient")
mbe.filter_append(cb_filter1)
mbe.show()