Use known data for burning disc initialization, helps to not block the interface.

This commit is contained in:
Jaime Thomas
2009-04-19 23:24:53 +00:00
parent c741e1b580
commit 239ee6e91e
6 changed files with 103 additions and 34 deletions

View File

@@ -71,11 +71,11 @@ _button_cb_begin(void *data, Evas_Object *o __UNUSED__,
return;
}
if (!ecdb_aquire_drive(ECDB_PROJECT(proj), idx))
if (!ecdb_set_project_drive(ECDB_PROJECT(proj), idx))
{
EINA_ERROR_PDBG("Couldn't grab drive!\n");
EINA_ERROR_PWARN("Drive index doesn't exists!\n");
edje_object_part_text_set(page->erase, "progress_text",
"Couldn't grab the drive!");
"Drive doesn't exist!");
return;
}
@@ -84,8 +84,6 @@ _button_cb_begin(void *data, Evas_Object *o __UNUSED__,
EINA_ERROR_PDBG("Insert a disc into the drive!\n");
edje_object_part_text_set(page->erase, "progress_text",
"Insert a disc into the drive!");
burn_drive_release(ECDB_PROJECT(proj)->drive->tangible[0].drive, 0);
burn_drive_info_free(ECDB_PROJECT(proj)->drive->tangible);
return;
}
@@ -94,11 +92,16 @@ _button_cb_begin(void *data, Evas_Object *o __UNUSED__,
EINA_ERROR_PDBG("Disc is already blank!\n");
edje_object_part_text_set(page->erase, "progress_text",
"Disc is already blank!");
burn_drive_release(ECDB_PROJECT(proj)->drive->tangible[0].drive, 0);
burn_drive_info_free(ECDB_PROJECT(proj)->drive->tangible);
return;
}
if (!ecdb_aquire_drive(ECDB_PROJECT(proj)))
{
EINA_ERROR_PWARN("Couldn't grab the drive!\n");
edje_object_part_text_set(page->erase, "progress_text",
"Couldn't grab the drive!");
}
proj->quick = ecdb_check_checked_get(proj->speed);
// TODO: Error Messages here
if (!ecdb_erase_disc(proj, page))