Winner!11!11!1!! Erase progress works now!!!!!11!!!?<>_~!~!

This commit is contained in:
Jaime Thomas 2008-11-17 20:19:35 +00:00
parent 5dbb07c5a2
commit 7b12247d36
2 changed files with 12 additions and 12 deletions

View File

@ -183,16 +183,15 @@ ecdb_drive_progress_update(void *data)
}
else if (stat == BURN_DRIVE_IDLE)
{
ecore_pipe_write(proj->pipe, NULL, 0);
ecore_pipe_write(proj->pipe, "AC",
sizeof("AC"));
ecore_pipe_del(proj->pipe);
/* Call the finished event handler here */
pthread_exit(NULL);
break;
}
// Arg... too tired to figure this out now
//ecore_pipe_write(proj->pipe, &p, sizeof(p));
printf("%d/%d\n", p.sector, p.sectors);
ecore_pipe_write(proj->pipe, &p, sizeof(p));
sleep(1);
}
}

View File

@ -92,25 +92,26 @@ ecdb_erase_disc(Ecdb_Erase_Project *proj)
static void
ecdb_erase_progress_handler(void *data, void *buffer, unsigned int nbyte)
{
BurnProgress *p = buffer;
BurnProgress *p;
Evas_Object *swallow;
char buf[1024];
char *text = buffer;
// Is this correct?
// Check this
if (sizeof(buffer) == sizeof(BurnProgress))
{
p = buffer;
}
else
if ((nbyte != sizeof(BurnProgress)) || (!strcmp(text, "AC")))
{
ecore_event_add(ECDB_DRIVE_ACTION_FINISHED, NULL, NULL, NULL);
return;
}
else
{
p = buffer;
text = NULL;
}
swallow = evas_object_name_find(ecore_evas_get(em->main_win_ee),
"erase_page");
snprintf(buf, sizeof(buf), "%d/%d", p->sector, p->sectors);
printf("buf: %s\n", buf);
edje_object_part_text_set(swallow, "progress_text", buf);
}