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

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>
* src/nautilus-main.c:
......
......@@ -1722,15 +1722,17 @@ unmount_mount_callback (GObject *source_object,
error = NULL;
if (!g_mount_unmount_finish (G_MOUNT (source_object),
res, &error)) {
if (data->eject) {
primary = f (_("Unable to eject %V"), source_object);
} else {
primary = f (_("Unable to unmount %V"), source_object);
if (error->code != G_IO_ERROR_FAILED_HANDLED) {
if (data->eject) {
primary = f (_("Unable to eject %V"), source_object);
} else {
primary = f (_("Unable to unmount %V"), source_object);
}
eel_show_error_dialog (primary,
error->message,
data->parent_window);
g_free (primary);
}
eel_show_error_dialog (primary,
error->message,
data->parent_window);
g_free (primary);
g_error_free (error);
}
......
......@@ -1278,13 +1278,15 @@ volume_mount_cb (GObject *source_object,
error = NULL;
if (!g_volume_mount_finish (G_VOLUME (source_object), res, &error)) {
name = g_volume_get_name (G_VOLUME (source_object));
primary = g_strdup_printf (_("Unable to mount %s"), name);
g_free (name);
eel_show_error_dialog (primary,
error->message,
NULL);
g_free (primary);
if (error->code != G_IO_ERROR_FAILED_HANDLED) {
name = g_volume_get_name (G_VOLUME (source_object));
primary = g_strdup_printf (_("Unable to mount %s"), name);
g_free (name);
eel_show_error_dialog (primary,
error->message,
NULL);
g_free (primary);
}
g_error_free (error);
}
......@@ -1503,13 +1505,15 @@ drive_eject_cb (GObject *source_object,
char *name;
error = NULL;
if (!g_drive_eject_finish (G_DRIVE (source_object), res, &error)) {
name = g_drive_get_name (G_DRIVE (source_object));
primary = g_strdup_printf (_("Unable to eject %s"), name);
g_free (name);
eel_show_error_dialog (primary,
error->message,
if (error->code != G_IO_ERROR_FAILED_HANDLED) {
name = g_drive_get_name (G_DRIVE (source_object));
primary = g_strdup_printf (_("Unable to eject %s"), name);
g_free (name);
eel_show_error_dialog (primary,
error->message,
NULL);
g_free (primary);
g_free (primary);
}
g_error_free (error);
}
}
......@@ -1524,13 +1528,15 @@ volume_eject_cb (GObject *source_object,
char *name;
error = NULL;
if (!g_volume_eject_finish (G_VOLUME (source_object), res, &error)) {
name = g_volume_get_name (G_VOLUME (source_object));
primary = g_strdup_printf (_("Unable to eject %s"), name);
g_free (name);
eel_show_error_dialog (primary,
error->message,
NULL);
g_free (primary);
if (error->code != G_IO_ERROR_FAILED_HANDLED) {
name = g_volume_get_name (G_VOLUME (source_object));
primary = g_strdup_printf (_("Unable to eject %s"), name);
g_free (name);
eel_show_error_dialog (primary,
error->message,
NULL);
g_free (primary);
}
g_error_free (error);
}
}
......@@ -1545,13 +1551,15 @@ mount_eject_cb (GObject *source_object,
char *name;
error = NULL;
if (!g_mount_eject_finish (G_MOUNT (source_object), res, &error)) {
name = g_mount_get_name (G_MOUNT (source_object));
primary = g_strdup_printf (_("Unable to eject %s"), name);
g_free (name);
eel_show_error_dialog (primary,
error->message,
NULL);
g_free (primary);
if (error->code != G_IO_ERROR_FAILED_HANDLED) {
name = g_mount_get_name (G_MOUNT (source_object));
primary = g_strdup_printf (_("Unable to eject %s"), name);
g_free (name);
eel_show_error_dialog (primary,
error->message,
NULL);
g_free (primary);
}
g_error_free (error);
}
}
......@@ -1602,13 +1610,15 @@ drive_poll_for_media_cb (GObject *source_object,
error = NULL;
if (!g_drive_poll_for_media_finish (G_DRIVE (source_object), res, &error)) {
name = g_drive_get_name (G_DRIVE (source_object));
primary = g_strdup_printf (_("Unable to poll %s for media changes"), name);
g_free (name);
eel_show_error_dialog (primary,
error->message,
NULL);
g_free (primary);
if (error->code != G_IO_ERROR_FAILED_HANDLED) {
name = g_drive_get_name (G_DRIVE (source_object));
primary = g_strdup_printf (_("Unable to poll %s for media changes"), name);
g_free (name);
eel_show_error_dialog (primary,
error->message,
NULL);
g_free (primary);
}
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