summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-03 14:04:45 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-03 15:45:46 +0900
commit6ab167afa1e574d641081554a0ebe80f79645971 (patch)
treeebbd93828758a6f4a911db777dbdf498fc729ef4 /src
parent0dc74232a1b7d582652528e471cebfd44c75d58e (diff)
elm layout - add and delete signal cbs from the same consistent obj
elm layout signal handling was all over the place. using 3 different ways of adding or deleteing signals from the object. it uses either obj directly, eo_super(obj) or wd->resize_obj. come on. be consistent. so using wd->resize_obj worked before and now works properly with sgnal cbs PROPELY deleted unlike before. @fix
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/elm_layout.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c
index 65b7661..97e7bc3 100644
--- a/src/lib/elementary/elm_layout.c
+++ b/src/lib/elementary/elm_layout.c
@@ -938,6 +938,8 @@ _elm_layout_edje_object_signal_callback_add(Eo *obj, Elm_Layout_Smart_Data *sd,
938 esd = ELM_NEW(Edje_Signal_Data); 938 esd = ELM_NEW(Edje_Signal_Data);
939 if (!esd) return; 939 if (!esd) return;
940 940
941 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
942
941 esd->obj = obj; 943 esd->obj = obj;
942 esd->func = func_cb; 944 esd->func = func_cb;
943 esd->emission = eina_stringshare_add(emission); 945 esd->emission = eina_stringshare_add(emission);
@@ -946,7 +948,7 @@ _elm_layout_edje_object_signal_callback_add(Eo *obj, Elm_Layout_Smart_Data *sd,
946 sd->edje_signals = eina_list_append(sd->edje_signals, esd); 948 sd->edje_signals = eina_list_append(sd->edje_signals, esd);
947 949
948 edje_object_signal_callback_add 950 edje_object_signal_callback_add
949 (eo_super(obj, MY_CLASS), emission, source, _edje_signal_callback, esd); 951 (wd->resize_obj, emission, source, _edje_signal_callback, esd);
950} 952}
951 953
952EAPI void * 954EAPI void *
@@ -964,6 +966,8 @@ _elm_layout_edje_object_signal_callback_del(Eo *obj, Elm_Layout_Smart_Data *sd,
964 Eina_List *l; 966 Eina_List *l;
965 void *data_ptr; 967 void *data_ptr;
966 968
969 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
970
967 EINA_LIST_FOREACH(sd->edje_signals, l, esd) 971 EINA_LIST_FOREACH(sd->edje_signals, l, esd)
968 { 972 {
969 if ((esd->func == func_cb) && (!strcmp(esd->emission, emission)) && 973 if ((esd->func == func_cb) && (!strcmp(esd->emission, emission)) &&
@@ -975,7 +979,7 @@ _elm_layout_edje_object_signal_callback_del(Eo *obj, Elm_Layout_Smart_Data *sd,
975 data_ptr = esd->data; 979 data_ptr = esd->data;
976 980
977 edje_obj_signal_callback_del 981 edje_obj_signal_callback_del
978 (obj, emission, source, _edje_signal_callback, esd); 982 (wd->resize_obj, emission, source, _edje_signal_callback, esd);
979 free(esd); 983 free(esd);
980 984
981 return data_ptr; /* stop at 1st match */ 985 return data_ptr; /* stop at 1st match */