diff options
Diffstat (limited to 'src/lib/elementary/elm_theme.c')
-rw-r--r-- | src/lib/elementary/elm_theme.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/lib/elementary/elm_theme.c b/src/lib/elementary/elm_theme.c index 13ebf23..538b6fa 100644 --- a/src/lib/elementary/elm_theme.c +++ b/src/lib/elementary/elm_theme.c | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <Elementary.h> | 5 | #include <Elementary.h> |
6 | 6 | ||
7 | #include "elm_priv.h" | 7 | #include "elm_priv.h" |
8 | #include "elm_icon.eo.h" | 8 | #include "elm_icon_eo.h" |
9 | 9 | ||
10 | #include "efl_ui_theme.eo.h" | 10 | #include "efl_ui_theme.eo.h" |
11 | 11 | ||
@@ -302,7 +302,7 @@ _elm_theme_data_find(Elm_Theme *th, const char *key) | |||
302 | return NULL; | 302 | return NULL; |
303 | } | 303 | } |
304 | 304 | ||
305 | Efl_Ui_Theme_Apply_Result | 305 | Eina_Error |
306 | _elm_theme_object_set(Evas_Object *parent, Evas_Object *o, const char *clas, const char *group, const char *style) | 306 | _elm_theme_object_set(Evas_Object *parent, Evas_Object *o, const char *clas, const char *group, const char *style) |
307 | { | 307 | { |
308 | Elm_Theme *th = NULL; | 308 | Elm_Theme *th = NULL; |
@@ -323,7 +323,7 @@ _elm_theme_object_icon_set(Evas_Object *o, | |||
323 | return _elm_theme_icon_set(th, o, group, style); | 323 | return _elm_theme_icon_set(th, o, group, style); |
324 | } | 324 | } |
325 | 325 | ||
326 | Efl_Ui_Theme_Apply_Result | 326 | Eina_Error |
327 | _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *group, const char *style, Eina_Bool is_legacy) | 327 | _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *group, const char *style, Eina_Bool is_legacy) |
328 | { | 328 | { |
329 | Eina_File *file; | 329 | Eina_File *file; |
@@ -331,9 +331,9 @@ _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *grou | |||
331 | const char *group_sep = "/"; | 331 | const char *group_sep = "/"; |
332 | const char *style_sep = ":"; | 332 | const char *style_sep = ":"; |
333 | 333 | ||
334 | if ((!clas) || !o) return EFL_UI_THEME_APPLY_RESULT_FAIL; | 334 | if ((!clas) || !o) return EFL_UI_THEME_APPLY_ERROR_GENERIC; |
335 | if (!th) th = theme_default; | 335 | if (!th) th = theme_default; |
336 | if (!th) return EFL_UI_THEME_APPLY_RESULT_FAIL; | 336 | if (!th) return EFL_UI_THEME_APPLY_ERROR_GENERIC; |
337 | 337 | ||
338 | if (eina_streq(style, "default")) style = NULL; | 338 | if (eina_streq(style, "default")) style = NULL; |
339 | 339 | ||
@@ -348,7 +348,7 @@ _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *grou | |||
348 | file = _elm_theme_group_file_find(th, buf2); | 348 | file = _elm_theme_group_file_find(th, buf2); |
349 | if (file) | 349 | if (file) |
350 | { | 350 | { |
351 | if (edje_object_mmap_set(o, file, buf2)) return EFL_UI_THEME_APPLY_RESULT_SUCCESS; | 351 | if (edje_object_mmap_set(o, file, buf2)) return EFL_UI_THEME_APPLY_ERROR_NONE; |
352 | else | 352 | else |
353 | { | 353 | { |
354 | ERR("could not set theme group '%s' from file '%s': %s", | 354 | ERR("could not set theme group '%s' from file '%s': %s", |
@@ -362,11 +362,12 @@ _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *grou | |||
362 | } | 362 | } |
363 | 363 | ||
364 | if (!style) | 364 | if (!style) |
365 | return EFL_UI_THEME_APPLY_RESULT_FAIL; | 365 | return EFL_UI_THEME_APPLY_ERROR_GENERIC; |
366 | 366 | ||
367 | // Use the elementary default style. | 367 | // Use the elementary default style. |
368 | return (EFL_UI_THEME_APPLY_RESULT_DEFAULT & | 368 | if (_elm_theme_set(th, o, clas, group, NULL, is_legacy) == EFL_UI_THEME_APPLY_ERROR_NONE) |
369 | _elm_theme_set(th, o, clas, group, NULL, is_legacy)); | 369 | return EFL_UI_THEME_APPLY_ERROR_DEFAULT; |
370 | return EFL_UI_THEME_APPLY_ERROR_GENERIC; | ||
370 | } | 371 | } |
371 | 372 | ||
372 | Eina_Bool | 373 | Eina_Bool |