This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efl.

View the commit online.

commit 84ceced3f5f290f26075510fc2464f8acc0d3da0
Author: Cedric BAIL <[email protected]>
AuthorDate: Wed Nov 18 11:02:34 2026 -0600

    elementary: a scrollable entry's parts can be bound again
    
    1ac8cdaed8 made property_bind refuse a key that is not a part, asking
    the widget's resize object whether the part exists. A scrollable
    elm_entry has the scroller's edje as its resize object, while its text
    parts live in its entry edje, so binding "default" was refused with an
    error. elm_fileselector_entry binds its scrollable inner entry to the
    model's "path" on every model set and every chosen file: each logged an
    ERR and its text no longer followed the model.
    
    Ask the widget itself through Efl.Layout.Group.part_exist, and have
    elm_entry answer for its entry edje, as it already redirects part text
    and signals there. elm_entry_eo.c has no .eo behind it, so the override
    is registered there by hand. Efl.Ui.Image's own part_exist override is
    now honoured by the check as well.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 src/lib/elementary/efl_ui_layout.c    |  2 +-
 src/lib/elementary/elm_entry.c        |  7 +++++++
 src/lib/elementary/elm_entry_eo.c     |  3 +++
 src/tests/elementary/elm_test_entry.c | 22 ++++++++++++++++++++++
 4 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index 59a3f14012..68ceb1046c 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -2827,7 +2827,7 @@ _efl_ui_layout_part_known(Eo *obj, Efl_Ui_Layout_Data *pd, const char *part)
           return efl_layout_group_part_exist_get(wd->resize_obj, "efl.background");
         if (eina_streq(part, "shadow")) return EINA_TRUE;
      }
-   return efl_layout_group_part_exist_get(wd->resize_obj, part);
+   return efl_layout_group_part_exist_get(obj, part);
 }
 
 static void
diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index ac191351d3..b87545bef1 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -6312,6 +6312,13 @@ _elm_entry_efl_ui_widget_focus_manager_focus_manager_create(Eo *obj, Elm_Entry_D
 
 /* Efl.Part begin */
 
+// A scrollable entry has the scroller for resize object, its parts are in entry_edje.
+EOLIAN static Eina_Bool
+_elm_entry_efl_layout_group_part_exist_get(const Eo *obj EINA_UNUSED, Elm_Entry_Data *sd, const char *part)
+{
+   return efl_layout_group_part_exist_get(sd->entry_edje, part);
+}
+
 ELM_PART_OVERRIDE(elm_entry, ELM_ENTRY, Elm_Entry_Data)
 ELM_PART_OVERRIDE_CONTENT_SET(elm_entry, ELM_ENTRY, Elm_Entry_Data)
 ELM_PART_OVERRIDE_CONTENT_UNSET(elm_entry, ELM_ENTRY, Elm_Entry_Data)
diff --git a/src/lib/elementary/elm_entry_eo.c b/src/lib/elementary/elm_entry_eo.c
index b993fd5fd7..520eddf5fb 100644
--- a/src/lib/elementary/elm_entry_eo.c
+++ b/src/lib/elementary/elm_entry_eo.c
@@ -986,6 +986,8 @@ 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);
 
+Eina_Bool _elm_entry_efl_layout_group_part_exist_get(const Eo *obj, Elm_Entry_Data *pd, const char *part);
+
 
 static Eina_Bool
 _elm_entry_class_initializer(Efl_Class *klass)
@@ -1146,6 +1148,7 @@ _elm_entry_class_initializer(Efl_Class *klass)
       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),
+      EFL_OBJECT_OP_FUNC(efl_layout_group_part_exist_get, _elm_entry_efl_layout_group_part_exist_get),
       ELM_ENTRY_EXTRA_OPS
    );
    opsp = &ops;
diff --git a/src/tests/elementary/elm_test_entry.c b/src/tests/elementary/elm_test_entry.c
index b7250b7aa9..516df7f09a 100644
--- a/src/tests/elementary/elm_test_entry.c
+++ b/src/tests/elementary/elm_test_entry.c
@@ -6,6 +6,7 @@
 #define EFL_ACCESS_TEXT_BETA
 #define EFL_ACCESS_TEXT_PROTECTED
 #include <Elementary.h>
+#include <Eio.h>
 #include "elm_suite.h"
 
 EFL_START_TEST(elm_entry_legacy_type_check)
@@ -675,6 +676,26 @@ EFL_START_TEST(elm_entry_textnodes_with_no_format)
 }
 EFL_END_TEST
 
+EFL_START_TEST(elm_entry_scrollable_property_bind)
+{
+   Evas_Object *win, *entry;
+   Efl_Io_Model *model;
+   Eina_Error err;
+
+   win = win_add(NULL, "entry", ELM_WIN_BASIC);
+   entry = elm_entry_add(win);
+   elm_entry_scrollable_set(entry, EINA_TRUE);
+
+   model = efl_add(EFL_IO_MODEL_CLASS, win,
+                   efl_io_model_path_set(efl_added, "/tmp"));
+   efl_ui_view_model_set(entry, model);
+
+   err = efl_ui_property_bind(entry, "default", "path");
+   ck_assert_int_eq(err, 0);
+   ck_assert_str_eq(elm_object_text_get(entry), "/tmp");
+}
+EFL_END_TEST
+
 void elm_test_entry(TCase *tc)
 {
    tcase_add_test(tc, elm_entry_legacy_type_check);
@@ -697,4 +718,5 @@ void elm_test_entry(TCase *tc)
    tcase_add_test(tc, elm_entry_test_burmese);
    tcase_add_test(tc, elm_entry_keycode);
    tcase_add_test(tc, elm_entry_textnodes_with_no_format);
+   tcase_add_test(tc, elm_entry_scrollable_property_bind);
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to