edje: add support of last input entered in password mode to be always visible in entry.

@feature

Requirement: Last input entered in password mode should be always visible in
entry. e.g. **a -> ***b.

Reviewers: cedric, raster, seoz

Reviewed By: cedric

CC: cedric

Differential Revision: https://phab.enlightenment.org/D589

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
This commit is contained in:
Amitesh Singh 2014-03-03 09:29:34 -03:00 committed by Cedric Bail
parent e8ee7ae24b
commit 257607cc69
3 changed files with 13 additions and 10 deletions

View File

@ -1039,7 +1039,7 @@ EAPI void edje_password_show_last_set(Eina_Bool password_show_last);
* @param password_show_last_timeout The timeout value.
*
* This functions sets the time out value for which the last input entered in password
* mode will be visible.
* mode will be visible. If the time out value is less than zero, the last input entered in password mode will be always visible.
*
* This value can be used only when last show mode is set in password mode.
*

View File

@ -1856,8 +1856,9 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
ecore_timer_del(en->pw_timer);
en->pw_timer = NULL;
}
en->pw_timer = ecore_timer_add
(TO_DOUBLE(_edje_password_show_last_timeout),
if (_edje_password_show_last_timeout >= 0)
en->pw_timer = ecore_timer_add
(_edje_password_show_last_timeout,
_password_timer_cb, en);
}
}
@ -4013,8 +4014,9 @@ _edje_entry_imf_event_commit_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED,
ecore_timer_del(en->pw_timer);
en->pw_timer = NULL;
}
en->pw_timer = ecore_timer_add
(TO_DOUBLE(_edje_password_show_last_timeout),
if (_edje_password_show_last_timeout >= 0)
en->pw_timer = ecore_timer_add
(_edje_password_show_last_timeout,
_password_timer_cb, en);
}
}
@ -4140,8 +4142,9 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx EINA
ecore_timer_del(en->pw_timer);
en->pw_timer = NULL;
}
en->pw_timer = ecore_timer_add
(TO_DOUBLE(_edje_password_show_last_timeout),
if (_edje_password_show_last_timeout >= 0)
en->pw_timer = ecore_timer_add
(_edje_password_show_last_timeout,
_password_timer_cb, en);
free(info);
}

View File

@ -23,7 +23,7 @@ static Eina_Rbtree *_edje_box_layout_registry = NULL;
char *_edje_fontset_append = NULL;
FLOAT_T _edje_scale = ZERO;
Eina_Bool _edje_password_show_last = EINA_FALSE;
FLOAT_T _edje_password_show_last_timeout = ZERO;
double _edje_password_show_last_timeout = 0;
int _edje_freeze_val = 0;
int _edje_freeze_calc_count = 0;
Eina_List *_edje_freeze_calc_list = NULL;
@ -344,8 +344,8 @@ edje_password_show_last_set(Eina_Bool password_show_last)
EAPI void
edje_password_show_last_timeout_set(double password_show_last_timeout)
{
if (_edje_password_show_last_timeout == FROM_DOUBLE(password_show_last_timeout)) return;
_edje_password_show_last_timeout = FROM_DOUBLE(password_show_last_timeout);
if (_edje_password_show_last_timeout == password_show_last_timeout) return;
_edje_password_show_last_timeout = password_show_last_timeout;
}
EAPI Eina_Bool