Get rid of that annoying bug where all of the combo entries would be selected.
This commit is contained in:
parent
e3d28d7029
commit
17a787c6a6
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user