Index: gtk/gtkprinter.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkprinter.c,v
retrieving revision 1.19
diff -u -r1.19 gtkprinter.c
--- gtk/gtkprinter.c	22 Jun 2006 02:29:14 -0000	1.19
+++ gtk/gtkprinter.c	24 Jun 2006 16:02:10 -0000
@@ -848,13 +848,18 @@
   g_free (printer_list);
 }
 
-static void
+static gboolean
 list_added_cb (GtkPrintBackend *backend, 
 	       GtkPrinter      *printer, 
 	       PrinterList     *printer_list)
 {
   if (printer_list->func (printer, printer_list->data))
-    stop_enumeration (printer_list);
+    {
+      stop_enumeration (printer_list);
+      return TRUE;
+    }
+
+  return FALSE;
 }
 
 static void
@@ -873,7 +878,7 @@
     stop_enumeration (printer_list);
 }
 
-static void
+static gboolean
 list_printers_init (PrinterList     *printer_list,
 		    GtkPrintBackend *backend)
 {
@@ -883,7 +888,13 @@
   list = gtk_print_backend_get_printer_list (backend);
 
   for (node = list; node != NULL; node = node->next)
-    list_added_cb (backend, node->data, printer_list);
+    {
+      if (list_added_cb (backend, node->data, printer_list))
+        {
+          g_list_free (list);
+          return TRUE;
+        }
+    }
 
   g_list_free (list);
 
@@ -903,6 +914,7 @@
 			printer_list);
     }
 
+  return FALSE;
 }
 
 /**
@@ -941,7 +953,8 @@
     {
       next = node->next;
       backend = GTK_PRINT_BACKEND (node->data);
-      list_printers_init (printer_list, backend);
+      if (list_printers_init (printer_list, backend))
+        return;
     }
 
   if (wait && printer_list->backends)
