diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/elementary/efl_ui.eot | 3 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_layout.c | 15 |
2 files changed, 16 insertions, 2 deletions
diff --git a/src/lib/elementary/efl_ui.eot b/src/lib/elementary/efl_ui.eot index b397b27094..eaa4ae41be 100644 --- a/src/lib/elementary/efl_ui.eot +++ b/src/lib/elementary/efl_ui.eot @@ -11,6 +11,9 @@ error Efl.Ui.Theme.Apply_Error.DEFAULT = "Fallback to default style was enabled error Efl.Ui.Theme.Apply_Error.GENERIC = "An error occurred and no theme could be set for this widget"; [[ Failed to apply theme. The widget may become unusable. ]] +error Efl.Ui.Theme.Apply_Error.VERSION = "The widget attempted to load a theme that is incompatible with the current EFL version"; [[ + The theme was applied. The widget may not function or look as expected. +]] enum Efl.Ui.Focus.Direction { diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c index ec5e731dfd..c4310f01c1 100644 --- a/src/lib/elementary/efl_ui_layout.c +++ b/src/lib/elementary/efl_ui_layout.c @@ -545,8 +545,11 @@ _efl_ui_layout_base_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Layout_Data *sd) { const char *version = edje_object_data_get(wd->resize_obj, "version"); if (!version) - ERR("Widget(%p) with type '%s' is not providing a version in its theme!", obj, - efl_class_name_get(efl_class_get(obj))); + { + ERR("Widget(%p) with type '%s' is not providing a version in its theme!", obj, + efl_class_name_get(efl_class_get(obj))); + return EFL_UI_THEME_APPLY_ERROR_VERSION; + } else { errno = 0; @@ -556,6 +559,7 @@ _efl_ui_layout_base_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Layout_Data *sd) ERR("Widget(%p) with type '%s' is not providing a valid version in its theme!", obj, efl_class_name_get(efl_class_get(obj))); sd->version = 0; + return EFL_UI_THEME_APPLY_ERROR_VERSION; } } } @@ -575,6 +579,13 @@ _efl_ui_layout_base_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Layout_Data *sd) if (sd->version < version) WRN("Widget(%p) with type '%s' is providing a potentially old version in its theme: found %u, should be %u", obj, efl_class_name_get(efl_class_get(obj)), sd->version, version); + else if (sd->version > version) + { + CRI("Widget(%p) with type '%s' is attempting to use a theme that is too new: found %u, should be %u", obj, + efl_class_name_get(efl_class_get(obj)), sd->version, version); + CRI("\tTheme file: %s\tTheme group: %s", efl_file_get(obj), efl_file_key_get(obj)); + return EFL_UI_THEME_APPLY_ERROR_VERSION; + } } return EFL_UI_THEME_APPLY_ERROR_NONE; |