summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Houston <stephen@localhost.localdomain>2018-02-08 17:16:29 -0600
committerStephen Houston <stephen@localhost.localdomain>2018-02-08 17:16:29 -0600
commit65714dc0bb45a78d8b0d3fb10b8e4120bcec90c1 (patch)
tree1ff164612437a512d75a943ac773c6bd99352722
parenta86367bfeb772475ae082e22312c2edb7a58869e (diff)
Delete the popups when focus out is receieved.
-rw-r--r--src/wireless.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/wireless.c b/src/wireless.c
index baec619..b6e6cab 100644
--- a/src/wireless.c
+++ b/src/wireless.c
@@ -973,6 +973,12 @@ _wireless_gadget_edit_select_services(void *data EINA_UNUSED, Evas_Object *obj E
973} 973}
974 974
975static void 975static void
976_popup_focus_out(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_data EINA_UNUSED)
977{
978 evas_object_del(obj);
979}
980
981static void
976_wireless_gadget_edit(int type) 982_wireless_gadget_edit(int type)
977{ 983{
978 Evas_Object *popup, *entry, *box1, *box, *list, *lbl, *bt; 984 Evas_Object *popup, *entry, *box1, *box, *list, *lbl, *bt;
@@ -1058,6 +1064,8 @@ _wireless_gadget_edit(int type)
1058 elm_win_alpha_set(popup, 1); 1064 elm_win_alpha_set(popup, 1);
1059 else 1065 else
1060 elm_win_autodel_set(popup, 1); 1066 elm_win_autodel_set(popup, 1);
1067 evas_object_event_callback_add(popup, EVAS_CALLBACK_FOCUS_OUT, _popup_focus_out, NULL);
1068
1061 box = elm_box_add(popup); 1069 box = elm_box_add(popup);
1062 evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, 0); 1070 evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, 0);
1063 evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); 1071 evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
@@ -1749,6 +1757,7 @@ wireless_authenticate(const Eina_Array *fields, Wireless_Auth_Cb cb, void *data)
1749 elm_win_autodel_set(popup, 1); 1757 elm_win_autodel_set(popup, 1);
1750 evas_object_event_callback_add(popup, EVAS_CALLBACK_KEY_DOWN, _wireless_auth_key, p); 1758 evas_object_event_callback_add(popup, EVAS_CALLBACK_KEY_DOWN, _wireless_auth_key, p);
1751 evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, _wireless_auth_del, p); 1759 evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, _wireless_auth_del, p);
1760 evas_object_event_callback_add(popup, EVAS_CALLBACK_FOCUS_OUT, _popup_focus_out, NULL);
1752 p->popup = popup; 1761 p->popup = popup;
1753 1762
1754 tb = elm_table_add(popup); 1763 tb = elm_table_add(popup);