And update the display with the values.
This commit is contained in:
parent
45ad964b15
commit
d6e5852814
@ -11,9 +11,21 @@ _update_capacity(void *data, int type, void *ev_data)
|
|||||||
{
|
{
|
||||||
Ecdb_Source *src;
|
Ecdb_Source *src;
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
|
Edje_Message_Float msg;
|
||||||
|
|
||||||
o = data;
|
o = data;
|
||||||
src = evas_object_data_get(o, "source");
|
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;
|
return ECORE_CALLBACK_RENEW;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user