forked from enlightenment/terminology
del options widget after 10 sec delay when they popped down.
SVN revision: 72287
This commit is contained in:
parent
6ccc3bbb9c
commit
ce4096f1cd
2
TODO
2
TODO
|
@ -37,7 +37,7 @@ make it a first-class terminal:
|
|||
[ ] improve selection text extraction logic
|
||||
[X] font selector should include font previews in the list -
|
||||
preferably ONLY be a list of previews
|
||||
[ ] options widgets should be deleted once they are hidden. they stay
|
||||
[X] options widgets should be deleted once they are hidden. they stay
|
||||
in memory at the moment
|
||||
[ ] clicking with ANY mouse button while options is up outside of
|
||||
options should dismiss it.
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
static Evas_Object *op_frame, *op_box = NULL, *op_toolbar = NULL,
|
||||
*op_opbox = NULL, *op_tbox = NULL, *op_temp = NULL;
|
||||
static Eina_Bool op_out = EINA_FALSE;
|
||||
static Ecore_Timer *op_del_timer = NULL;
|
||||
|
||||
static void
|
||||
_cb_op_font(void *data, Evas_Object *obj, void *event)
|
||||
|
@ -50,6 +51,17 @@ _cb_op_tmp_chg(void *data, Evas_Object *obj, void *event)
|
|||
config_tmp = elm_check_state_get(obj);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_cb_op_del_delay(void *data)
|
||||
{
|
||||
evas_object_del(op_frame);
|
||||
options_font_clear();
|
||||
op_frame = NULL;
|
||||
op_del_timer = NULL;
|
||||
elm_cache_all_flush();
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
|
||||
{
|
||||
|
@ -126,11 +138,18 @@ options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
|
|||
{
|
||||
edje_object_signal_emit(bg, "options,show", "terminology");
|
||||
op_out = EINA_TRUE;
|
||||
if (op_del_timer)
|
||||
{
|
||||
ecore_timer_del(op_del_timer);
|
||||
op_del_timer = NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
edje_object_signal_emit(bg, "options,hide", "terminology");
|
||||
op_out = EINA_FALSE;
|
||||
elm_object_focus_set(term, EINA_TRUE);
|
||||
if (op_del_timer) ecore_timer_del(op_del_timer);
|
||||
op_del_timer = ecore_timer_add(10.0, _cb_op_del_delay, NULL);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -162,14 +162,9 @@ _cb_op_font_group_text_get(void *data, Evas_Object *obj, const char *part)
|
|||
}
|
||||
|
||||
void
|
||||
options_font(Evas_Object *opbox, Evas_Object *term)
|
||||
options_font_clear(void)
|
||||
{
|
||||
Evas_Object *o, *bx;
|
||||
char buf[4096], *file, *fname, *s;
|
||||
Eina_List *files, *fontlist, *l;
|
||||
Font *f;
|
||||
Elm_Object_Item *it, *sel_it = NULL, *grp_it = NULL;
|
||||
Elm_Genlist_Item_Class *it_class, *it_group;
|
||||
|
||||
EINA_LIST_FREE(fonts, f)
|
||||
{
|
||||
|
@ -181,7 +176,20 @@ options_font(Evas_Object *opbox, Evas_Object *term)
|
|||
eina_hash_free(fonthash);
|
||||
fonthash = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
options_font(Evas_Object *opbox, Evas_Object *term)
|
||||
{
|
||||
Evas_Object *o, *bx;
|
||||
char buf[4096], *file, *fname, *s;
|
||||
Eina_List *files, *fontlist, *l;
|
||||
Font *f;
|
||||
Elm_Object_Item *it, *sel_it = NULL, *grp_it = NULL;
|
||||
Elm_Genlist_Item_Class *it_class, *it_group;
|
||||
|
||||
options_font_clear();
|
||||
|
||||
bx = o = elm_box_add(opbox);
|
||||
elm_box_horizontal_set(o, EINA_TRUE);
|
||||
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
void options_font_clear(void);
|
||||
void options_font(Evas_Object *opbox, Evas_Object *term);
|
||||
|
|
Loading…
Reference in New Issue