Index: app/widgets/gimpfiledialog.c
===================================================================
RCS file: /cvs/gnome/gimp/app/widgets/gimpfiledialog.c,v
retrieving revision 1.7
diff -u -p -r1.7 gimpfiledialog.c
--- app/widgets/gimpfiledialog.c	4 Mar 2004 13:48:35 -0000	1.7
+++ app/widgets/gimpfiledialog.c	19 May 2004 11:10:42 -0000
@@ -54,6 +54,7 @@ static void       gimp_file_dialog_destr
 static gboolean   gimp_file_dialog_delete_event (GtkWidget           *widget,
                                                  GdkEventAny         *event);
 
+static void  gimp_file_dialog_reset_file_type   (GimpFileDialog      *dialog);
 static void  gimp_file_dialog_selection_changed (GtkTreeSelection    *sel,
                                                  GimpFileDialog      *dialog);
 
@@ -149,7 +150,6 @@ gimp_file_dialog_new (Gimp            *g
 {
   GimpFileDialog *dialog;
   GtkWidget      *hbox;
-  GtkWidget      *option_menu;
   GtkWidget      *label;
 
   g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
@@ -182,14 +182,14 @@ gimp_file_dialog_new (Gimp            *g
                     FALSE, FALSE, 0);
   gtk_widget_show (hbox);
 
-  option_menu = gtk_option_menu_new ();
-  gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu),
+  dialog->option_menu = gtk_option_menu_new ();
+  gtk_option_menu_set_menu (GTK_OPTION_MENU (dialog->option_menu),
                             GTK_ITEM_FACTORY (dialog->item_factory)->widget);
-  gtk_box_pack_end (GTK_BOX (hbox), option_menu, FALSE, FALSE, 0);
-  gtk_widget_show (option_menu);
+  gtk_box_pack_end (GTK_BOX (hbox), dialog->option_menu, FALSE, FALSE, 0);
+  gtk_widget_show (dialog->option_menu);
 
   label = gtk_label_new_with_mnemonic (_("Determine File _Type:"));
-  gtk_label_set_mnemonic_widget (GTK_LABEL (label), option_menu);
+  gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->option_menu);
   gtk_box_pack_end (GTK_BOX (hbox), label, FALSE, FALSE, 0);
   gtk_widget_show (label);
 
@@ -290,6 +290,8 @@ gimp_file_dialog_set_uri (GimpFileDialog
 				   filename : "." G_DIR_SEPARATOR_S);
 
   g_free (filename);
+
+  gimp_file_dialog_reset_file_type (dialog);
 }
 
 void
@@ -318,10 +320,26 @@ gimp_file_dialog_set_image (GimpFileDial
 
   gimp_item_factory_update (dialog->item_factory,
                             gimp_image_active_drawable (gimage));
+
+  gimp_file_dialog_reset_file_type (dialog);
 }
 
 
 /*  private functions  */
+
+static void
+gimp_file_dialog_reset_file_type (GimpFileDialog *dialog)
+{
+  GtkWidget *menu;
+  GtkWidget *item;
+
+  gtk_option_menu_set_history (GTK_OPTION_MENU (dialog->option_menu), 0);
+
+  menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (dialog->option_menu));
+  item = gtk_menu_get_active (GTK_MENU (menu));
+
+  gtk_menu_item_activate (GTK_MENU_ITEM (item));
+}
 
 static void
 selchanged_foreach (GtkTreeModel *model,
Index: app/widgets/gimpfiledialog.h
===================================================================
RCS file: /cvs/gnome/gimp/app/widgets/gimpfiledialog.h,v
retrieving revision 1.4
diff -u -p -r1.4 gimpfiledialog.h
--- app/widgets/gimpfiledialog.h	1 Mar 2004 13:40:45 -0000	1.4
+++ app/widgets/gimpfiledialog.h	19 May 2004 11:10:42 -0000
@@ -48,6 +48,7 @@ struct _GimpFileDialog
   gboolean          set_image_clean;
 
   GtkWidget        *thumb_box;
+  GtkWidget        *option_menu;
 };
 
 struct _GimpFileDialogClass
