And update the display with the values.
This commit is contained in:
parent
076cb1f674
commit
427c579f6e
@ -11,9 +11,21 @@ _update_capacity(void *data, int type, void *ev_data)
|
||||
{
|
||||
Ecdb_Source *src;
|
||||
Evas_Object *o;
|
||||
Edje_Message_Float msg;
|
||||
|
||||
o = data;
|
||||
src = evas_object_data_get(o, "source");
|
||||
// FIXME use actual disc capacity here
|
||||
msg.val = (float)src->size / 1048576.0 / 700.0;
|
||||
if (msg.val > 1.0)
|
||||
{
|
||||
printf("OVER SIZE LIMIT!\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("size: %lld, calced size: %f\n", src->size, msg.val);
|
||||
}
|
||||
edje_object_message_send(o, EDJE_MESSAGE_FLOAT, 1, &msg);
|
||||
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user