Commit ba26b4a9 authored by Philippe Rouquier's avatar Philippe Rouquier Committed by Philippe Rouquier

Clean the code and add more debug to catch a bug.

2009-02-02  Philippe Rouquier  <ykw@localhost.localdomain>

	Clean the code and add more debug to catch a bug.

	* libbrasero-media/brasero-gio-operation.c
	(brasero_gio_operation_wait_for_operation_end),
	(brasero_gio_operation_umount_finish),
	(brasero_gio_operation_mount_finish),
	(brasero_gio_operation_eject_finish):
	* libbrasero-media/brasero-volume.c
	(brasero_volume_get_mount_point):

svn path=/trunk/; revision=1861
parent 9b01e987
2009-02-02 Philippe Rouquier <ykw@localhost.localdomain>
Clean the code and add more debug to catch a bug.
* libbrasero-media/brasero-gio-operation.c
(brasero_gio_operation_wait_for_operation_end),
(brasero_gio_operation_umount_finish),
(brasero_gio_operation_mount_finish),
(brasero_gio_operation_eject_finish):
* libbrasero-media/brasero-volume.c
(brasero_volume_get_mount_point):
2009-02-01 Philippe Rouquier <ykw@localhost.localdomain>
Updated with latest changes
......
......@@ -136,8 +136,19 @@ brasero_gio_operation_wait_for_operation_end (BraseroGioOperation *operation,
operation->timeout_id = 0;
}
if (operation->error) {
if (error)
if (operation->error) {
BRASERO_MEDIA_LOG ("Medium operation finished with an error %s"
operation->error->message);
if (operation->error->code == G_IO_ERROR_FAILED_HANDLED) {
BRASERO_MEDIA_LOG ("Error already handled and displayed by GIO");
/* means we shouldn't display any error message since
* that was already done */
g_error_free (operation->error);
operation->error = NULL;
}
else if (error)
g_propagate_error (error, operation->error);
else
g_error_free (operation->error);
......@@ -174,13 +185,7 @@ brasero_gio_operation_umount_finish (GObject *source,
BRASERO_MEDIA_LOG ("Umount operation completed (result = %d)", op->result);
if (op->error) {
if (op->error->code == G_IO_ERROR_FAILED_HANDLED) {
/* means we shouldn't display any error message since
* that was already done */
g_error_free (op->error);
op->error = NULL;
}
else if (op->error->code == G_IO_ERROR_NOT_MOUNTED) {
if (op->error->code == G_IO_ERROR_NOT_MOUNTED) {
/* That can happen sometimes */
g_error_free (op->error);
op->error = NULL;
......@@ -272,14 +277,7 @@ brasero_gio_operation_mount_finish (GObject *source,
&op->error);
if (op->error) {
if (op->error->code == G_IO_ERROR_FAILED_HANDLED) {
/* means we shouldn't display any error message since
* that was already done */
g_error_free (op->error);
op->error = NULL;
op->result = TRUE;
}
else if (op->error->code == G_IO_ERROR_ALREADY_MOUNTED) {
if (op->error->code == G_IO_ERROR_ALREADY_MOUNTED) {
g_error_free (op->error);
op->error = NULL;
op->result = TRUE;
......@@ -370,16 +368,8 @@ brasero_gio_operation_eject_finish (GObject *source,
result,
&operation->error);
if (operation->error) {
if (operation->error->code == G_IO_ERROR_FAILED_HANDLED) {
/* means we shouldn't display any error message since
* that was already done */
g_error_free (operation->error);
operation->error = NULL;
}
if (operation->error)
brasero_gio_operation_end (operation);
}
else if (!operation->result)
brasero_gio_operation_end (operation);
}
......
......@@ -194,7 +194,8 @@ brasero_volume_get_mount_point (BraseroVolume *volume,
}
else {
local_path = g_file_get_path (root);
g_object_unref (root);
g_object_unref (root);
BRASERO_MEDIA_LOG ("Mount point is %s", local_path);
}
return local_path;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment