gtk+ r21895 - in branches/gtk-2-14: . gtk



Author: matthiasc
Date: Sun Dec 14 00:45:18 2008
New Revision: 21895
URL: http://svn.gnome.org/viewvc/gtk+?rev=21895&view=rev

Log:
2008-12-13  Matthias Clasen  <mclasen redhat com>

        Bug 562579 â Remove error dialog when directory does not exist

        * gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb):
        Don't show an error dialog when changing to a non-existing folder,
        since this is ususally just an annoyance. 



Modified:
   branches/gtk-2-14/ChangeLog
   branches/gtk-2-14/gtk/gtkfilechooserdefault.c

Modified: branches/gtk-2-14/gtk/gtkfilechooserdefault.c
==============================================================================
--- branches/gtk-2-14/gtk/gtkfilechooserdefault.c	(original)
+++ branches/gtk-2-14/gtk/gtkfilechooserdefault.c	Sun Dec 14 00:45:18 2008
@@ -6886,8 +6886,13 @@
 	}
       else
         {
-	  /* error and bail out */
-	  error_changing_folder_dialog (impl, data->original_file, data->original_error);
+	  /* Error and bail out, ignoring "not found" errors since they're useless:
+           * they only happen when a program defaults to a folder that has been (re)moved.
+           */
+          if (!g_error_matches (data->original_error, G_IO_ERROR_NOT_FOUND))
+	    error_changing_folder_dialog (impl, data->original_file, data->original_error);
+          else
+            g_error_free (data->original_error);
 	  g_object_unref (data->original_file);
 
 	  goto out;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]