elm_entry: fix to keep api backward compatability

Summary:
if passing NULL as filename to elm_entry_file_set,
elm_entry_entry_get NULL as return value before.
and it doesn't now.

Test Plan:
1. passing a existing file to efl_entry_file_set
2. passing NULL as file to efl_entry_file_set
3. check return value of elm_entry_entry_get

Reviewers: zmike, bu5hm4n

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8363
This commit is contained in:
Wonki Kim 2019-03-15 10:32:55 -04:00 committed by Mike Blumenkrantz
parent dae881c9dc
commit 597b82444a
2 changed files with 10 additions and 0 deletions

View File

@ -4987,6 +4987,13 @@ elm_entry_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format)
return ret;
}
EOLIAN static void
_elm_entry_efl_file_unload(Eo *obj, Elm_Entry_Data *sd)
{
elm_object_text_set(obj, "");
efl_file_unload(efl_super(obj, MY_CLASS));
}
EOLIAN static Eina_Error
_elm_entry_efl_file_load(Eo *obj, Elm_Entry_Data *sd)
{

View File

@ -981,6 +981,8 @@ Eina_Error _elm_entry_efl_file_file_set(Eo *obj, Elm_Entry_Data *pd, const char
Eina_Error _elm_entry_efl_file_load(Eo *obj, Elm_Entry_Data *pd);
void _elm_entry_efl_file_unload(Eo *obj, Elm_Entry_Data *pd);
Efl_Object *_elm_entry_efl_part_part_get(const Eo *obj, Elm_Entry_Data *pd, const char *name);
@ -1142,6 +1144,7 @@ _elm_entry_class_initializer(Efl_Class *klass)
EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_entry_efl_access_widget_action_elm_actions_get),
EFL_OBJECT_OP_FUNC(efl_file_set, _elm_entry_efl_file_file_set),
EFL_OBJECT_OP_FUNC(efl_file_load, _elm_entry_efl_file_load),
EFL_OBJECT_OP_FUNC(efl_file_unload, _elm_entry_efl_file_unload),
EFL_OBJECT_OP_FUNC(efl_part_get, _elm_entry_efl_part_part_get),
ELM_ENTRY_EXTRA_OPS
);