nautilus r13756 - in trunk: . libnautilus-private
- From: alexl svn gnome org
- To: svn-commits-list gnome org
- Subject: nautilus r13756 - in trunk: . libnautilus-private
- Date: Fri, 15 Feb 2008 09:02:04 +0000 (GMT)
Author: alexl
Date: Fri Feb 15 09:02:04 2008
New Revision: 13756
URL: http://svn.gnome.org/viewvc/nautilus?rev=13756&view=rev
Log:
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)
Modified:
trunk/ChangeLog
trunk/libnautilus-private/nautilus-mime-actions.c
trunk/libnautilus-private/nautilus-vfs-file.c
Modified: trunk/libnautilus-private/nautilus-mime-actions.c
==============================================================================
--- trunk/libnautilus-private/nautilus-mime-actions.c (original)
+++ trunk/libnautilus-private/nautilus-mime-actions.c Fri Feb 15 09:02:04 2008
@@ -1240,14 +1240,14 @@
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 @@
} 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);
}
Modified: trunk/libnautilus-private/nautilus-vfs-file.c
==============================================================================
--- trunk/libnautilus-private/nautilus-vfs-file.c (original)
+++ trunk/libnautilus-private/nautilus-vfs-file.c Fri Feb 15 09:02:04 2008
@@ -301,10 +301,12 @@
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 @@
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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]