summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/canvas/evas_object_grid.c16
-rw-r--r--src/lib/evas/canvas/evas_object_smart.c2
2 files changed, 6 insertions, 12 deletions
diff --git a/src/lib/evas/canvas/evas_object_grid.c b/src/lib/evas/canvas/evas_object_grid.c
index e8b9598cc7..8aab7cffd4 100644
--- a/src/lib/evas/canvas/evas_object_grid.c
+++ b/src/lib/evas/canvas/evas_object_grid.c
@@ -159,19 +159,17 @@ EVAS_SMART_SUBCLASS_NEW("Evas_Object_Grid", _evas_object_grid,
159static void 159static void
160_evas_object_grid_smart_add(Evas_Object *o) 160_evas_object_grid_smart_add(Evas_Object *o)
161{ 161{
162 Evas_Object_Smart_Clipped_Data *base;
162 Evas_Grid_Data *priv; 163 Evas_Grid_Data *priv;
163 164
164 priv = evas_object_smart_data_get(o); 165 // Grid is an ugly mix of legacy & eo...
165 if (!priv) 166 base = evas_object_smart_data_get(o);
166 { 167 priv = efl_data_scope_get(o, MY_CLASS);
167 priv = efl_data_ref(o, MY_CLASS); 168 priv->base = *base;
168 evas_object_smart_data_set(o, priv); 169 evas_object_smart_data_set(o, priv);
169 }
170 170
171 priv->size.w = 100; 171 priv->size.w = 100;
172 priv->size.h = 100; 172 priv->size.h = 100;
173
174 _evas_object_grid_parent_sc->add(o);
175} 173}
176 174
177static void 175static void
@@ -189,7 +187,6 @@ _evas_object_grid_smart_del(Evas_Object *o)
189 free(opt); 187 free(opt);
190 l = eina_list_remove_list(l, l); 188 l = eina_list_remove_list(l, l);
191 } 189 }
192 _evas_object_grid_parent_sc->del(o);
193} 190}
194 191
195static void 192static void
@@ -290,7 +287,6 @@ _evas_grid_efl_object_constructor(Eo *obj, Evas_Grid_Data *class_data EINA_UNUSE
290 evas_object_smart_attach(obj, _evas_object_grid_smart_class_new()); 287 evas_object_smart_attach(obj, _evas_object_grid_smart_class_new());
291 288
292 return obj; 289 return obj;
293// return evas_object_smart_add(evas, _evas_object_grid_smart_class_new());
294} 290}
295 291
296EOLIAN static Evas_Object* 292EOLIAN static Evas_Object*
diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c
index 5ca58ddcb4..19a9eeba93 100644
--- a/src/lib/evas/canvas/evas_object_smart.c
+++ b/src/lib/evas/canvas/evas_object_smart.c
@@ -1832,8 +1832,6 @@ _efl_canvas_group_group_clipped_set(Eo *eo_obj EINA_UNUSED, Evas_Smart_Data *sd,
1832 // We must call this function BEFORE the constructor (yes, it's hacky) 1832 // We must call this function BEFORE the constructor (yes, it's hacky)
1833 EINA_SAFETY_ON_FALSE_RETURN(!sd->object); 1833 EINA_SAFETY_ON_FALSE_RETURN(!sd->object);
1834 sd->clipped = !!clipped; 1834 sd->clipped = !!clipped;
1835 if (clipped && !sd->data)
1836 sd->data = calloc(1, sizeof(Evas_Object_Smart_Clipped_Data));
1837} 1835}
1838 1836
1839/* Internal EO APIs */ 1837/* Internal EO APIs */