Update unmount and TODO.

This commit is contained in:
Jaime Thomas
2009-04-30 00:04:43 +00:00
parent d54838db08
commit d036801e85
3 changed files with 133 additions and 48 deletions

View File

@@ -61,7 +61,6 @@ _button_cb_begin(void *data, Evas_Object *o __UNUSED__,
page = data;
proj = evas_object_data_get(page->erase, "proj");
edje_object_part_text_set(page->erase, "progress_text", "Commencing...");
idx = ecdb_combo_selected_get(ECDB_PROJECT(proj)->drive_combo);
if (idx < 0)
@@ -99,9 +98,16 @@ _button_cb_begin(void *data, Evas_Object *o __UNUSED__,
/* Apparently DBus doesn't tell you when a disc has been mounted
* or unmounted, so do this every time regardless...
*/
ecdb_hal_request_unmount(ECDB_PROJECT(proj)->drive,
if (!(ECDB_PROJECT(proj)->drive->status & ECDB_DISC_BLANK))
{
ecdb_hal_request_unmount(ECDB_PROJECT(proj)->drive,
_ecdb_erase_unmount_cb,
page);
}
else
{
_ecdb_erase_do_erase(page, proj);
}
}
void
@@ -230,6 +236,8 @@ _ecdb_erase_do_erase(Ecdb_Page *page, Ecdb_Erase_Project *proj)
return;
}
edje_object_part_text_set(page->erase, "progress_text", "Commencing...");
if (!ecdb_aquire_drive(ECDB_PROJECT(proj)))
{
EINA_ERROR_PWARN("Couldn't grab the drive!\n");
@@ -287,7 +295,7 @@ _ecdb_erase_unmount_cb(void *data, void *reply_data __UNUSED__, DBusError *err)
else
{
edje_object_part_text_set(page->erase, "progress_text",
"Cannot unmount drive!");
"Can not unmount drive!");
EINA_ERROR_PWARN("Unmount error:\n%s\n%s\n", err->name, err->message);
}
dbus_error_free(err);