From 17a787c6a6327dd9f65b9c01b26c4f11418488a1 Mon Sep 17 00:00:00 2001 From: Jaime Thomas Date: Wed, 24 Dec 2008 19:16:20 +0000 Subject: [PATCH] Get rid of that annoying bug where all of the combo entries would be selected. --- experimental/ecdb/trunk/src/ecdb_widgets.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/experimental/ecdb/trunk/src/ecdb_widgets.c b/experimental/ecdb/trunk/src/ecdb_widgets.c index 5f3f5e99..d3a16b24 100644 --- a/experimental/ecdb/trunk/src/ecdb_widgets.c +++ b/experimental/ecdb/trunk/src/ecdb_widgets.c @@ -565,6 +565,12 @@ _combo_clicked(void *data, Evas_Object *obj, void *event_info) ecdb_combo_collapse(data); } +static void +_combo_item_hide(void *data, Evas_Object *obj, void *event_info) +{ + edje_object_signal_emit(obj, "ecdb,focus,out", "ecdb"); +} + static void _combo_moveable_click_cb(void *data, Evas_Object *obj, const char *emission, const char *source) @@ -653,6 +659,7 @@ ecdb_combo_append(Evas_Object *c, Evas_Object *o) cd->count++; edje_object_part_box_append(cd->popup, "ecdb.box", o); evas_object_smart_callback_add(o, "clicked", _combo_clicked, c); + evas_object_smart_callback_add(o, "hidden", _combo_item_hide, c); } void @@ -724,6 +731,8 @@ ecdb_combo_collapse(Evas_Object *c) Combo_Data *cd; const char *location; char buf[1024]; + Eina_Iterator *it; + Evas_Object *o; // If we close the window if ((!em) || (!em->main_win_ee)) @@ -740,6 +749,12 @@ ecdb_combo_collapse(Evas_Object *c) evas_object_pass_events_set(cd->popup, 1); edje_object_signal_emit(cd->popup, buf, "ecdb"); + it = evas_object_box_iterator_new(edje_object_part_object_get(cd->popup, + "ecdb.box")); + while ((eina_iterator_next(it, (void **)&o))) + evas_object_smart_callback_call(o, "hidden", c); + eina_iterator_free(it); + cd->expanded = 0; }