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  <[EMAIL PROTECTED]>

        * 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) {
_______________________________________________
SVN-commits-list mailing list (read only)
http://mail.gnome.org/mailman/listinfo/svn-commits-list

Want to limit the commits to a few modules? Go to above URL, log in to edit 
your options and select the modules ('topics') you want.
Module maintainer? It is possible to set the reply-to to your development 
mailing list. Email [EMAIL PROTECTED] if interested.

Reply via email to