Fix a bunch of mistakes I made before.

This commit is contained in:
Jaime Thomas
2009-02-17 22:48:11 +00:00
parent 2fb05a62d4
commit 6a4420575a
11 changed files with 183 additions and 175 deletions

View File

@@ -8,7 +8,7 @@ struct Burn_Data
BurnSession *session;
Eina_List *sources;
Eina_List *tracks;
Ecdb_Project *proj;
Ecdb_Project *proj;
Ecdb_Page *page;
};
@@ -37,7 +37,7 @@ ecdb_burn_project(Ecdb_Burn_Project *proj, Ecdb_Page *page)
printf("Error: Cannot create burn data structure!\n");
return FALSE;
}
data->proj = ECDB_PROJECT(proj);
data->proj = ECDB_PROJECT(proj);
data->page = page;
if (proj->burn_mode != BURN_AUDIO)
@@ -158,7 +158,7 @@ static void
ecdb_burn_progress_handler(void *data, void *buffer, unsigned int nbyte)
{
BurnProgress *p;
Evas_Object *swallow;
Evas_Object *swallow;
Burn_Data *bdata;
static int last_sector = 0;
int percent;
@@ -189,38 +189,38 @@ ecdb_burn_progress_handler(void *data, void *buffer, unsigned int nbyte)
else
{
last_sector = p->sectors;
}
bdata = data;
if (!bdata)
{
printf("ecdb_burn_progress_handler: NULL bdata!\n");
return;
}
if ((!bdata->page) || (!bdata->proj))
{
printf("ecdb_burn_progress_handler: NULL page or proj!\n");
return;
}
switch (proj->type)
{
case ECDB_AUDIO_PROJECT:
swallow = page->audio;
break;
case: ECDB_DATA_PROJECT:
swallow = page->data;
break;
case: ECDB_IMAGE_PROJECT:
swallow = page->image;
break;
default:
printf("ecdb_burn_progress_handler: Unrecognized project type!\n");
return;
}
bdata = data;
if (!bdata)
{
printf("ecdb_burn_progress_handler: NULL bdata!\n");
return;
}
if ((!bdata->page) || (!bdata->proj))
{
printf("ecdb_burn_progress_handler: NULL page or proj!\n");
return;
}
switch (bdata->proj->type)
{
case ECDB_AUDIO_PROJECT:
swallow = bdata->page->audio;
break;
case ECDB_DATA_PROJECT:
swallow = bdata->page->data;
break;
case ECDB_IMAGE_PROJECT:
swallow = bdata->page->image;
break;
default:
printf("ecdb_burn_progress_handler: Unrecognized project type!\n");
return;
}
percent = (int)((double)(last_sector + 1) / (double)p->sectors * 100.0);
@@ -262,15 +262,15 @@ ecdb_burn_finished(void *data, int type, void *event)
burn_drive_info_free(proj->proj->drive->tangible);
printf("Burn Complete\n");
ecore_event_handler_del(proj->proj->ev_handler);
ecore_event_handler_del(proj->proj->ev_handler);
proj->proj->ev_handler = NULL;
ecore_pipe_del(proj->proj->pipe);
ecore_pipe_del(proj->proj->pipe);
proj->proj->pipe = NULL;
switch (proj->proj->type)
{
case ECDB_AUDIO_PROJECT:
print("How in the world did you get here?\n");
case ECDB_AUDIO_PROJECT:
printf("How in the world did you get here?\n");
//ecdb_burn_audio_cleanup(proj->page);
break;
@@ -279,10 +279,10 @@ ecdb_burn_finished(void *data, int type, void *event)
break;
case ECDB_IMAGE_PROJECT:
ecdb_burn_image_cleanup(proj->page);
break;
default:
ecdb_burn_image_cleanup(proj->page);
break;
default:
printf("ecdb_burn_finished: unknown project type!\n");
}
FREE(proj);