[brasero] brasero-gio-media: Eject empty drive with no error message
- From: Joshua Lock <joshuagl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [brasero] brasero-gio-media: Eject empty drive with no error message
- Date: Tue, 30 Jul 2013 17:41:41 +0000 (UTC)
commit f3d0b989b41ec0cee4d551f1ca02687db98a333d
Author: Jean-Benoit MARTIN <jean-benoit martin eurogiciel fr>
Date: Fri Jul 19 11:53:21 2013 +0100
brasero-gio-media: Eject empty drive with no error message
When an empty drive is ejected the user is presented an error dialog when
the I/O opeartion times out - this is due to the fact that the
GDrive::changed signal is not emitted when an empty drive is ejected and
therefore brasero_gio_operation_end() isn't called.
Work around this by checking if the drive is empty in
brasero_gio_operation_eject_finish () and ending the I/O opeartion if it is.
https://bugzilla.gnome.org/show_bug.cgi?id=701730
libbrasero-media/brasero-gio-operation.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/libbrasero-media/brasero-gio-operation.c b/libbrasero-media/brasero-gio-operation.c
index bf2d937..25a96d6 100644
--- a/libbrasero-media/brasero-gio-operation.c
+++ b/libbrasero-media/brasero-gio-operation.c
@@ -380,6 +380,13 @@ brasero_gio_operation_eject_finish (GObject *source,
if (operation->error)
brasero_gio_operation_end (operation);
else if (!operation->result)
+ /*
+ * If the drive is empty when ejected the GDrive::changed signal will
+ * never be emitted - ensure the operation is ended in this case
+ * see https://bugzilla.gnome.org/show_bug.cgi?id=701730
+ */
+ brasero_gio_operation_end (operation);
+ else if (G_IS_DRIVE (source) && !g_drive_has_media (G_DRIVE (source)))
brasero_gio_operation_end (operation);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]