summaryrefslogtreecommitdiff
path: root/efl
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2016-01-23 15:55:49 +0200
committerKai Huuhko <kai.huuhko@gmail.com>2016-01-23 15:55:49 +0200
commit6980ffb0e44d72c3ee4db711182de9c55828cbfd (patch)
treeafe8e5bfc21a19eeb9880eb5bdc877032c238f48 /efl
parentfa69908d712375ad599431eedeb7ef01bede83ff (diff)
Elementary: Use the private internal_data dict instead of abusing user data dict
Diffstat (limited to 'efl')
-rw-r--r--efl/elementary/cnp_callbacks.pxi8
-rw-r--r--efl/elementary/gengrid_widget.pxi10
-rw-r--r--efl/elementary/genlist_widget.pxi18
3 files changed, 18 insertions, 18 deletions
diff --git a/efl/elementary/cnp_callbacks.pxi b/efl/elementary/cnp_callbacks.pxi
index 8c49ae7..8e6b7e4 100644
--- a/efl/elementary/cnp_callbacks.pxi
+++ b/efl/elementary/cnp_callbacks.pxi
@@ -143,7 +143,7 @@ cdef Elm_Object_Item *py_elm_xy_item_get_cb(Evas_Object *obj, Evas_Coord x, Evas
143 ObjectItem it 143 ObjectItem it
144 144
145 try: 145 try:
146 ret = o.data["xy_item_get_cb"](o, x, y) 146 ret = o.internal_data["xy_item_get_cb"](o, x, y)
147 it, xpos1, ypos1 = ret 147 it, xpos1, ypos1 = ret
148 except Exception: 148 except Exception:
149 traceback.print_exc() 149 traceback.print_exc()
@@ -321,7 +321,7 @@ cdef void py_elm_drag_item_container_pos(
321 ObjectItem item = _object_item_to_python(it) 321 ObjectItem item = _object_item_to_python(it)
322 322
323 try: 323 try:
324 o.data["drag_item_container_pos"](o, item, x, y, xposret, yposret, action, <object>data if data is not NULL else None) 324 o.internal_data["drag_item_container_pos"](o, item, x, y, xposret, yposret, action, <object>data if data is not NULL else None)
325 except Exception: 325 except Exception:
326 traceback.print_exc() 326 traceback.print_exc()
327 327
@@ -352,7 +352,7 @@ cdef Eina_Bool py_elm_drop_item_container_cb(
352 352
353 evdata.sel_data = ev 353 evdata.sel_data = ev
354 354
355 cb = o.data["drop_item_container_cb"] 355 cb = o.internal_data["drop_item_container_cb"]
356 356
357 if data != NULL: 357 if data != NULL:
358 cbdata = <object>data 358 cbdata = <object>data
@@ -434,7 +434,7 @@ cdef Eina_Bool py_elm_item_container_data_get_cb(
434 bint ret 434 bint ret
435 435
436 try: 436 try:
437 func = o.data["item_container_data_get_cb"] 437 func = o.internal_data["item_container_data_get_cb"]
438 ret = func(o, item, pyinfo) 438 ret = func(o, item, pyinfo)
439 except Exception: 439 except Exception:
440 traceback.print_exc() 440 traceback.print_exc()
diff --git a/efl/elementary/gengrid_widget.pxi b/efl/elementary/gengrid_widget.pxi
index a96c35d..58e7a54 100644
--- a/efl/elementary/gengrid_widget.pxi
+++ b/efl/elementary/gengrid_widget.pxi
@@ -651,9 +651,9 @@ cdef class Gengrid(Object):
651 if itemgetcb is not None: 651 if itemgetcb is not None:
652 if not callable(itemgetcb): 652 if not callable(itemgetcb):
653 raise TypeError("itemgetcb must be callable.") 653 raise TypeError("itemgetcb must be callable.")
654 self.data["xy_item_get_cb"] = itemgetcb 654 self.internal_data["xy_item_get_cb"] = itemgetcb
655 655
656 self.data["item_container_data_get_cb"] = data_get 656 self.internal_data["item_container_data_get_cb"] = data_get
657 657
658 if not elm_drag_item_container_add(self.obj, 658 if not elm_drag_item_container_add(self.obj,
659 tm_to_anim, 659 tm_to_anim,
@@ -702,10 +702,10 @@ cdef class Gengrid(Object):
702 if itemgetcb is not None: 702 if itemgetcb is not None:
703 if not callable(itemgetcb): 703 if not callable(itemgetcb):
704 raise TypeError("itemgetcb must be callable.") 704 raise TypeError("itemgetcb must be callable.")
705 self.data["xy_item_get_cb"] = itemgetcb 705 self.internal_data["xy_item_get_cb"] = itemgetcb
706 706
707 self.data["drag_item_container_pos"] = poscb 707 self.internal_data["drag_item_container_pos"] = poscb
708 self.data["drop_item_container_cb"] = dropcb 708 self.internal_data["drop_item_container_cb"] = dropcb
709 709
710 if not elm_drop_item_container_add(self.obj, 710 if not elm_drop_item_container_add(self.obj,
711 format, 711 format,
diff --git a/efl/elementary/genlist_widget.pxi b/efl/elementary/genlist_widget.pxi
index 416678b..b558f4a 100644
--- a/efl/elementary/genlist_widget.pxi
+++ b/efl/elementary/genlist_widget.pxi
@@ -723,17 +723,17 @@ cdef class Genlist(Object):
723 723
724 """ 724 """
725 def __set__(self, object key): 725 def __set__(self, object key):
726 self.data['__filterkeyref'] = key # keep a reference for key 726 self.internal_data['__filterkeyref'] = key # keep a reference for key
727 elm_genlist_filter_set(self.obj, <void *>key if key is not None else NULL) 727 elm_genlist_filter_set(self.obj, <void *>key if key is not None else NULL)
728 728
729 def __get__(self): 729 def __get__(self):
730 return self.data['__filterkeyref'] 730 return self.internal_data['__filterkeyref']
731 731
732 def filter_set(self, key): 732 def filter_set(self, key):
733 self.data['__filterkeyref'] = key 733 self.internal_data['__filterkeyref'] = key
734 elm_genlist_filter_set(self.obj, <void*>key if key is not None else NULL) 734 elm_genlist_filter_set(self.obj, <void*>key if key is not None else NULL)
735 def filter_get(self): 735 def filter_get(self):
736 return self.data['__filterkeyref'] 736 return self.internal_data['__filterkeyref']
737 737
738 # 738 #
739 # Drag and Drop 739 # Drag and Drop
@@ -757,9 +757,9 @@ cdef class Genlist(Object):
757 if itemgetcb is not None: 757 if itemgetcb is not None:
758 if not callable(itemgetcb): 758 if not callable(itemgetcb):
759 raise TypeError("itemgetcb must be callable.") 759 raise TypeError("itemgetcb must be callable.")
760 self.data["xy_item_get_cb"] = itemgetcb 760 self.internal_data["xy_item_get_cb"] = itemgetcb
761 761
762 self.data["item_container_data_get_cb"] = data_get 762 self.internal_data["item_container_data_get_cb"] = data_get
763 763
764 if not elm_drag_item_container_add(self.obj, 764 if not elm_drag_item_container_add(self.obj,
765 tm_to_anim, 765 tm_to_anim,
@@ -808,10 +808,10 @@ cdef class Genlist(Object):
808 if itemgetcb is not None: 808 if itemgetcb is not None:
809 if not callable(itemgetcb): 809 if not callable(itemgetcb):
810 raise TypeError("itemgetcb must be callable.") 810 raise TypeError("itemgetcb must be callable.")
811 self.data["xy_item_get_cb"] = itemgetcb 811 self.internal_data["xy_item_get_cb"] = itemgetcb
812 812
813 self.data["drag_item_container_pos"] = poscb 813 self.internal_data["drag_item_container_pos"] = poscb
814 self.data["drop_item_container_cb"] = dropcb 814 self.internal_data["drop_item_container_cb"] = dropcb
815 815
816 if not elm_drop_item_container_add(self.obj, 816 if not elm_drop_item_container_add(self.obj,
817 format, 817 format,