[Xfce4-commits] <thunar:master> Ignore cancel errors when processing the input filenames.

Jannis Pohlmann jannis at xfce.org
Thu Sep 10 21:52:01 CEST 2009


Updating branch refs/heads/master
         to 1559dd2d14da591f89be1b9af3d874e593082cbc (commit)
       from 8a611728410bea8aac2b814063e46131dea06d1f (commit)

commit 1559dd2d14da591f89be1b9af3d874e593082cbc
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Thu Sep 10 21:48:54 2009 +0200

    Ignore cancel errors when processing the input filenames.
    
    Cancelling e.g. the credentials dialog is something users do on purpose.
    Thus we don't need to show them a cancel error dialog. There is a bug in
    GVfs however which results in a permission denied error instead of a
    cancel error when the user presses the cancel button in the credentials
    dialog. It was filed against GVfs (#594798 in GNOME's bugzilla).

 thunar/thunar-application.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/thunar/thunar-application.c b/thunar/thunar-application.c
index fefb650..98f01ae 100644
--- a/thunar/thunar-application.c
+++ b/thunar/thunar-application.c
@@ -1050,9 +1050,13 @@ thunar_application_process_files_finish (ThunarBrowser *browser,
   /* check if resolving/mounting failed */
   if (error != NULL)
     {
-      /* tell the user that we were unable to launch the file specified */
-      thunar_dialogs_show_error (screen, error, _("Failed to open \"%s\""), 
-                                 thunar_file_get_display_name (file));
+      /* don't display cancel errors */
+      if (error->domain != G_IO_ERROR || error->code != G_IO_ERROR_CANCELLED)
+        {
+          /* tell the user that we were unable to launch the file specified */
+          thunar_dialogs_show_error (screen, error, _("Failed to open \"%s\""), 
+                                     thunar_file_get_display_name (file));
+        }
 
       /* stop processing files */
       thunar_file_list_free (application->files_to_launch);



More information about the Xfce4-commits mailing list