]> Pileus Git - ~andy/gtk/commitdiff
Don't show an error dialog when changing to a non-existing folder, since
authorMatthias Clasen <matthiasc@src.gnome.org>
Sun, 14 Dec 2008 00:43:09 +0000 (00:43 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sun, 14 Dec 2008 00:43:09 +0000 (00:43 +0000)
        * 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.

svn path=/trunk/; revision=21894

ChangeLog
gtk/gtkfilechooserdefault.c

index 81631deaaa61b5744ed57c9a15a32afea93bb9e5..d0d26218ac408117e1bd26db71265ed75a169588 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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. 
+
 2008-12-13  Matthias Clasen  <mclasen@redhat.com>
 
        Bug 556233 – local-only causes G_IS_FILE warning
index 9dbb56b8be8561907f3b38f98873795db47d18cb..1564730ae012af22b4a22e1efc329e8ced22c338 100644 (file)
@@ -6926,8 +6926,13 @@ update_current_folder_get_info_cb (GCancellable *cancellable,
        }
       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;