procs: little bit

This commit is contained in:
Alastair Poole 2020-12-29 13:53:08 +00:00
parent 2b1b4e7dc3
commit 58a0677c79
1 changed files with 57 additions and 40 deletions

View File

@ -18,9 +18,7 @@ typedef struct
{
Ecore_Thread *thread;
Evisum_Ui_Cache *cache;
Eina_List *cpu_list;
Ecore_Event_Handler *handler[2];
Eina_Bool skip;
Eina_Bool skip_wait;
Eina_Bool ready;
@ -54,7 +52,6 @@ typedef struct
Evas_Object *btn_rss;
Evas_Object *btn_state;
Evas_Object *btn_cpu_usage;
} Ui_Data;
#define PAD_W 2
@ -375,7 +372,11 @@ _content_get(void *data, Evas_Object *obj, const char *source)
{
elm_object_text_set(lb, buf);
evas_object_geometry_get(lb, NULL, NULL, &ow, NULL);
if (ow > w) evas_object_size_hint_min_set(pd->btn_pid, w, 1);
if (ow > w)
{
evas_object_size_hint_min_set(pd->btn_pid, w, 1);
pd->skip_wait = 1;
}
}
rec = evas_object_data_get(lb, "rec");
evas_object_size_hint_min_set(rec, w, 1);
@ -393,7 +394,11 @@ _content_get(void *data, Evas_Object *obj, const char *source)
{
elm_object_text_set(lb, buf);
evas_object_geometry_get(lb, NULL, NULL, &ow, NULL);
if (ow > w) evas_object_size_hint_min_set(pd->btn_uid, w, 1);
if (ow > w)
{
evas_object_size_hint_min_set(pd->btn_uid, w, 1);
pd->skip_wait = 1;
}
}
rec = evas_object_data_get(lb, "rec");
evas_object_size_hint_min_set(rec, w, 1);
@ -407,7 +412,11 @@ _content_get(void *data, Evas_Object *obj, const char *source)
{
elm_object_text_set(lb, buf);
evas_object_geometry_get(lb, NULL, NULL, &ow, NULL);
if (ow > w) evas_object_size_hint_min_set(pd->btn_size, w, 1);
if (ow > w)
{
evas_object_size_hint_min_set(pd->btn_size, w, 1);
pd->skip_wait = 1;
}
}
rec = evas_object_data_get(lb, "rec");
evas_object_size_hint_min_set(rec, w, 1);
@ -421,7 +430,11 @@ _content_get(void *data, Evas_Object *obj, const char *source)
{
elm_object_text_set(lb, buf);
evas_object_geometry_get(lb, NULL, NULL, &ow, NULL);
if (ow > w) evas_object_size_hint_min_set(pd->btn_rss, w, 1);
if (ow > w)
{
evas_object_size_hint_min_set(pd->btn_rss, w, 1);
pd->skip_wait = 1;
}
}
rec = evas_object_data_get(lb, "rec");
evas_object_size_hint_min_set(rec, w, 1);
@ -436,7 +449,11 @@ _content_get(void *data, Evas_Object *obj, const char *source)
elm_object_text_set(lb, buf);
hbx = evas_object_data_get(lb, "hbx");
evas_object_geometry_get(hbx, NULL, NULL, &ow, NULL);
if (ow > w) evas_object_size_hint_min_set(pd->btn_cmd, w, 1);
if (ow > w)
{
evas_object_size_hint_min_set(pd->btn_cmd, w, 1);
pd->skip_wait = 1;
}
rec = evas_object_data_get(lb, "rec");
evas_object_size_hint_min_set(rec, w, 1);
evas_object_show(lb);
@ -695,7 +712,7 @@ _process_list(void *data, Ecore_Thread *thread)
{
list = _process_list_get(pd);
if (!pd->skip)
if (!pd->skip_wait)
ecore_thread_feedback(thread, list);
else
{
@ -1147,7 +1164,7 @@ _genlist_scroll_start_cb(void *data, Evas_Object *obj EINA_UNUSED,
pd = data;
pd->skip = 1;
pd->skip_wait = 1;
}
static void
@ -1158,7 +1175,7 @@ _genlist_scroll_end_cb(void *data, Evas_Object *obj EINA_UNUSED,
pd = data;
pd->skip = 0;
pd->skip_wait = 0;
}
static Evas_Object *