0.5.10: Rbt. Y-Lee

Well, that was silly. Should have asked for testing...:)

Convinced myself nothing wrong and/or lazy.
This commit is contained in:
Alastair Poole 2021-01-08 18:38:50 +00:00
parent e655333de4
commit 62fec68dd0
6 changed files with 51 additions and 10 deletions

6
NEWS
View File

@ -4,6 +4,12 @@ Evisum 0.6.0
* ...
=============
Evisum 0.5.10
=============
* Fix a bug ?
============
Evisum 0.5.9
============

View File

@ -1 +1 @@
0.6.0
0.5.10

View File

@ -1,6 +1,6 @@
##### Project
project('evisum', 'c',
version : '0.6.0',
version : '0.5.10',
meson_version : '>= 0.40.0')
efl_version = '>= 1.22.0'

View File

@ -296,12 +296,33 @@ _main_menu_show_user_changed_cb(void *data EINA_UNUSED, Evas_Object *obj,
ui->proc.show_user = elm_check_state_get(obj);
evisum_ui_config_save(ui);
}
typedef struct
{
Ecore_Timer *timer;
Evas_Object *it_focus;
} Menu_Inst;
static void
_main_menu_deleted_cb(void *data EINA_UNUSED, Evas_Object *obj, Evas *e,
void *event_info EINA_UNUSED)
{
Menu_Inst *inst = data;
inst->it_focus = NULL;
if (inst->timer)
ecore_timer_del(inst->timer);
inst->timer = NULL;
free(inst);
}
static Eina_Bool
_menu_focus_cb(void *data)
_main_menu_focus_timer_cb(void *data)
{
Evas_Object *o = data;
elm_object_focus_set(o, 1);
Menu_Inst *inst = data;
if (inst->it_focus)
elm_object_focus_set(inst->it_focus, 1);
inst->timer = NULL;
return EINA_FALSE;
}
@ -382,13 +403,20 @@ evisum_ui_main_menu_create(Ui *ui, Evas_Object *parent, Evas_Object *obj)
elm_box_pack_end(bx, hbox);
Menu_Inst *inst = calloc(1, sizeof(Menu_Inst));
if (!inst) return NULL;
inst->timer = ecore_timer_add(0.5, _main_menu_focus_timer_cb, inst);
inst->it_focus = it_focus;
evas_object_event_callback_add(o, EVAS_CALLBACK_DEL,
_main_menu_deleted_cb, inst);
elm_ctxpopup_direction_priority_set(o, ELM_CTXPOPUP_DIRECTION_UP,
ELM_CTXPOPUP_DIRECTION_DOWN,
ELM_CTXPOPUP_DIRECTION_LEFT,
ELM_CTXPOPUP_DIRECTION_RIGHT);
evas_object_move(o, ox + (ow / 2), oy + oh);
evas_object_show(o);
ecore_timer_add(0.5, _menu_focus_cb, it_focus);
if (parent != ui->proc.win) return o;

View File

@ -54,7 +54,12 @@ _mem_usage_main_cb(void *data EINA_UNUSED, Ecore_Thread *thread)
memory.used += memory.zfs_arc_used;
ecore_thread_feedback(thread, &memory);
usleep(1000000);
for (int i = 0; i < 8; i++)
{
if (ecore_thread_check(thread))
break;
usleep(125000);
}
}
}
@ -186,7 +191,6 @@ _win_del_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj,
ecore_thread_cancel(pd->thread);
ecore_thread_wait(pd->thread, 0.5);
evas_object_del(obj);
ui->mem.win = NULL;
free(pd);
}
@ -295,7 +299,7 @@ ui_win_memory_add(Ui *ui)
evas_object_event_callback_add(win, EVAS_CALLBACK_RESIZE, _win_resize_cb, pd);
evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _win_del_cb, pd);
evas_object_event_callback_add(win, EVAS_CALLBACK_MOVE, _win_move_cb, pd);
evas_object_event_callback_add(tbl, EVAS_CALLBACK_KEY_DOWN, _win_key_down_cb, pd);
evas_object_event_callback_add(win, EVAS_CALLBACK_KEY_DOWN, _win_key_down_cb, pd);
evas_object_show(win);
pd->thread = ecore_thread_feedback_run(_mem_usage_main_cb,

View File

@ -1550,7 +1550,10 @@ _win_key_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
elm_scroller_region_get(pd->scroller, &x, &y, &w, &h);
if (!strcmp(ev->keyname, "Escape") && !pd->entry_visible)
evas_object_del(pd->win);
{
evas_object_del(pd->win);
return;
}
else if (!strcmp(ev->keyname, "Prior"))
elm_scroller_region_bring_in(pd->scroller, x, y - h, w, h);
else if (!strcmp(ev->keyname, "Next"))