Index: app/dialogs/file-save-dialog.c
===================================================================
--- app/dialogs/file-save-dialog.c	(revision 25584)
+++ app/dialogs/file-save-dialog.c	(working copy)
@@ -77,8 +77,9 @@ static gboolean  file_save_dialog_save_i
 GtkWidget *
 file_save_dialog_new (Gimp *gimp)
 {
-  GtkWidget   *dialog;
-  const gchar *uri;
+  GtkWidget           *dialog;
+  GimpFileDialogState *state;
+  const gchar         *uri;
 
   g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
 
@@ -88,6 +89,11 @@ file_save_dialog_new (Gimp *gimp)
                                  GTK_STOCK_SAVE,
                                  GIMP_HELP_FILE_SAVE);
 
+  state = g_object_get_data (G_OBJECT (gimp), "gimp-file-save-dialog-state");
+
+  if (state)
+    gimp_file_dialog_set_state (GIMP_FILE_DIALOG (dialog), state);
+
   uri = g_object_get_data (G_OBJECT (gimp), "gimp-file-save-last-uri");
 
   if (uri)
@@ -115,20 +121,20 @@ file_save_dialog_response (GtkWidget *sa
   gchar               *uri;
   gchar               *basename;
   GimpPlugInProcedure *save_proc;
-  gulong               handler_id;
+
+  g_object_set_data_full (G_OBJECT (gimp), "gimp-file-save-dialog-state",
+                          gimp_file_dialog_get_state (dialog),
+                          (GDestroyNotify) gimp_file_dialog_state_destroy);
 
   if (response_id != GTK_RESPONSE_OK)
     {
       if (! dialog->busy)
-        gtk_widget_hide (save_dialog);
+        gtk_widget_destroy (save_dialog);
 
       return;
     }
 
   gimp_file_dialog_set_sensitive (dialog, FALSE);
-  handler_id = g_signal_connect (dialog, "destroy",
-                                 G_CALLBACK (gtk_widget_destroyed),
-                                 &dialog);
 
   if (file_save_dialog_check_uri (save_dialog, gimp,
                                   &uri, &basename, &save_proc))
@@ -141,14 +147,14 @@ file_save_dialog_response (GtkWidget *sa
         {
           if (dialog)
             {
-              gtk_widget_hide (save_dialog);
+              GtkWindow *parent;
 
-              if (dialog->close_after_saving)
-                {
-                  GtkWindow *parent;
+              parent = gtk_window_get_transient_for (GTK_WINDOW (dialog));
 
-                  parent = gtk_window_get_transient_for (GTK_WINDOW (dialog));
+              gtk_widget_destroy (save_dialog);
 
+              if (dialog->close_after_saving)
+                {
                   if (GIMP_IS_DISPLAY_SHELL (parent))
                     {
                       GimpDisplay *display;
@@ -165,13 +171,6 @@ file_save_dialog_response (GtkWidget *sa
       g_free (uri);
       g_free (basename);
     }
-
-  /* dialog may have been destroyed while save plugin was running */
-  if (dialog)
-    {
-      gimp_file_dialog_set_sensitive (dialog, TRUE);
-      g_signal_handler_disconnect (dialog, handler_id);
-    }
 }
 
 static gboolean
Index: app/dialogs/file-open-dialog.c
===================================================================
--- app/dialogs/file-open-dialog.c	(revision 25584)
+++ app/dialogs/file-open-dialog.c	(working copy)
@@ -66,7 +66,8 @@ static gboolean   file_open_dialog_open_
 GtkWidget *
 file_open_dialog_new (Gimp *gimp)
 {
-  GtkWidget *dialog;
+  GtkWidget           *dialog;
+  GimpFileDialogState *state;
 
   g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
 
@@ -78,6 +79,11 @@ file_open_dialog_new (Gimp *gimp)
 
   gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (dialog), TRUE);
 
+  state = g_object_get_data (G_OBJECT (gimp), "gimp-file-open-dialog-state");
+
+  if (state)
+    gimp_file_dialog_set_state (GIMP_FILE_DIALOG (dialog), state);
+
   g_signal_connect (dialog, "response",
                     G_CALLBACK (file_open_dialog_response),
                     gimp);
@@ -98,10 +104,14 @@ file_open_dialog_response (GtkWidget *op
   GSList         *list;
   gboolean        success = FALSE;
 
+  g_object_set_data_full (G_OBJECT (gimp), "gimp-file-open-dialog-state",
+                          gimp_file_dialog_get_state (dialog),
+                          (GDestroyNotify) gimp_file_dialog_state_destroy);
+
   if (response_id != GTK_RESPONSE_OK)
     {
       if (! dialog->busy)
-        gtk_widget_hide (open_dialog);
+        gtk_widget_destroy (open_dialog);
 
       return;
     }
@@ -155,13 +165,11 @@ file_open_dialog_response (GtkWidget *op
 
   if (success)
     {
-      gtk_widget_hide (open_dialog);
-
       if (dialog->image)
         gimp_image_flush (dialog->image);
-    }
 
-  gimp_file_dialog_set_sensitive (dialog, TRUE);
+      gtk_widget_destroy (open_dialog);
+    }
 
   g_slist_foreach (uris, (GFunc) g_free, NULL);
   g_slist_free (uris);
Index: app/widgets/gimpfiledialog.c
===================================================================
--- app/widgets/gimpfiledialog.c	(revision 25585)
+++ app/widgets/gimpfiledialog.c	(working copy)
@@ -55,6 +55,12 @@
 #include "gimp-intl.h"
 
 
+struct _GimpFileDialogState
+{
+  gchar *filter_name;
+};
+
+
 static void     gimp_file_dialog_progress_iface_init (GimpProgressInterface *iface);
 static gboolean gimp_file_dialog_delete_event        (GtkWidget        *widget,
                                                       GdkEventAny      *event);
@@ -489,6 +495,63 @@ gimp_file_dialog_set_image (GimpFileDial
   g_free (basename);
 }
 
+GimpFileDialogState *
+gimp_file_dialog_get_state (GimpFileDialog *dialog)
+{
+  GimpFileDialogState *state;
+  GtkFileFilter       *filter;
+
+  g_return_val_if_fail (GIMP_IS_FILE_DIALOG (dialog), NULL);
+
+  state = g_slice_new0 (GimpFileDialogState);
+
+  filter = gtk_file_chooser_get_filter (GTK_FILE_CHOOSER (dialog));
+
+  if (filter)
+    state->filter_name = g_strdup (gtk_file_filter_get_name (filter));
+
+  return state;
+}
+
+void
+gimp_file_dialog_set_state (GimpFileDialog      *dialog,
+                            GimpFileDialogState *state)
+{
+  g_return_if_fail (GIMP_IS_FILE_DIALOG (dialog));
+  g_return_if_fail (state != NULL);
+
+  if (state->filter_name)
+    {
+      GSList *filters;
+      GSList *list;
+
+      filters = gtk_file_chooser_list_filters (GTK_FILE_CHOOSER (dialog));
+
+      for (list = filters; list; list = list->next)
+        {
+          GtkFileFilter *filter = GTK_FILE_FILTER (list->data);
+          const gchar   *name   = gtk_file_filter_get_name (filter);
+
+          if (name && strcmp (state->filter_name, name) == 0)
+            {
+              gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dialog), filter);
+              break;
+            }
+        }
+
+      g_slist_free (filters);
+    }
+}
+
+void
+gimp_file_dialog_state_destroy (GimpFileDialogState *state)
+{
+  g_return_if_fail (state != NULL);
+
+  g_free (state->filter_name);
+  g_slice_free (GimpFileDialogState, state);
+}
+
 
 /*  private functions  */
 
Index: app/widgets/gimpfiledialog.h
===================================================================
--- app/widgets/gimpfiledialog.h	(revision 25584)
+++ app/widgets/gimpfiledialog.h	(working copy)
@@ -60,6 +60,9 @@ struct _GimpFileDialogClass
 };
 
 
+typedef struct _GimpFileDialogState GimpFileDialogState;
+
+
 GType       gimp_file_dialog_get_type      (void) G_GNUC_CONST;
 
 GtkWidget * gimp_file_dialog_new           (Gimp                 *gimp,
@@ -80,6 +83,12 @@ void        gimp_file_dialog_set_image  
                                             gboolean              save_a_copy,
                                             gboolean              close_after_saving);
 
+GimpFileDialogState * gimp_file_dialog_get_state     (GimpFileDialog      *dialog);
+void                  gimp_file_dialog_set_state     (GimpFileDialog      *dialog,
+                                                      GimpFileDialogState *state);
+void                  gimp_file_dialog_state_destroy (GimpFileDialogState *state);
+
+
 G_END_DECLS
 
 #endif /* __GIMP_FILE_DIALOG_H__ */
