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
{
{
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;
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;
}
}
}
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;