Index: gok/gok-spy.c
===================================================================
RCS file: /cvs/gnome/gok/gok/gok-spy.c,v
retrieving revision 1.139
diff -u -r1.139 gok-spy.c
--- gok/gok-spy.c	23 Jul 2004 19:26:33 -0000	1.139
+++ gok/gok-spy.c	28 Sep 2004 15:08:52 -0000
@@ -1673,19 +1673,18 @@
 				pName = g_strdup (_("Table"));
 			}
 		}			
-
+		
 		if (pName != NULL) {
 			gok_log("we have a name: [%s]",pName);
 			/* create a new node */
 			nodes = gok_spy_add_node (nodes, pAccessible, flags, 0, pName);
 		}
-		/* if we decide to allow access to nameless menus ...
-		else if ( Accessible_getRole (pAccessible) == SPI_ROLE_MENU ) {
-			pName = g_strdup (Accessible_getRoleName(pAccessible));
+		/* use role as name in some cases */
+		else if ( gok_spy_is_ui(pAccessible, role) ) {
+			pName = g_strjoin (" ", _("Unlabelled"),  Accessible_getRoleName(pAccessible), NULL);
 			gok_log ("Can't think of a good name so using role:[%s]",pName);
-			nodes = gok_spy_add_node (nodes, pAccessible, -1, pName);
+			nodes = gok_spy_add_node (nodes, pAccessible, flags, 0, pName);
 		}
-		*/
 		else if (Accessible_isText (pAccessible)) {
 			/* 
 			* sadly, many text objects are still nameless - yet we want 
@@ -2438,4 +2437,3 @@
 	gok_log_leave();
 }
 */
-
