) {
elm_object_focus_set(priv->popup_btn1, EINA_TRUE);
}
+}
+
+static void _imf_commit_event_cb(void *data, Ecore_IMF_Context *ctx, void *event_info)
+{
+ struct _priv *priv = data;
+ const char *buf = NULL;
+ int len = 0;
+
+ if (NULL == priv)
+ return;
+
+ buf = elm_entry_entry_get(priv->passcode_entry);
+ if (NULL == buf)
+ return;
- str = elm_entry_entry_get(priv->passcode_entry);
- if (strlen(str) >= MIN_WIRELESS_LEN) {
+ len = strlen(buf);
+ if (len >= MIN_WIRELESS_LEN) {
elm_object_disabled_set(priv->popup_btn2, EINA_FALSE);
} else {
elm_object_disabled_set(priv->popup_btn2, EINA_TRUE);
}
}
+static void _imf_delete_event_cb(void *data, Ecore_IMF_Context *ctx, void *event_info)
+{
+ struct _priv *priv = data;
+
+ if (NULL == priv)
+ return;
+
+ elm_object_disabled_set(priv->popup_btn2, EINA_TRUE);
+}
+
static void _check_passcode_input_cb(void *data, Evas_Object *entry, char **text)
{
struct _priv *priv = data;
{
Evas_Object *popup, *ly, *entry, *btn1, *btn2;
Evas_Object *scroller;
+ Ecore_IMF_Context *ctx;
if (priv->passcode_popup) {
_ERR("Already popup exists");
evas_object_event_callback_add(entry, EVAS_CALLBACK_KEY_DOWN,
_popup_entry_key_down_cb, priv);
+ /* Handle special button events */
+ ctx = (Ecore_IMF_Context*)elm_entry_imf_context_get(entry);
+ ecore_imf_context_event_callback_add(ctx,
+ ECORE_IMF_CALLBACK_COMMIT, _imf_commit_event_cb, priv);
+ ecore_imf_context_event_callback_add(ctx,
+ ECORE_IMF_CALLBACK_DELETE_SURROUNDING, _imf_delete_event_cb, priv);
+
elm_object_disabled_set(priv->popup_btn2, EINA_TRUE);
/* Set focus into entry */
elm_object_focus_set(priv->popup_btn1, EINA_TRUE);