ui: simplify resize...
Still to catch that one bug...this is better though I think...
This commit is contained in:
parent
70fa4fec9e
commit
fe808cfcae
|
@ -496,6 +496,7 @@ _content_get(void *data, Evas_Object *obj, const char *source)
|
||||||
evas_object_show(l);
|
evas_object_show(l);
|
||||||
|
|
||||||
evas_object_show(it->obj);
|
evas_object_show(it->obj);
|
||||||
|
elm_table_align_set(it->obj, 0, 0);
|
||||||
|
|
||||||
return it->obj;
|
return it->obj;
|
||||||
}
|
}
|
||||||
|
@ -572,7 +573,8 @@ _process_list_feedback_cb(void *data, Ecore_Thread *thread EINA_UNUSED,
|
||||||
|
|
||||||
ui = data;
|
ui = data;
|
||||||
|
|
||||||
eina_lock_take(&_lock);
|
if (!eina_lock_take_try(&_lock))
|
||||||
|
return;
|
||||||
|
|
||||||
list = proc_info_all_get();
|
list = proc_info_all_get();
|
||||||
|
|
||||||
|
@ -612,12 +614,13 @@ _process_list_feedback_cb(void *data, Ecore_Thread *thread EINA_UNUSED,
|
||||||
proc_info_free(prev);
|
proc_info_free(prev);
|
||||||
|
|
||||||
elm_object_item_data_set(it, proc);
|
elm_object_item_data_set(it, proc);
|
||||||
elm_genlist_item_update(it);
|
//elm_genlist_item_update(it);
|
||||||
|
|
||||||
it = elm_genlist_item_next_get(it);
|
it = elm_genlist_item_next_get(it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
elm_genlist_realized_items_update(ui->genlist_procs);
|
||||||
eina_lock_release(&_lock);
|
eina_lock_release(&_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1497,31 +1500,16 @@ _evisum_key_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||||
_config_save(ui);
|
_config_save(ui);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
|
||||||
_evisum_resize_timer_cb(void *data)
|
|
||||||
{
|
|
||||||
Ui *ui = data;
|
|
||||||
|
|
||||||
ecore_timer_del(ui->timer_resize);
|
|
||||||
ui->timer_resize = NULL;
|
|
||||||
|
|
||||||
ui->ready = EINA_TRUE;
|
|
||||||
_process_list_update(ui);
|
|
||||||
|
|
||||||
return ECORE_CALLBACK_CANCEL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_evisum_resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
_evisum_resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||||
{
|
{
|
||||||
Ui *ui = data;
|
Ui *ui = data;
|
||||||
|
|
||||||
ui->ready = EINA_FALSE;
|
if (eina_lock_take_try(&_lock))
|
||||||
elm_genlist_clear(ui->genlist_procs);
|
{
|
||||||
if (ui->timer_resize)
|
elm_genlist_realized_items_update(ui->genlist_procs);
|
||||||
ecore_timer_reset(ui->timer_resize);
|
eina_lock_release(&_lock);
|
||||||
else
|
}
|
||||||
ui->timer_resize = ecore_timer_add(0.2, _evisum_resize_timer_cb, ui);
|
|
||||||
|
|
||||||
_config_save(ui);
|
_config_save(ui);
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,6 @@ typedef struct Ui
|
||||||
Eina_Bool show_self;
|
Eina_Bool show_self;
|
||||||
Eina_Bool shutdown_now;
|
Eina_Bool shutdown_now;
|
||||||
Eina_Bool restart;
|
Eina_Bool restart;
|
||||||
Ecore_Timer *timer_resize;
|
|
||||||
|
|
||||||
Ecore_Animator *animator;
|
Ecore_Animator *animator;
|
||||||
Eina_Bool zfs_mounted;
|
Eina_Bool zfs_mounted;
|
||||||
|
|
Loading…
Reference in New Issue