From b603e0e17d32dea8c2c816608ba14550f4b21c03 Mon Sep 17 00:00:00 2001 From: Goun Lee Date: Wed, 29 Jun 2011 13:53:19 +0900 Subject: [PATCH] [elm_multibuttonentry.c]Bug fix: More than 1 focus at a time in Email App Change-Id: I9676bd28b43e8c7464a963673b85834e247fce07 --- src/lib/elm_multibuttonentry.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/lib/elm_multibuttonentry.c b/src/lib/elm_multibuttonentry.c index 030b14e..e0ef4dc 100644 --- a/src/lib/elm_multibuttonentry.c +++ b/src/lib/elm_multibuttonentry.c @@ -698,7 +698,6 @@ _del_button_item(Elm_Multibuttonentry_Item *item) _set_vis_guidetext(obj); } - static void _select_button(Evas_Object *obj, Evas_Object *btn) { @@ -710,13 +709,17 @@ _select_button(Evas_Object *obj, Evas_Object *btn) if (btn) { _change_current_button(obj, btn); - elm_object_unfocus(wd->entry); - evas_object_focus_set(btn, EINA_TRUE); + if (elm_widget_focus_get(obj)) + { + elm_object_unfocus(wd->entry); + evas_object_focus_set(btn, EINA_TRUE); + } } else { _change_current_button_state(obj, MULTIBUTONENTRY_BUTTON_STATE_DEFAULT); - elm_object_focus(wd->entry); + if (elm_widget_focus_get(obj)) + elm_object_focus(wd->entry); } } @@ -972,6 +975,7 @@ static void _entry_focus_in_cb(void *data, Evas *e, __UNUSED__ void *event_info) { Widget_Data *wd = elm_widget_data_get(data); + if (!wd) return; _change_current_button_state(data, MULTIBUTONENTRY_BUTTON_STATE_DEFAULT); } @@ -980,6 +984,8 @@ static void _entry_focus_out_cb(void *data, Evas *e, __UNUSED__ void *event_info) { Widget_Data *wd = elm_widget_data_get(data); + if (!wd) return; + static char str[MAX_STR]; strncpy(str,elm_scrolled_entry_entry_get(wd->entry), MAX_STR); -- 2.7.4