Commit 302c93e1 authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Fix checking when to display errors (#514135)

2008-02-15  Alexander Larsson  <alexl@redhat.com>

        * libnautilus-private/nautilus-mime-actions.c:
        * libnautilus-private/nautilus-vfs-file.c:
	Fix checking when to display errors (#514135)



svn path=/trunk/; revision=13756
parent 205f43cb
2008-02-15 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-mime-actions.c:
* libnautilus-private/nautilus-vfs-file.c:
Fix checking when to display errors (#514135)
2008-02-14 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c:
......
......@@ -1240,14 +1240,14 @@ activation_mount_not_mounted_callback (GObject *source_object,
error = NULL;
if (!g_file_mount_enclosing_volume_finish (G_FILE (source_object), res, &error)) {
if (error->domain != G_IO_ERROR &&
error->code != G_IO_ERROR_CANCELLED &&
error->code != G_IO_ERROR_ALREADY_MOUNTED) {
if (error->domain != G_IO_ERROR ||
(error->code != G_IO_ERROR_CANCELLED &&
error->code != G_IO_ERROR_ALREADY_MOUNTED)) {
eel_show_error_dialog (_("Unable to mount location"),
error->message, NULL);
}
if (error->domain != G_IO_ERROR &&
if (error->domain != G_IO_ERROR ||
error->code != G_IO_ERROR_ALREADY_MOUNTED) {
parameters->files = g_list_remove (parameters->files, file);
nautilus_file_unref (file);
......@@ -1467,15 +1467,15 @@ activation_mountable_mounted (NautilusFile *file,
} else {
/* Remove failed file */
if (error->domain != G_IO_ERROR &&
if (error->domain != G_IO_ERROR ||
error->code != G_IO_ERROR_ALREADY_MOUNTED) {
parameters->files = g_list_remove (parameters->files, file);
nautilus_file_unref (file);
}
if (error->domain != G_IO_ERROR &&
error->code != G_IO_ERROR_CANCELLED &&
error->code != G_IO_ERROR_ALREADY_MOUNTED) {
if (error->domain != G_IO_ERROR ||
(error->code != G_IO_ERROR_CANCELLED &&
error->code != G_IO_ERROR_ALREADY_MOUNTED)) {
eel_show_error_dialog (_("Unable to mount location"),
error->message, NULL);
}
......
......@@ -301,10 +301,12 @@ vfs_file_unmount_callback (GObject *source_object,
unmounted = g_file_unmount_mountable_finish (G_FILE (source_object),
res, &error);
if ((! unmounted) && ((error->domain == G_IO_ERROR_FAILED_HANDLED) ||
(error->domain == G_IO_ERROR_CANCELLED))) {
g_error_free (error);
error = NULL;
if (!unmounted &&
error->domain == G_IO_ERROR &&
(error->code == G_IO_ERROR_FAILED_HANDLED ||
error->code == G_IO_ERROR_CANCELLED)) {
g_error_free (error);
error = NULL;
}
nautilus_file_operation_complete (op, G_FILE (source_object), error);
......@@ -345,11 +347,13 @@ vfs_file_eject_callback (GObject *source_object,
ejected = g_file_eject_mountable_finish (G_FILE (source_object),
res, &error);
if ((! ejected) && ((error->domain == G_IO_ERROR_FAILED_HANDLED) ||
(error->domain == G_IO_ERROR_CANCELLED))) {
g_error_free (error);
error = NULL;
}
if (!ejected &&
error->domain == G_IO_ERROR &&
(error->code == G_IO_ERROR_FAILED_HANDLED ||
error->code == G_IO_ERROR_CANCELLED)) {
g_error_free (error);
error = NULL;
}
nautilus_file_operation_complete (op, G_FILE (source_object), error);
if (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