diff options
author | Dave Andreoli <dave@gurumeditation.it> | 2016-01-19 20:33:47 +0100 |
---|---|---|
committer | Dave Andreoli <dave@gurumeditation.it> | 2016-01-19 20:33:47 +0100 |
commit | 31027d719fc21122c042aab90dad7ae6d817b40c (patch) | |
tree | 2a242bc74d92fee19becfbc92697b01ed2331ee1 /src | |
parent | 1029f53f99d748c3d515a3b74a74c529b289c80e (diff) | |
download | elementary-31027d719fc21122c042aab90dad7ae6d817b40c.tar.gz |
Combobox: rename the "selected" event to "item,selected" as it should be.
Also updated the test to reflect this change
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/test_combobox.c | 16 | ||||
-rw-r--r-- | src/lib/elc_combobox.c | 6 | ||||
-rw-r--r-- | src/lib/elm_combobox.eo | 2 |
3 files changed, 13 insertions, 11 deletions
diff --git a/src/bin/test_combobox.c b/src/bin/test_combobox.c index b5f11729c..43bd4efa6 100644 --- a/src/bin/test_combobox.c +++ b/src/bin/test_combobox.c @@ -12,11 +12,11 @@ _combobox_clicked_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, } static void -_combobox_selected_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, - void *event_info) +_combobox_item_selected_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, + void *event_info) { const char *txt = elm_object_item_text_get(event_info); - printf("'selected' callback is called. (selected item : %s)\n", txt); + printf("'item,selected' callback is called. (selected item : %s)\n", txt); } static void @@ -125,12 +125,12 @@ test_combobox(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, (void*)(uintptr_t)(i * 10)); evas_object_smart_callback_add(combobox, "clicked", _combobox_clicked_cb, NULL); - evas_object_smart_callback_add(combobox, "selected", - _combobox_selected_cb, NULL); evas_object_smart_callback_add(combobox, "dismissed", _combobox_dismissed_cb, NULL); evas_object_smart_callback_add(combobox, "expanded", _combobox_expanded_cb, NULL); + evas_object_smart_callback_add(combobox, "item,selected", + _combobox_item_selected_cb, NULL); evas_object_smart_callback_add(combobox, "item,pressed", _combobox_item_pressed_cb, NULL); evas_object_smart_callback_add(combobox, "filter,done", @@ -148,8 +148,10 @@ test_combobox(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, (void*)(uintptr_t)(i * 10)); evas_object_smart_callback_add(combobox, "clicked", _combobox_clicked_cb, NULL); - evas_object_smart_callback_add(combobox, "selected", - _combobox_selected_cb, NULL); + evas_object_smart_callback_add(combobox, "item,selected", + _combobox_item_selected_cb, NULL); + evas_object_smart_callback_add(combobox, "item,pressed", + _combobox_item_pressed_cb, NULL); evas_object_smart_callback_add(combobox, "dismissed", _combobox_dismissed_cb, NULL); evas_object_smart_callback_add(combobox, "expanded", diff --git a/src/lib/elc_combobox.c b/src/lib/elc_combobox.c index 9e11a2f96..4076c416c 100644 --- a/src/lib/elc_combobox.c +++ b/src/lib/elc_combobox.c @@ -15,16 +15,16 @@ #define MY_CLASS_NAME "Elm_Combobox" #define MY_CLASS_NAME_LEGACY "elm_combobox" -static const char SIG_SELECTED[] = "selected"; static const char SIG_DISMISSED[] = "dismissed"; static const char SIG_EXPANDED[] = "expanded"; +static const char SIG_ITEM_SELECTED[] = "item,selected"; static const char SIG_ITEM_PRESSED[] = "item,pressed"; static const char SIG_FILTER_DONE[] = "filter,done"; static const Evas_Smart_Cb_Description _smart_callbacks[] = { - {SIG_SELECTED, ""}, {SIG_DISMISSED, ""}, {SIG_EXPANDED, ""}, + {SIG_ITEM_SELECTED, ""}, {SIG_ITEM_PRESSED, ""}, {SIG_FILTER_DONE, ""}, {"clicked", ""}, /**< handled by parent button class */ @@ -165,7 +165,7 @@ _on_item_selected(void *data , Evas_Object *obj EINA_UNUSED, void *event) { ELM_COMBOBOX_DATA_GET(data, sd); elm_object_focus_set(sd->entry, EINA_TRUE); - eo_do(data, eo_event_callback_call(ELM_COMBOBOX_EVENT_SELECTED, event)); + eo_do(data, eo_event_callback_call(ELM_COMBOBOX_EVENT_ITEM_SELECTED, event)); } static void diff --git a/src/lib/elm_combobox.eo b/src/lib/elm_combobox.eo index 80e55329c..f189fca13 100644 --- a/src/lib/elm_combobox.eo +++ b/src/lib/elm_combobox.eo @@ -48,10 +48,10 @@ class Elm_Combobox (Elm.Button, Evas.Selectable_Interface, Elm_Interface_Atspi_Widget_Action.elm_actions.get; } events { - selected; dismissed; expanded; clicked; + item,selected; item,pressed; filter,done; } |