summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2014-12-01 20:23:53 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2014-12-01 20:23:53 +0100
commit3a9eee63f6a83727dd71d4b6af358cddea4e2e31 (patch)
tree96cffe767b0ac728b6d61cdc61fe4bd5cbc52d2f
parent012255d1694c40421476a01b0dccc9e59a792993 (diff)
made the api better for the appending of a item
-rw-r--r--src/elm_settingspane.c6
-rw-r--r--src/elm_settingspane.eo1
2 files changed, 3 insertions, 4 deletions
diff --git a/src/elm_settingspane.c b/src/elm_settingspane.c
index 9f68fd9..5735292 100644
--- a/src/elm_settingspane.c
+++ b/src/elm_settingspane.c
@@ -722,7 +722,6 @@ static Elm_Settingspane_Item *
722_elm_settingspane_item_append_full(Eo *obj, Elm_Settingspane_Data *pd, const Elm_Settingspane_Item_Class *itc, const void *data, const char *name, Elm_Settingspane_Item *par, Elm_Settingspane_Item *rel) 722_elm_settingspane_item_append_full(Eo *obj, Elm_Settingspane_Data *pd, const Elm_Settingspane_Item_Class *itc, const void *data, const char *name, Elm_Settingspane_Item *par, Elm_Settingspane_Item *rel)
723{ 723{
724 Elm_Settingspane_Item *new_child = NULL; 724 Elm_Settingspane_Item *new_child = NULL;
725 //TODO should we check if this item is in this layer ?
726 if (par) 725 if (par)
727 { 726 {
728 Elm_Settingspane_Item_Data *data_par = eo_data_scope_get(par, ELM_SETTINGSPANE_ITEM_CLASS); 727 Elm_Settingspane_Item_Data *data_par = eo_data_scope_get(par, ELM_SETTINGSPANE_ITEM_CLASS);
@@ -752,9 +751,10 @@ _elm_settingspane_item_append(Eo *obj, Elm_Settingspane_Data *pd, const Elm_Sett
752} 751}
753 752
754EOLIAN static Elm_Settingspane_Item * 753EOLIAN static Elm_Settingspane_Item *
755_elm_settingspane_item_append_relative(Eo *obj, Elm_Settingspane_Data *pd, const Elm_Settingspane_Item_Class *itc, const void *data, const char *name, Elm_Settingspane_Item *par, Elm_Settingspane_Item *rel) 754_elm_settingspane_item_append_relative(Eo *obj, Elm_Settingspane_Data *pd, const Elm_Settingspane_Item_Class *itc, const void *data, const char *name, Elm_Settingspane_Item *rel)
756{ 755{
757 return _elm_settingspane_item_append_full(obj, pd, itc, data, name, par, rel); 756 Elm_Settingspane_Item_Data *id = eo_data_scope_get(rel, ELM_SETTINGSPANE_ITEM_CLASS);
757 return _elm_settingspane_item_append_full(obj, pd, itc, data, name, id->par, rel);
758} 758}
759 759
760EOLIAN static void 760EOLIAN static void
diff --git a/src/elm_settingspane.eo b/src/elm_settingspane.eo
index a3aedbf..2e9cf68 100644
--- a/src/elm_settingspane.eo
+++ b/src/elm_settingspane.eo
@@ -25,7 +25,6 @@ class Elm_Settingspane(Elm_Layout)
25 @in const(Elm_Settingspane_Item_Class) *itc; 25 @in const(Elm_Settingspane_Item_Class) *itc;
26 @in const(void) *data; 26 @in const(void) *data;
27 @in const(char) *name; 27 @in const(char) *name;
28 @in Elm_Settingspane_Item *par;
29 @in Elm_Settingspane_Item *rel; 28 @in Elm_Settingspane_Item *rel;
30 } 29 }
31 } 30 }