And update the display with the values.

This commit is contained in:
Jaime Thomas 2008-12-25 06:23:20 +00:00
parent 076cb1f674
commit 427c579f6e

View File

@ -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;
} }