diff options
author | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-08-25 21:42:01 +0200 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-08-25 21:42:01 +0200 |
commit | 34c78976d4ec69b5ad292ed95d6d4fe64aa886a0 (patch) | |
tree | 53114efb3c637d641d0ce2d6300ad9809de29798 | |
parent | 135d391ae38320876c8de16d0466578fcde5cd71 (diff) | |
download | efl-34c78976d4ec69b5ad292ed95d6d4fe64aa886a0.tar.gz |
fixes for the example
the position manager should be set earlier, otherwise the first model
setting is going to hell.
Additionally, efl.text is wrong as key i think.
-rw-r--r-- | src/examples/elementary/efl_ui_collection_view_example_1.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/examples/elementary/efl_ui_collection_view_example_1.c b/src/examples/elementary/efl_ui_collection_view_example_1.c index f4e91279c8..66a188777b 100644 --- a/src/examples/elementary/efl_ui_collection_view_example_1.c +++ b/src/examples/elementary/efl_ui_collection_view_example_1.c @@ -90,11 +90,13 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED) efl_ui_widget_factory_item_class_set(factory, EFL_UI_LIST_DEFAULT_ITEM_CLASS); efl_ui_property_bind(factory, "signal/efl,state,%v", "odd_style"); efl_ui_property_bind(factory, "signal/efl,state,%{selected;unselected}", "selected"); - efl_ui_property_bind(factory, "efl.text", "title"); + efl_ui_property_bind(factory, "text", "title"); + Eo *lst = efl_new(EFL_UI_POSITION_MANAGER_LIST_CLASS); li = efl_add(EFL_UI_COLLECTION_VIEW_CLASS, win, - efl_ui_view_model_set(efl_added, selmodel)); - efl_ui_collection_view_position_manager_set(li, efl_new(EFL_UI_POSITION_MANAGER_LIST_CLASS)); + efl_ui_collection_view_position_manager_set(efl_added, lst), + efl_ui_view_model_set(efl_added, selmodel), + efl_ui_collection_view_factory_set(efl_added, factory)); // efl_event_callback_add(li, EFL_UI_LIST_VIEW_EVENT_ITEM_REALIZED, _realized_cb, NULL); // efl_event_callback_add(li, EFL_UI_LIST_VIEW_EVENT_ITEM_UNREALIZED, _unrealized_cb, NULL); |