Some minor fixes

This commit is contained in:
Jaime Thomas 2008-06-05 19:20:29 +00:00
parent 4601df797e
commit aa1fcc472c
5 changed files with 11 additions and 8 deletions

View File

@ -1,3 +1,3 @@
-> Detect if the media in a drive has changed and update the drive info (dbus?). -> Detect if the media in a drive has changed and update the drive info (dbus?).
-> Make gstreamer dependancy optional -> Make gstreamer dependancy optional DONE
-> more graceful handling of errors -> more graceful handling of errors

View File

@ -93,14 +93,14 @@ ecdb_burn_project_destroy(Ecdb_Burn_Project *proj)
FREE(proj->copywrite_id); FREE(proj->copywrite_id);
FREE(proj->abstract_id); FREE(proj->abstract_id);
FREE(proj->biblio_id); FREE(proj->biblio_id);
ecdb_project_destroy(ECDB_PROJ(proj)); ecdb_project_destroy(ECDB_PROJECT(proj));
free(proj); free(proj);
} }
void void
ecdb_erase_project_destroy(Ecdb_Erase_Project *proj) ecdb_erase_project_destroy(Ecdb_Erase_Project *proj)
{ {
ecdb_project_destroy(ECDB_PROJ(proj)); ecdb_project_destroy(ECDB_PROJECT(proj));
free(proj); free(proj);
} }
@ -182,7 +182,8 @@ ecdb_burn_project(Ecdb_Burn_Project *proj)
pthread_create(&progress_update, NULL, _progress_update, proj); pthread_create(&progress_update, NULL, _progress_update, proj);
pthread_detach(progress_update); pthread_detach(progress_update);
ecore_timer_add(0.5, _progress_gui_update, proj); ecore_timer_add(0.5, _progress_gui_update, proj);
ecore_event_handler_add(ECDB_DRIVE_ACTION_FINISHED, ecdb_burn_finished, ECDB_PROJECT(proj)->ev_handler = ecore_event_handler_add
(ECDB_DRIVE_ACTION_FINISHED, ecdb_burn_finished,
data); data);
return TRUE; return TRUE;
@ -282,7 +283,7 @@ _progress_gui_update(void *data)
if (proj->stat == BURN_DRIVE_IDLE) if (proj->stat == BURN_DRIVE_IDLE)
{ {
/* These don't enjoy being called before /* These don't enjoy being called before
* ecore_main_loop_bugin * ecore_main_loop_begin
*/ */
//ecore_event_add(ECDB_DRIVE_ACTION_FINISHED, data, NULL, NULL); //ecore_event_add(ECDB_DRIVE_ACTION_FINISHED, data, NULL, NULL);
ecore_event_add(ECDB_DRIVE_ACTION_FINISHED, NULL, NULL, NULL); ecore_event_add(ECDB_DRIVE_ACTION_FINISHED, NULL, NULL, NULL);
@ -328,6 +329,8 @@ ecdb_burn_finished(void *data, int type, void *event)
burn_drive_info_free(proj->proj->drive->tangible); burn_drive_info_free(proj->proj->drive->tangible);
printf("Burn Complete\n"); printf("Burn Complete\n");
ecore_event_handler_del(ECDB_PROJECT(proj)->ev_handler);
/* To be removed from here at some point */ /* To be removed from here at some point */
Ecdb_Burn_Project *t; Ecdb_Burn_Project *t;
t = ECDB_BURN(proj->proj); t = ECDB_BURN(proj->proj);
@ -335,5 +338,5 @@ ecdb_burn_finished(void *data, int type, void *event)
FREE(t); FREE(t);
FREE(proj); FREE(proj);
ecore_event_add(ECORE_EVENT_SIGNAL_EXIT, NULL, NULL, NULL); ecore_event_add(ECORE_EVENT_SIGNAL_EXIT, NULL, NULL, NULL);
return FALSE; return TRUE;
} }

View File

@ -48,6 +48,7 @@ struct _Ecdb_Project_Info
Ecdb_Drive_Info *drive; Ecdb_Drive_Info *drive;
BurnProgress progress; BurnProgress progress;
BurnDriveStatus stat; BurnDriveStatus stat;
Ecore_Event_Handler *ev_handler;
}; };
/* Typecast a pointer to an Ecdb_Source */ /* Typecast a pointer to an Ecdb_Source */

View File

@ -27,7 +27,6 @@ ecdb_project_init(Ecdb_Project *proj)
void void
ecdb_project_destroy(Ecdb_Project *proj) ecdb_project_destroy(Ecdb_Project *proj)
{ {
ecdb_lose_drive_info(proj);
free(proj); free(proj);
} }

View File

@ -3,7 +3,7 @@
Ecdb_Project *ecdb_project_new(void); Ecdb_Project *ecdb_project_new(void);
int ecdb_project_init(Ecdb_Project *proj); int ecdb_project_init(Ecdb_Project *proj);
void ecdb_project_destroy(void); void ecdb_project_destroy(Ecdb_Project *proj);
int ecdb_shutdown(void *data, int type, void *event); int ecdb_shutdown(void *data, int type, void *event);
void ecdb_burn_init(void); void ecdb_burn_init(void);
void ecdb_image_init(void); void ecdb_image_init(void);