Commit e626e43d authored by David Zeuthen's avatar David Zeuthen Committed by Alexander Larsson
Browse files

Don't put up error dialogs if the error code is G_IO_ERROR_FAILED_HANDLED.

2007-12-19  David Zeuthen  <davidz@redhat.com>

	Don't put up error dialogs if the error code is
	G_IO_ERROR_FAILED_HANDLED.

	* libnautilus-private/nautilus-file-operations.c:
	(unmount_mount_callback):
	* src/nautilus-places-sidebar.c: (volume_mount_cb),
	(drive_eject_cb), (volume_eject_cb), (mount_eject_cb),
	(drive_poll_for_media_cb):


svn path=/trunk/; revision=13535
parent 24579db8
2007-12-19 David Zeuthen <davidz@redhat.com>
Don't put up error dialogs if the error code is
G_IO_ERROR_FAILED_HANDLED.
* libnautilus-private/nautilus-file-operations.c:
(unmount_mount_callback):
* src/nautilus-places-sidebar.c: (volume_mount_cb),
(drive_eject_cb), (volume_eject_cb), (mount_eject_cb),
(drive_poll_for_media_cb):
2007-12-17 Alexander Larsson <alexl@redhat.com> 2007-12-17 Alexander Larsson <alexl@redhat.com>
* src/nautilus-main.c: * src/nautilus-main.c:
......
...@@ -1722,6 +1722,7 @@ unmount_mount_callback (GObject *source_object, ...@@ -1722,6 +1722,7 @@ unmount_mount_callback (GObject *source_object,
error = NULL; error = NULL;
if (!g_mount_unmount_finish (G_MOUNT (source_object), if (!g_mount_unmount_finish (G_MOUNT (source_object),
res, &error)) { res, &error)) {
if (error->code != G_IO_ERROR_FAILED_HANDLED) {
if (data->eject) { if (data->eject) {
primary = f (_("Unable to eject %V"), source_object); primary = f (_("Unable to eject %V"), source_object);
} else { } else {
...@@ -1731,6 +1732,7 @@ unmount_mount_callback (GObject *source_object, ...@@ -1731,6 +1732,7 @@ unmount_mount_callback (GObject *source_object,
error->message, error->message,
data->parent_window); data->parent_window);
g_free (primary); g_free (primary);
}
g_error_free (error); g_error_free (error);
} }
......
...@@ -1278,6 +1278,7 @@ volume_mount_cb (GObject *source_object, ...@@ -1278,6 +1278,7 @@ volume_mount_cb (GObject *source_object,
error = NULL; error = NULL;
if (!g_volume_mount_finish (G_VOLUME (source_object), res, &error)) { if (!g_volume_mount_finish (G_VOLUME (source_object), res, &error)) {
if (error->code != G_IO_ERROR_FAILED_HANDLED) {
name = g_volume_get_name (G_VOLUME (source_object)); name = g_volume_get_name (G_VOLUME (source_object));
primary = g_strdup_printf (_("Unable to mount %s"), name); primary = g_strdup_printf (_("Unable to mount %s"), name);
g_free (name); g_free (name);
...@@ -1285,6 +1286,7 @@ volume_mount_cb (GObject *source_object, ...@@ -1285,6 +1286,7 @@ volume_mount_cb (GObject *source_object,
error->message, error->message,
NULL); NULL);
g_free (primary); g_free (primary);
}
g_error_free (error); g_error_free (error);
} }
...@@ -1503,6 +1505,7 @@ drive_eject_cb (GObject *source_object, ...@@ -1503,6 +1505,7 @@ drive_eject_cb (GObject *source_object,
char *name; char *name;
error = NULL; error = NULL;
if (!g_drive_eject_finish (G_DRIVE (source_object), res, &error)) { if (!g_drive_eject_finish (G_DRIVE (source_object), res, &error)) {
if (error->code != G_IO_ERROR_FAILED_HANDLED) {
name = g_drive_get_name (G_DRIVE (source_object)); name = g_drive_get_name (G_DRIVE (source_object));
primary = g_strdup_printf (_("Unable to eject %s"), name); primary = g_strdup_printf (_("Unable to eject %s"), name);
g_free (name); g_free (name);
...@@ -1510,6 +1513,7 @@ drive_eject_cb (GObject *source_object, ...@@ -1510,6 +1513,7 @@ drive_eject_cb (GObject *source_object,
error->message, error->message,
NULL); NULL);
g_free (primary); g_free (primary);
}
g_error_free (error); g_error_free (error);
} }
} }
...@@ -1524,6 +1528,7 @@ volume_eject_cb (GObject *source_object, ...@@ -1524,6 +1528,7 @@ volume_eject_cb (GObject *source_object,
char *name; char *name;
error = NULL; error = NULL;
if (!g_volume_eject_finish (G_VOLUME (source_object), res, &error)) { if (!g_volume_eject_finish (G_VOLUME (source_object), res, &error)) {
if (error->code != G_IO_ERROR_FAILED_HANDLED) {
name = g_volume_get_name (G_VOLUME (source_object)); name = g_volume_get_name (G_VOLUME (source_object));
primary = g_strdup_printf (_("Unable to eject %s"), name); primary = g_strdup_printf (_("Unable to eject %s"), name);
g_free (name); g_free (name);
...@@ -1531,6 +1536,7 @@ volume_eject_cb (GObject *source_object, ...@@ -1531,6 +1536,7 @@ volume_eject_cb (GObject *source_object,
error->message, error->message,
NULL); NULL);
g_free (primary); g_free (primary);
}
g_error_free (error); g_error_free (error);
} }
} }
...@@ -1545,6 +1551,7 @@ mount_eject_cb (GObject *source_object, ...@@ -1545,6 +1551,7 @@ mount_eject_cb (GObject *source_object,
char *name; char *name;
error = NULL; error = NULL;
if (!g_mount_eject_finish (G_MOUNT (source_object), res, &error)) { if (!g_mount_eject_finish (G_MOUNT (source_object), res, &error)) {
if (error->code != G_IO_ERROR_FAILED_HANDLED) {
name = g_mount_get_name (G_MOUNT (source_object)); name = g_mount_get_name (G_MOUNT (source_object));
primary = g_strdup_printf (_("Unable to eject %s"), name); primary = g_strdup_printf (_("Unable to eject %s"), name);
g_free (name); g_free (name);
...@@ -1552,6 +1559,7 @@ mount_eject_cb (GObject *source_object, ...@@ -1552,6 +1559,7 @@ mount_eject_cb (GObject *source_object,
error->message, error->message,
NULL); NULL);
g_free (primary); g_free (primary);
}
g_error_free (error); g_error_free (error);
} }
} }
...@@ -1602,6 +1610,7 @@ drive_poll_for_media_cb (GObject *source_object, ...@@ -1602,6 +1610,7 @@ drive_poll_for_media_cb (GObject *source_object,
error = NULL; error = NULL;
if (!g_drive_poll_for_media_finish (G_DRIVE (source_object), res, &error)) { if (!g_drive_poll_for_media_finish (G_DRIVE (source_object), res, &error)) {
if (error->code != G_IO_ERROR_FAILED_HANDLED) {
name = g_drive_get_name (G_DRIVE (source_object)); name = g_drive_get_name (G_DRIVE (source_object));
primary = g_strdup_printf (_("Unable to poll %s for media changes"), name); primary = g_strdup_printf (_("Unable to poll %s for media changes"), name);
g_free (name); g_free (name);
...@@ -1609,6 +1618,7 @@ drive_poll_for_media_cb (GObject *source_object, ...@@ -1609,6 +1618,7 @@ drive_poll_for_media_cb (GObject *source_object,
error->message, error->message,
NULL); NULL);
g_free (primary); g_free (primary);
}
g_error_free (error); g_error_free (error);
} }
} }
......
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