summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-07-02 11:31:54 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-07-02 11:31:54 +0900
commit556e45732db3e7bff2fb88181b56f9751bdda01d (patch)
treefbf39535a615b71a2ce2879bcf8810346c68e3a9
parent5622df6914329bca7e816aac334c2dda25d296a8 (diff)
remove edje file changed handling
this matches the 8edc879cc28e7f69c110b4b9db6e611856787c6f commit in efl where edje file changed singals are now gone. this creates nothing but trouble. please see the efl commit log for details.
-rw-r--r--src/lib/elm_bg.c17
-rw-r--r--src/lib/elm_layout.c19
-rw-r--r--src/lib/elm_theme.c46
3 files changed, 0 insertions, 82 deletions
diff --git a/src/lib/elm_bg.c b/src/lib/elm_bg.c
index 2120e378e..d746f4b7c 100644
--- a/src/lib/elm_bg.c
+++ b/src/lib/elm_bg.c
@@ -142,19 +142,6 @@ _elm_bg_eo_base_constructor(Eo *obj, Elm_Bg_Data *_pd EINA_UNUSED)
142 elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_IMAGE)); 142 elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_IMAGE));
143} 143}
144 144
145static void
146_elm_bg_file_reload(void *data, Evas_Object *obj,
147 const char *emission EINA_UNUSED,
148 const char *source EINA_UNUSED)
149{
150 Evas_Object *bg = data;
151 const char *file;
152 const char *group;
153
154 edje_object_file_get(obj, &file, &group);
155 elm_bg_file_set(bg, file, group);
156}
157
158EOLIAN static Eina_Bool 145EOLIAN static Eina_Bool
159_elm_bg_file_set(Eo *obj, Elm_Bg_Data *sd, const char *file, const char *group) 146_elm_bg_file_set(Eo *obj, Elm_Bg_Data *sd, const char *file, const char *group)
160{ 147{
@@ -177,10 +164,6 @@ _elm_bg_file_set(Eo *obj, Elm_Bg_Data *sd, const char *file, const char *group)
177 sd->img = edje_object_add 164 sd->img = edje_object_add
178 (evas_object_evas_get(wd->resize_obj)); 165 (evas_object_evas_get(wd->resize_obj));
179 int_ret = edje_object_file_set(sd->img, file, group); 166 int_ret = edje_object_file_set(sd->img, file, group);
180 edje_object_signal_callback_del
181 (sd->img, "edje,change,file", "edje", _elm_bg_file_reload);
182 edje_object_signal_callback_add
183 (sd->img, "edje,change,file", "edje", _elm_bg_file_reload, obj);
184 } 167 }
185 else 168 else
186 { 169 {
diff --git a/src/lib/elm_layout.c b/src/lib/elm_layout.c
index bf52dd3eb..e83d8a67e 100644
--- a/src/lib/elm_layout.c
+++ b/src/lib/elm_layout.c
@@ -273,18 +273,6 @@ _parts_cursors_apply(Elm_Layout_Smart_Data *sd)
273} 273}
274 274
275static void 275static void
276_reload_theme(void *data, Evas_Object *obj,
277 const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
278{
279 Evas_Object *layout = data;
280 const char *file;
281 const char *group;
282
283 edje_object_file_get(obj, &file, &group);
284 elm_layout_file_set(layout, file, group);
285}
286
287static void
288_visuals_refresh(Evas_Object *obj, 276_visuals_refresh(Evas_Object *obj,
289 Elm_Layout_Smart_Data *sd) 277 Elm_Layout_Smart_Data *sd)
290{ 278{
@@ -297,13 +285,6 @@ _visuals_refresh(Evas_Object *obj,
297 _parts_cursors_apply(sd); 285 _parts_cursors_apply(sd);
298 286
299 eo_do(obj, elm_obj_layout_sizing_eval()); 287 eo_do(obj, elm_obj_layout_sizing_eval());
300
301 edje_object_signal_callback_del(wd->resize_obj,
302 "edje,change,file", "edje",
303 _reload_theme);
304 edje_object_signal_callback_add(wd->resize_obj,
305 "edje,change,file", "edje",
306 _reload_theme, obj);
307} 288}
308 289
309EOLIAN static Eina_Bool 290EOLIAN static Eina_Bool
diff --git a/src/lib/elm_theme.c b/src/lib/elm_theme.c
index c35d37498..67cea3eff 100644
--- a/src/lib/elm_theme.c
+++ b/src/lib/elm_theme.c
@@ -264,59 +264,13 @@ _elm_theme_data_find(Elm_Theme *th, const char *key)
264 return NULL; 264 return NULL;
265} 265}
266 266
267static void _elm_theme_idler_clean(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED);
268
269static Eina_Bool
270_elm_theme_reload_idler(void *data)
271{
272 Evas_Object *elm = data;
273
274 elm_widget_theme(elm);
275 evas_object_data_del(elm, "elm-theme-reload-idler");
276 evas_object_event_callback_del(elm, EVAS_CALLBACK_DEL, _elm_theme_idler_clean);
277 return EINA_FALSE;
278}
279
280static void
281_elm_theme_idler_clean(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
282{
283 Ecore_Idler *idler;
284
285 idler = evas_object_data_get(obj, "elm-theme-reload-idler");
286 ecore_idler_del(idler);
287 evas_object_data_del(obj, "elm-theme-reload-idler");
288}
289
290static void
291_elm_theme_reload(void *data EINA_UNUSED, Evas_Object *obj,
292 const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
293{
294 Evas_Object *elm;
295
296 elm = evas_object_data_get(obj, "elm-parent");
297 if (elm)
298 {
299 evas_object_event_callback_add(elm, EVAS_CALLBACK_DEL, _elm_theme_idler_clean, NULL);
300 evas_object_data_set(elm, "elm-theme-reload-idler", ecore_idler_add(_elm_theme_reload_idler, elm));
301 }
302}
303
304Eina_Bool 267Eina_Bool
305_elm_theme_object_set(Evas_Object *parent, Evas_Object *o, const char *clas, const char *group, const char *style) 268_elm_theme_object_set(Evas_Object *parent, Evas_Object *o, const char *clas, const char *group, const char *style)
306{ 269{
307 Elm_Theme *th = NULL; 270 Elm_Theme *th = NULL;
308 void *test;
309 271
310 if (parent) th = elm_widget_theme_get(parent); 272 if (parent) th = elm_widget_theme_get(parent);
311 if (!_elm_theme_set(th, o, clas, group, style)) return EINA_FALSE; 273 if (!_elm_theme_set(th, o, clas, group, style)) return EINA_FALSE;
312
313 test = evas_object_data_get(o, "edje,theme,watcher");
314 if (!test)
315 {
316 edje_object_signal_callback_add(o, "edje,change,file", "edje",
317 _elm_theme_reload, NULL);
318 evas_object_data_set(o, "edje,theme,watcher", (void*) -1);
319 }
320 return EINA_TRUE; 274 return EINA_TRUE;
321} 275}
322 276