aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2015-10-20 19:23:05 (GMT)
committerDave Andreoli <dave@gurumeditation.it>2015-10-20 19:23:05 (GMT)
commit435e57ca448bf21d885e8405e2e4bd08af46827a (patch)
tree2707b4b3b625b294182cfcd4df480cafd7de7a87
parentImplemented TablePadding test (diff)
downloadpython-efl-435e57ca448bf21d885e8405e2e4bd08af46827a.tar.gz
rename Hoversel API label_auto_changed->auto_update
-rw-r--r--efl/elementary/hoversel.pxi17
-rw-r--r--efl/elementary/hoversel_cdef.pxi4
-rw-r--r--examples/elementary/test_hoversel.py18
3 files changed, 20 insertions, 19 deletions
diff --git a/efl/elementary/hoversel.pxi b/efl/elementary/hoversel.pxi
index 4b9f665..12bd569 100644
--- a/efl/elementary/hoversel.pxi
+++ b/efl/elementary/hoversel.pxi
@@ -250,8 +250,9 @@ cdef class Hoversel(Button):
def expanded_get(self):
return bool(elm_hoversel_expanded_get(self.obj))
- property label_auto_changed:
- """Change the label of hoversel to that of selected item automatically.
+ property auto_update:
+ """Automatically change the label and icon of hoversel to that of
+ the selected item.
:type: bool
@@ -259,14 +260,14 @@ cdef class Hoversel(Button):
"""
def __get__(self):
- return bool(elm_hoversel_label_auto_changed_get(self.obj))
+ return bool(elm_hoversel_auto_update_get(self.obj))
def __set__(self, bint enable):
- elm_hoversel_label_auto_changed_set(self.obj, enable)
+ elm_hoversel_auto_update_set(self.obj, enable)
- def elabel_auto_changed_get(self):
- return bool(elm_hoversel_label_auto_changed_get(self.obj))
- def elabel_auto_changed_set(self, bint enable):
- elm_hoversel_label_auto_changed_set(self.obj, enable)
+ def auto_update_get(self):
+ return bool(elm_hoversel_auto_update_get(self.obj))
+ def auto_update_set(self, bint enable):
+ elm_hoversel_auto_update_set(self.obj, enable)
def clear(self):
"""This will remove all the children items from the hoversel.
diff --git a/efl/elementary/hoversel_cdef.pxi b/efl/elementary/hoversel_cdef.pxi
index f77ab82..b99af41 100644
--- a/efl/elementary/hoversel_cdef.pxi
+++ b/efl/elementary/hoversel_cdef.pxi
@@ -20,5 +20,5 @@ cdef extern from "Elementary.h":
Elm_Object_Item *elm_hoversel_item_add(Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, Evas_Smart_Cb func, void *data)
void elm_hoversel_item_icon_set(Elm_Object_Item *it, const char *icon_file, const char *icon_group, Elm_Icon_Type icon_type)
void elm_hoversel_item_icon_get(const Elm_Object_Item *it, const char **icon_file, const char **icon_group, Elm_Icon_Type *icon_type)
- void elm_hoversel_label_auto_changed_set(Evas_Object *obj, Eina_Bool enable)
- Eina_Bool elm_hoversel_label_auto_changed_get(Evas_Object *obj)
+ void elm_hoversel_auto_update_set(Evas_Object *obj, Eina_Bool enable)
+ Eina_Bool elm_hoversel_auto_update_get(Evas_Object *obj)
diff --git a/examples/elementary/test_hoversel.py b/examples/elementary/test_hoversel.py
index 07469c8..2fae927 100644
--- a/examples/elementary/test_hoversel.py
+++ b/examples/elementary/test_hoversel.py
@@ -32,7 +32,7 @@ def hoversel_clicked(obj):
Timer(2.0, lambda: hoversel.text_set("Labels"))
bt = Hoversel(win, hover_parent=win, text="Labels",
- size_hint_weight=WEIGHT_ZERO, size_hint_align=ALIGN_CENTER)
+ size_hint_weight=WEIGHT_ZERO, size_hint_align=ALIGN_CENTER)
bt.item_add("Item 1")
bt.item_add("Item 2")
bt.item_add("Item 3")
@@ -42,7 +42,7 @@ def hoversel_clicked(obj):
bt.show()
bt = Hoversel(win, hover_parent=win, text="Some Icons",
- size_hint_weight=WEIGHT_ZERO, size_hint_align=ALIGN_CENTER)
+ size_hint_weight=WEIGHT_ZERO, size_hint_align=ALIGN_CENTER)
bt.item_add("Item 1")
bt.item_add("Item 2")
bt.item_add("Item 3", "home", ELM_ICON_STANDARD)
@@ -51,7 +51,7 @@ def hoversel_clicked(obj):
bt.show()
bt = Hoversel(win, hover_parent=win, text="All Icons",
- size_hint_weight=WEIGHT_ZERO, size_hint_align=ALIGN_CENTER)
+ size_hint_weight=WEIGHT_ZERO, size_hint_align=ALIGN_CENTER)
bt.item_add("Item 1", "apps", ELM_ICON_STANDARD)
bt.item_add("Item 2", "arrow_down", ELM_ICON_STANDARD)
bt.item_add("Item 3", "home", ELM_ICON_STANDARD)
@@ -60,18 +60,18 @@ def hoversel_clicked(obj):
bt.show()
bt = Hoversel(win, hover_parent=win, text="All Icons",
- size_hint_weight=WEIGHT_ZERO, size_hint_align=ALIGN_CENTER)
+ size_hint_weight=WEIGHT_ZERO, size_hint_align=ALIGN_CENTER)
bt.item_add("Item 1", "apps", ELM_ICON_STANDARD)
bt.item_add("Item 2", os.path.join(img_path, "logo_small.png"),
- ELM_ICON_FILE)
+ ELM_ICON_FILE)
bt.item_add("Item 3", "home", ELM_ICON_STANDARD)
bt.item_add("Item 4", "close", ELM_ICON_STANDARD)
bx.pack_end(bt)
bt.show()
bt = Hoversel(win, hover_parent=win, text="Disabled Hoversel",
- disabled=True, size_hint_weight=WEIGHT_ZERO,
- size_hint_align=ALIGN_CENTER)
+ disabled=True, size_hint_weight=WEIGHT_ZERO,
+ size_hint_align=ALIGN_CENTER)
bt.item_add("Item 1", "apps", ELM_ICON_STANDARD)
bt.item_add("Item 2", "close", ELM_ICON_STANDARD)
bx.pack_end(bt)
@@ -79,7 +79,7 @@ def hoversel_clicked(obj):
ic = Icon(win, file=os.path.join(img_path, "sky_03.jpg"))
bt = Hoversel(win, hover_parent=win, text="Icon + Label", content=ic,
- size_hint_weight=WEIGHT_ZERO, size_hint_align=ALIGN_CENTER)
+ size_hint_weight=WEIGHT_ZERO, size_hint_align=ALIGN_CENTER)
ic.show()
bt.item_add("Item 1", "apps", ELM_ICON_STANDARD)
@@ -90,7 +90,7 @@ def hoversel_clicked(obj):
bt.show()
bt = Hoversel(win, hover_parent=win, text="Label auto changed",
- label_auto_changed=True,
+ auto_update=True,
size_hint_weight=WEIGHT_ZERO, size_hint_align=ALIGN_CENTER)
bt.item_add("Item 1", "apps", ELM_ICON_STANDARD)