Erasing now utilizes info already aquired from ecdb_hal.
This commit is contained in:
parent
62867a7d49
commit
65accd34fa
@ -11,7 +11,6 @@ TODO
|
|||||||
-> finish interface
|
-> finish interface
|
||||||
-> more flexible typebuf
|
-> more flexible typebuf
|
||||||
-> more configuration options (speed and drive choice done)
|
-> more configuration options (speed and drive choice done)
|
||||||
-> fix combo theme
|
|
||||||
-> figure out what to do about dnd, should it be consolidated into one system, how to handle internel, etc.
|
-> figure out what to do about dnd, should it be consolidated into one system, how to handle internel, etc.
|
||||||
-> don't load the sources all at one time (lots of memory consumed -- for my entire development tree containing 154256 files, ecdb uses 46mb)
|
-> don't load the sources all at one time (lots of memory consumed -- for my entire development tree containing 154256 files, ecdb uses 46mb)
|
||||||
-> integrate exchange
|
-> integrate exchange
|
||||||
@ -24,3 +23,4 @@ DONE
|
|||||||
-> get rid of evas_object_name_find/name_set
|
-> get rid of evas_object_name_find/name_set
|
||||||
-> Detect if the media in a drive has changed and update the drive info using dbus.
|
-> Detect if the media in a drive has changed and update the drive info using dbus.
|
||||||
-> make theme and code use a custom signal, rather than mouse,clicked,1
|
-> make theme and code use a custom signal, rather than mouse,clicked,1
|
||||||
|
-> fix combo theme (good enough, and hopefully someone will make a nicer default theme anyways)
|
||||||
|
@ -31,23 +31,9 @@ ecdb_erase_disc(Ecdb_Erase_Project *proj, Ecdb_Page *page)
|
|||||||
|
|
||||||
disc_state = burn_disc_get_status(ECDB_PROJECT(proj)->drive->
|
disc_state = burn_disc_get_status(ECDB_PROJECT(proj)->drive->
|
||||||
tangible[0].drive);
|
tangible[0].drive);
|
||||||
if (disc_state == BURN_DISC_BLANK)
|
if (((disc_state == BURN_DISC_FULL)
|
||||||
{
|
|| (disc_state == BURN_DISC_APPENDABLE))
|
||||||
EINA_ERROR_PINFO("Disc is already blank!\n");
|
&& (burn_disc_erasable(ECDB_PROJECT(proj)->drive->tangible[0].drive)))
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
else if (disc_state == BURN_DISC_EMPTY)
|
|
||||||
{
|
|
||||||
EINA_ERROR_PINFO("No disc!\n");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
else if (!burn_disc_erasable(ECDB_PROJECT(proj)->drive->
|
|
||||||
tangible[0].drive))
|
|
||||||
{
|
|
||||||
EINA_ERROR_PINFO("Not able to erase!\n");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
else if (disc_state == BURN_DISC_FULL || BURN_DISC_APPENDABLE)
|
|
||||||
{
|
{
|
||||||
EINA_ERROR_PINFO("Beginning to erase disc!\n");
|
EINA_ERROR_PINFO("Beginning to erase disc!\n");
|
||||||
ECDB_PROJECT(proj)->pipe = ecore_pipe_add(ecdb_erase_progress_handler,
|
ECDB_PROJECT(proj)->pipe = ecore_pipe_add(ecdb_erase_progress_handler,
|
||||||
@ -62,7 +48,7 @@ ecdb_erase_disc(Ecdb_Erase_Project *proj, Ecdb_Page *page)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
EINA_ERROR_PINFO("Not of erasable type\n");
|
EINA_ERROR_PINFO("Disc not suitable for erasing\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ _button_cb_begin(void *data, Evas_Object *o __UNUSED__,
|
|||||||
{
|
{
|
||||||
EINA_ERROR_PDBG("Choose a drive!\n");
|
EINA_ERROR_PDBG("Choose a drive!\n");
|
||||||
edje_object_part_text_set(page->erase, "progress_text",
|
edje_object_part_text_set(page->erase, "progress_text",
|
||||||
"Choose a Drive!");
|
"Choose a Drive!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,6 +79,26 @@ _button_cb_begin(void *data, Evas_Object *o __UNUSED__,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!ECDB_PROJECT(proj)->drive->fresh_info)
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ECDB_PROJECT(proj)->drive->status & ECDB_DISC_BLANK)
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
proj->quick = ecdb_check_checked_get(proj->speed);
|
proj->quick = ecdb_check_checked_get(proj->speed);
|
||||||
// TODO: Error Messages here
|
// TODO: Error Messages here
|
||||||
if (!ecdb_erase_disc(proj, page))
|
if (!ecdb_erase_disc(proj, page))
|
||||||
|
@ -310,6 +310,7 @@ _ecdb_hal_volume_handle(void *data, void *reply_data, DBusError *error)
|
|||||||
{
|
{
|
||||||
if (!strcmp(udi, drive->udi))
|
if (!strcmp(udi, drive->udi))
|
||||||
{
|
{
|
||||||
|
drive->fresh_info = TRUE;
|
||||||
drive->disc_udi = disc_udi;
|
drive->disc_udi = disc_udi;
|
||||||
drive->capacity = e_hal_property_uint64_get(ret,
|
drive->capacity = e_hal_property_uint64_get(ret,
|
||||||
"volume.disc.capacity", NULL);
|
"volume.disc.capacity", NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user