Index: testfilechooserbutton.c
===================================================================
RCS file: /cvs/gnome/gtk+/tests/testfilechooserbutton.c,v
retrieving revision 1.3
diff -u -p -r1.3 testfilechooserbutton.c
--- testfilechooserbutton.c	19 Sep 2004 05:40:00 -0000	1.3
+++ testfilechooserbutton.c	3 Oct 2004 18:20:09 -0000
@@ -102,13 +102,41 @@ chooser_update_preview_cb (GtkFileChoose
   g_free (filename);
 }
 
+static GtkWidget *
+new_row (GtkSizeGroup *label_group)
+{
+  GtkWidget *hbox, *label, *chooser, *button;
+
+  hbox = gtk_hbox_new (FALSE, 12);
+
+  label = gtk_label_new_with_mnemonic ("_Open:");
+  gtk_size_group_add_widget (GTK_SIZE_GROUP (label_group), label);
+  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+
+  chooser = gtk_file_chooser_button_new_with_backend ("Select A File - testfilechooserbutton",
+						      "gtk+");
+  gtk_label_set_mnemonic_widget (GTK_LABEL (label), chooser);
+  g_signal_connect (chooser, "current-folder-changed",
+		    G_CALLBACK (chooser_current_folder_changed_cb), NULL);
+  g_signal_connect (chooser, "selection-changed", G_CALLBACK (chooser_selection_changed_cb), NULL);
+  g_signal_connect (chooser, "file-activated", G_CALLBACK (chooser_file_activated_cb), NULL);
+  g_signal_connect (chooser, "update-preview", G_CALLBACK (chooser_update_preview_cb), NULL);
+  gtk_container_add (GTK_CONTAINER (hbox), chooser);
+
+  button = gtk_button_new_with_label ("Properties...");
+  g_signal_connect (button, "clicked", G_CALLBACK (properties_button_clicked_cb), chooser);
+  gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+
+  return hbox;
+}
 
 int
 main (int argc, char *argv[])
 {
-  GtkWidget *win, *vbox, *frame, *alignment, *group_box, *hbox, *label, *chooser, *button;
+  GtkWidget *win, *vbox, *frame, *alignment, *group_box;
   GtkSizeGroup *label_group;
-
+  int i;
   gtk_init (&argc, &argv);
 
   /* to test rtl layout, set RTL=1 in the environment */
@@ -137,27 +165,10 @@ main (int argc, char *argv[])
   group_box = gtk_vbox_new (FALSE, 6);
   gtk_container_add (GTK_CONTAINER (alignment), group_box);
 
-  hbox = gtk_hbox_new (FALSE, 12);
-  gtk_container_add (GTK_CONTAINER (group_box), hbox);
-
-  label = gtk_label_new_with_mnemonic ("_Open:");
-  gtk_size_group_add_widget (GTK_SIZE_GROUP (label_group), label);
-  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-
-  chooser = gtk_file_chooser_button_new_with_backend ("Select A File - testfilechooserbutton",
-						      "gtk+");
-  gtk_label_set_mnemonic_widget (GTK_LABEL (label), chooser);
-  g_signal_connect (chooser, "current-folder-changed",
-		    G_CALLBACK (chooser_current_folder_changed_cb), NULL);
-  g_signal_connect (chooser, "selection-changed", G_CALLBACK (chooser_selection_changed_cb), NULL);
-  g_signal_connect (chooser, "file-activated", G_CALLBACK (chooser_file_activated_cb), NULL);
-  g_signal_connect (chooser, "update-preview", G_CALLBACK (chooser_update_preview_cb), NULL);
-  gtk_container_add (GTK_CONTAINER (hbox), chooser);
-
-  button = gtk_button_new_with_label ("Properties...");
-  g_signal_connect (button, "clicked", G_CALLBACK (properties_button_clicked_cb), chooser);
-  gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+  for (i = 0; i < 20; i++)
+  {
+     gtk_box_pack_start (GTK_BOX (group_box), new_row (label_group), FALSE, FALSE, 0);
+  }
 
   g_object_unref (label_group);
 
