? Keyboard.kbd
? am
? authors
? automatic-scanning.xam
? az
? be
? ca
? copying
? cs
? cvs
? cy
? da
? de
? direct-selection.xam
? dwell-selection.xam
? el
? es
? foo
? fr
? gok-0.9.3.tar.gz
? gok-0.9.4
? gok-0.9.4.tar.gz
? gok-filechooser-patch.diff
? gok-perf-patch-3.diff
? gok.desktop
? gok.log
? hi
? hr
? install
? inverse-scanning.xam
? it
? ja
? ko
? lt
? mk
? ml
? ms
? news
? nl
? no
? performance.txt
? pl
? pt
? pt_BR
? readme
? singlekey-automatic-scanning.xam
? singlekey-inverse-scanning.xam
? sk
? sl
? sq
? sr
? sr@Latn
? sv
? ta
? talking-gok.patch
? tr
? uk
? vi
? zh_CN
? zh_TW
? docs/cvs
? docs/reference/cvs
? docs/reference/gok-decl-list.txt
? docs/reference/gok-decl.txt
? docs/reference/gok-undocumented.txt
? docs/reference/gok-unused.txt
? docs/reference/gok.args
? docs/reference/gok.hierarchy
? docs/reference/gok.signals
? docs/reference/html
? docs/reference/html-build.stamp
? docs/reference/html.stamp
? docs/reference/scan-build.stamp
? docs/reference/sgml
? docs/reference/sgml-build.stamp
? docs/reference/sgml.stamp
? docs/reference/tmpl-build.stamp
? docs/reference/tmpl.stamp
? docs/reference/tmpl/cvs
? gok/cvs
? gok/keyboard-geometry
? gok/test-focus-reject
? gok/test-gok-wordcomplete
? help/cvs
? help/gok/c
? help/gok/cvs
? omf-install/cvs
? po/cvs
? po/potfiles
Index: gok-controls.kbd
===================================================================
RCS file: /cvs/gnome/gok/gok-controls.kbd,v
retrieving revision 1.5
diff -u -r1.5 gok-controls.kbd
--- gok-controls.kbd	8 Dec 2003 19:55:19 -0000	1.5
+++ gok-controls.kbd	7 Jan 2004 13:41:42 -0000
@@ -39,6 +39,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="1" type="about" top="0" right="4" left="2">
 		<GOK:label>About</GOK:label>
@@ -77,6 +79,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="1" type="help" top="0" right="6" left="4">
 		<GOK:label>Help</GOK:label>
@@ -115,6 +119,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="2" type="branchModal" top="1" right="2" target="move-resize" left="0">
 		<GOK:label>Window</GOK:label>
@@ -153,6 +159,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="2" type="branch" top="1" right="4" target="quit" left="2">
 		<GOK:label>Quit GOK</GOK:label>
@@ -191,6 +199,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="2" type="settings" top="1" right="6" left="4">
 		<GOK:label>Preferences</GOK:label>
@@ -229,6 +239,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 </GOK:keyboard>
 </GOK:GokFile>
\ No newline at end of file
Index: hide.kbd
===================================================================
RCS file: /cvs/gnome/gok/hide.kbd,v
retrieving revision 1.4
diff -u -r1.4 hide.kbd
--- hide.kbd	8 Dec 2003 19:55:19 -0000	1.4
+++ hide.kbd	7 Jan 2004 13:41:42 -0000
@@ -39,6 +39,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 </GOK:keyboard>
 </GOK:GokFile>
\ No newline at end of file
Index: launcher.kbd
===================================================================
RCS file: /cvs/gnome/gok/launcher.kbd,v
retrieving revision 1.8
diff -u -r1.8 launcher.kbd
--- launcher.kbd	8 Dec 2003 19:55:19 -0000	1.8
+++ launcher.kbd	7 Jan 2004 13:41:42 -0000
@@ -38,6 +38,8 @@
 		
 		
 		
+		
+		
 		 
 	</GOK:key> 
 	<GOK:key bottom="1" type="normal" top="0" right="3" left="1"> 
@@ -76,6 +78,8 @@
 		
 		
 		
+		
+		
 		 
 		<GOK:output type="exec">gnome-terminal</GOK:output>
 	</GOK:key> 
@@ -115,6 +119,8 @@
 		
 		
 		
+		
+		
 		 
 		<GOK:output type="exec">mozilla</GOK:output>
 	</GOK:key> 
@@ -154,6 +160,8 @@
 		
 		
 		
+		
+		
 		 
 		<GOK:output type="exec">gedit</GOK:output>
 	</GOK:key> 
@@ -193,6 +201,8 @@
 		
 		
 		
+		
+		
 		 
 		<GOK:output type="exec">gnome-help</GOK:output>
 	</GOK:key> 
Index: main.kbd
===================================================================
RCS file: /cvs/gnome/gok/main.kbd,v
retrieving revision 1.21
diff -u -r1.21 main.kbd
--- main.kbd	8 Dec 2003 19:55:19 -0000	1.21
+++ main.kbd	7 Jan 2004 13:41:42 -0000
@@ -39,6 +39,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="1" type="branch" top="0" right="2" target="Keyboard" left="0">
 		<GOK:label>Compose</GOK:label>
@@ -77,6 +79,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="1" type="branchModal" top="0" right="4" target="move-resize" left="2">
 		<GOK:label>Window</GOK:label>
@@ -115,6 +119,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="1" type="branch" top="0" right="6" target="mouse" left="4">
 		<GOK:label>Mouse</GOK:label>
@@ -153,6 +159,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="2" type="branchWindows" top="1" right="4" left="2">
 		<GOK:label>Activate</GOK:label>
@@ -191,6 +199,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="3" type="branchToolbars" top="2" right="4" left="2">
 		<GOK:label>Toolbars</GOK:label>
@@ -229,6 +239,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="2" type="branchSettings" top="1" right="6" target="gok-controls" left="4">
 		<GOK:label>GOK</GOK:label>
@@ -267,6 +279,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="3" type="branchGUI" top="2" right="6" left="4">
 		<GOK:label>UI Grab</GOK:label>
@@ -305,6 +319,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="2" type="branch" top="1" right="2" target="launcher" left="0">
 		<GOK:label>Launcher</GOK:label>
@@ -343,6 +359,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 </GOK:keyboard>
 </GOK:GokFile>
\ No newline at end of file
Index: mouse.kbd
===================================================================
RCS file: /cvs/gnome/gok/mouse.kbd,v
retrieving revision 1.4
diff -u -r1.4 mouse.kbd
--- mouse.kbd	8 Dec 2003 19:55:19 -0000	1.4
+++ mouse.kbd	7 Jan 2004 13:41:42 -0000
@@ -39,6 +39,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="1" type="mousebutton" action="latch" top="0" right="2" left="1">
 		<GOK:label>Latch</GOK:label>
@@ -77,6 +79,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="1" type="pointer" top="0" right="4" left="2">
 		<GOK:label>Pointer</GOK:label>
@@ -115,6 +119,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="1" type="repeat-next" top="0" right="6" left="4">
 		<GOK:label>Repeat</GOK:label>
@@ -153,6 +159,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key dir="northwest" bottom="2" type="mouse" top="1" right="1" left="0">
 		<GOK:label>NW</GOK:label>
@@ -191,6 +199,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key dir="north" bottom="2" type="mouse" top="1" right="3" left="1">
 		<GOK:label>N</GOK:label>
@@ -229,6 +239,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key dir="northeast" bottom="2" type="mouse" top="1" right="4" left="3">
 		<GOK:label>NE</GOK:label>
@@ -267,6 +279,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="2" type="mousebutton" action="button1" top="1" right="6" left="4">
 		<GOK:label>Button 1</GOK:label>
@@ -305,6 +319,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key dir="west" bottom="3" type="mouse" top="2" right="1" left="0">
 		<GOK:label>W</GOK:label>
@@ -343,6 +359,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="3" type="mousebutton" action="double1" top="2" right="3" left="1">
 		<GOK:label>Dbl Click</GOK:label>
@@ -381,6 +399,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key dir="east" bottom="3" type="mouse" top="2" right="4" left="3">
 		<GOK:label>E</GOK:label>
@@ -419,6 +439,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="3" type="mousebutton" action="button2" top="2" right="6" left="4">
 		<GOK:label>Button 2</GOK:label>
@@ -457,6 +479,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key dir="southwest" bottom="4" type="mouse" top="3" right="1" left="0">
 		<GOK:label>SW</GOK:label>
@@ -495,6 +519,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key dir="south" bottom="4" type="mouse" top="3" right="3" left="1">
 		<GOK:label>S</GOK:label>
@@ -533,6 +559,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key dir="southeast" bottom="4" type="mouse" top="3" right="4" left="3">
 		<GOK:label>SE</GOK:label>
@@ -571,6 +599,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="4" type="mousebutton" action="button3" top="3" right="6" left="4">
 		<GOK:label>Button 3</GOK:label>
@@ -609,6 +639,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 </GOK:keyboard>
 </GOK:GokFile>
\ No newline at end of file
Index: move-resize.kbd
===================================================================
RCS file: /cvs/gnome/gok/move-resize.kbd,v
retrieving revision 1.11
diff -u -r1.11 move-resize.kbd
--- move-resize.kbd	8 Dec 2003 19:55:20 -0000	1.11
+++ move-resize.kbd	7 Jan 2004 13:41:43 -0000
@@ -39,6 +39,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key dir="north" bottom="1" type="dock" top="0" right="3" left="1">
 		<GOK:label>Dock Top</GOK:label>
@@ -77,6 +79,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key dir="south" bottom="1" type="dock" top="0" right="5" left="3">
 		<GOK:label>Dock Bottom</GOK:label>
@@ -115,6 +119,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key dir="fillwidth" bottom="1" type="move-resize" top="0" right="6" left="5">
 		<GOK:label>Fill</GOK:label>
@@ -153,6 +159,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 
 	<GOK:key dir="northwest" bottom="2" type="move-resize" top="1" right="1" left="0">
@@ -195,6 +203,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key dir="northeast" bottom="2" type="move-resize" top="1" right="4" left="3">
 		<GOK:image type="fixed:20,20" align="right" source="NE.png" />
@@ -236,6 +246,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 
 	<GOK:key dir="west" bottom="3" type="move-resize" top="2" right="1" left="0">
@@ -275,6 +287,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key dir="none" bottom="3" type="dock" top="2" right="3" left="1">
 		<GOK:label>Float</GOK:label>
@@ -313,6 +327,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key dir="east" bottom="3" type="move-resize" top="2" right="4" left="3">
 		<GOK:label>Right</GOK:label>
@@ -351,6 +367,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key dir="wider" bottom="3" type="move-resize" top="2" right="6" left="4">
 		<GOK:label>Wider</GOK:label>
@@ -389,6 +407,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 
 	<GOK:key dir="southwest" bottom="4" type="move-resize" top="3" right="1" left="0">
@@ -431,6 +451,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key dir="southeast" bottom="4" type="move-resize" top="3" right="4" left="3">
 		<GOK:image type="fixed:20,20" align="right" source="SE.png" />
@@ -472,6 +494,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 
 	<GOK:key bottom="5" type="branch" top="4" right="1" target="hide" left="0">
@@ -511,6 +535,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
         <GOK:key bottom="5" type="repeat-next" top="4" right="4" left="1">
                 <GOK:label>Repeat Next Key</GOK:label>
@@ -549,6 +575,8 @@
                 
                 
                 
+                
+                
         </GOK:key>
 	<GOK:key dir="taller" bottom="5" type="move-resize" top="4" right="6" left="4">
 		<GOK:label>Taller</GOK:label>
@@ -587,6 +615,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 </GOK:keyboard>
 </GOK:GokFile>
\ No newline at end of file
Index: quit.kbd
===================================================================
RCS file: /cvs/gnome/gok/quit.kbd,v
retrieving revision 1.4
diff -u -r1.4 quit.kbd
--- quit.kbd	8 Dec 2003 19:55:20 -0000	1.4
+++ quit.kbd	7 Jan 2004 13:41:43 -0000
@@ -39,6 +39,8 @@
 		
 		
 		
+		
+		
 	</GOK:key>
 	<GOK:key bottom="1" type="normal" top="0" right="5" left="2">
 		<GOK:output type="internal">quit</GOK:output>
@@ -78,6 +80,8 @@
 		
 		
 		
+		
+		
 		<GOK:image type="stock" source="gtk-quit" />
 	</GOK:key>
 </GOK:keyboard>
Index: docs/reference/tmpl/gok-keyboard.sgml
===================================================================
RCS file: /cvs/gnome/gok/docs/reference/tmpl/gok-keyboard.sgml,v
retrieving revision 1.8
diff -u -r1.8 gok-keyboard.sgml
--- docs/reference/tmpl/gok-keyboard.sgml	5 Dec 2003 20:23:55 -0000	1.8
+++ docs/reference/tmpl/gok-keyboard.sgml	7 Jan 2004 13:41:43 -0000
@@ -264,9 +264,9 @@
 
 @pNodeAccessible: 
 @type: 
-@role: 
 @Returns: 
 <!-- # Unused Parameters # -->
+@role: 
 @pKey: 
 @pAccessibleRoot: 
 
Index: docs/reference/tmpl/gok-spy.sgml
===================================================================
RCS file: /cvs/gnome/gok/docs/reference/tmpl/gok-spy.sgml,v
retrieving revision 1.4
diff -u -r1.4 gok-spy.sgml
--- docs/reference/tmpl/gok-spy.sgml	30 Jun 2003 12:43:22 -0000	1.4
+++ docs/reference/tmpl/gok-spy.sgml	7 Jan 2004 13:41:43 -0000
@@ -82,9 +82,10 @@
 </para>
 
 @paccessible: 
+@Returns: 
+<!-- # Unused Parameters # -->
 @type: 
 @role: 
-@Returns: 
 
 
 <!-- ##### FUNCTION gok_spy_refresh ##### -->
@@ -101,6 +102,8 @@
 
 </para>
 
+@nodes: 
+<!-- # Unused Parameters # -->
 @plist: 
 
 
Index: gok/gok-data.c
===================================================================
RCS file: /cvs/gnome/gok/gok/gok-data.c,v
retrieving revision 1.42
diff -u -r1.42 gok-data.c
--- gok/gok-data.c	10 Nov 2003 21:17:56 -0000	1.42
+++ gok/gok-data.c	7 Jan 2004 13:41:45 -0000
@@ -1229,7 +1229,7 @@
  *
  */
 void
-gok_data_set_aux_dictionaries (const gchar *dictionaries)
+gok_data_set_aux_dictionaries (gchar *dictionaries)
 {
 	m_AuxDicts = dictionaries;
 	gok_gconf_set_string (gconf_client, GOK_GCONF_AUX_DICTS,
Index: gok/gok-data.h
===================================================================
RCS file: /cvs/gnome/gok/gok/gok-data.h,v
retrieving revision 1.25
diff -u -r1.25 gok-data.h
--- gok/gok-data.h	4 Nov 2003 13:40:12 -0000	1.25
+++ gok/gok-data.h	7 Jan 2004 13:41:45 -0000
@@ -120,7 +120,7 @@
 void gok_data_set_repeat_rate (gint rate);
 GConfClient* gok_data_get_gconf_client (void);
 const gchar* gok_data_get_aux_dictionaries (void);
-void gok_data_set_aux_dictionaries (const gchar *dictionaries);
+void gok_data_set_aux_dictionaries (gchar *dictionaries);
 gboolean gok_data_get_use_aux_dictionaries (void);
 void gok_data_set_use_aux_dictionaries (gboolean use_aux);
 
Index: gok/gok-key.c
===================================================================
RCS file: /cvs/gnome/gok/gok/gok-key.c,v
retrieving revision 1.80
diff -u -r1.80 gok-key.c
--- gok/gok-key.c	8 Dec 2003 14:43:43 -0000	1.80
+++ gok/gok-key.c	7 Jan 2004 13:41:48 -0000
@@ -532,7 +532,7 @@
 	pgok_key_new->pMimicKey = NULL;
 	pgok_key_new->pKeyNext = pKeyNext;
 	pgok_key_new->pKeyPrevious = pKeyPrevious;
-	pgok_key_new->pNodeAccessible = NULL;
+	pgok_key_new->accessible_node = NULL;
 	pgok_key_new->FontSizeGroup = FONT_SIZE_GROUP_UNDEFINED;
 	pgok_key_new->FontSize = -1; /* not set yet */
 	pgok_key_new->ComponentState.active = 0;
@@ -609,6 +609,8 @@
 
 	/* delete all the key's labels */
 	pLabel = pKey->pLabel;
+	if (pLabel) gok_log ("deleting key %s\n", pLabel->Text ? pLabel->Text : "<empty>");
+
 	while (pLabel != NULL)
 	{
 		pLabelTemp = pLabel;
@@ -636,6 +638,14 @@
 	gok_output_delete_all (pKey->pOutputWrapperPre);
 	gok_output_delete_all (pKey->pOutputWrapperPost);
 
+	if (pKey->accessible_node && pKey->accessible_node->paccessible) 
+	{
+		gok_log ("unreffing source");
+		gok_spy_accessible_unref (pKey->accessible_node->paccessible);
+		pKey->accessible_node = NULL; 
+/* null this because there seems to be a bug causing keys to be deleted more than once :-( */
+	} 
+
 	g_free (pKey);
 
 	gok_feedback_drop_refs (pKey);
Index: gok/gok-key.h
===================================================================
RCS file: /cvs/gnome/gok/gok/gok-key.h,v
retrieving revision 1.50
diff -u -r1.50 gok-key.h
--- gok/gok-key.h	4 Nov 2003 13:40:12 -0000	1.50
+++ gok/gok-key.h	7 Jan 2004 13:41:48 -0000
@@ -54,6 +54,8 @@
 KEYTYPE_RAISEAPPLICATION,
 KEYTYPE_BRANCHGUI,
 KEYTYPE_BRANCHGUIACTIONS,
+KEYTYPE_BRANCHGUISELECTION,
+KEYTYPE_BRANCHGUISELECTACTION,
 KEYTYPE_PAGESELECTION,
 KEYTYPE_BRANCHCOMPOSE,
 KEYTYPE_TEXTNAV,
@@ -190,7 +192,7 @@
 	guint has_image:1;
 	guint is_repeatable:1;
         guint unused:13; /* nicer alignment in case compiler is weird */
-	AccessibleNode* pNodeAccessible;
+	AccessibleNode* accessible_node;
 	gint CellsRequired;
 	gint FontSizeGroup;
 	gint FontSize;
Index: gok/gok-keyboard.c
===================================================================
RCS file: /cvs/gnome/gok/gok/gok-keyboard.c,v
retrieving revision 1.113
diff -u -r1.113 gok-keyboard.c
--- gok/gok-keyboard.c	8 Dec 2003 15:01:47 -0000	1.113
+++ gok/gok-keyboard.c	7 Jan 2004 13:41:54 -0000
@@ -953,9 +953,6 @@
 
 	gok_log("deleting keyboard: %s",pKeyboard->Name);
 	
-	/* delete the AccessibleNode list */
-	gok_spy_free(pKeyboard->pNodeAccessible);
-
 	if (pKeyboard->pAccessible != NULL)
 	{
 		gok_spy_accessible_unref(pKeyboard->pAccessible);
@@ -1039,8 +1036,6 @@
 	pGokKeyboardNew->bCommandPredictionKeysAdded = FALSE;
 	pGokKeyboardNew->expand = GOK_EXPAND_SOMETIMES;
 	pGokKeyboardNew->pAccessible = NULL;	
-	pGokKeyboardNew->pNodeAccessible = NULL;	
-	pGokKeyboardNew->search_role = SPI_ROLE_MENU;
 	
 	m_NumberOfKeyboards++;
 	
@@ -1903,47 +1898,61 @@
 			break;
 
 		case KEYTYPE_BRANCHMENUS:
-			gok_log("branch back SPI_ROLE_MENU");		
-			return gok_keyboard_branch_gui(pKey->pNodeAccessible, 
-						       GOK_SPY_SEARCH_MENU,
-						       SPI_ROLE_MENU); 
+			gok_log("branch gui MENUS");		
+			fprintf (stderr, "branch gui (MENUS)\n");
+			return gok_keyboard_branch_gui (pKey->accessible_node, 
+							GOK_SPY_SEARCH_MENU);
 			break;
 
 		case KEYTYPE_BRANCHMENUITEMS:
-			gok_log("branch gui SPI_ROLE_MENU_ITEM");		
-			return gok_keyboard_branch_gui(pKey->pNodeAccessible, 
-						       GOK_SPY_SEARCH_MENU, 
-						       /* does this work for check menu items too? */
-						       SPI_ROLE_MENU_ITEM);
+			gok_log("branch gui MENUS");
+			fprintf (stderr, "branch gui (MENUITEMS)\n");
+			return gok_keyboard_branch_gui (pKey->accessible_node, 
+							GOK_SPY_SEARCH_CHILDREN);
+			break;
+
+		case KEYTYPE_BRANCHGUISELECTION:
+			gok_log("branch gui SELECTION");
+			fprintf (stderr, "branch gui (SELECTION)\n");
+			return gok_keyboard_branch_gui (pKey->accessible_node, 
+							GOK_SPY_SEARCH_CHILDREN);
 			break;
 			
 		case KEYTYPE_BRANCHTOOLBARS:
-			gok_log("branch gui SPI_ROLE_PUSH_BUTTON");		
-			return gok_keyboard_branch_gui(pKey->pNodeAccessible, 
-						       GOK_SPY_SEARCH_ROLE,
-						       SPI_ROLE_PUSH_BUTTON); 
+			gok_log("branch gui TOOLBAR");		
+			return gok_keyboard_branch_gui (pKey->accessible_node, 
+							GOK_SPY_SEARCH_TOOLBARS);
 			break;
+
 		case KEYTYPE_BRANCHGUI:
 			gok_log("branch gui SPI_ROLE_PUSH_BUTTON");		
-			return gok_keyboard_branch_gui(pKey->pNodeAccessible, 
-						       GOK_SPY_SEARCH_UI,
-						       SPI_ROLE_PUSH_BUTTON); 
+			return gok_keyboard_branch_gui (pKey->accessible_node, 
+							GOK_SPY_SEARCH_UI);
 			break;			
 		case KEYTYPE_PAGESELECTION:
 			gok_log("page select");
-			gok_keyboard_page_select (pKey->pNodeAccessible);
+			gok_keyboard_page_select (pKey->accessible_node);
 			return FALSE;
 			break;
+	        case KEYTYPE_BRANCHGUISELECTACTION:	
+			gok_log("branch gui_actions");
+			is_branched = gok_keyboard_branch_gui_selectaction (pKey->accessible_node);
+			return is_branched;
+			break;
+
 		case KEYTYPE_BRANCHGUIACTIONS:
 			gok_log("branch gui_actions");
-			is_branched = gok_keyboard_branch_gui_actions(pKey->pNodeAccessible);
+			is_branched = gok_keyboard_branch_gui_actions (pKey->accessible_node);
 			if (!is_branched) 
 			{
-				pStateSet = Accessible_getStateSet (pKey->pNodeAccessible->paccessible);
-				is_active = AccessibleStateSet_contains (pStateSet, 
-									 SPI_STATE_CHECKED);
-				pKey->ComponentState.active = is_active;
-				AccessibleStateSet_unref (pStateSet);
+				if (pKey->accessible_node)
+				{	
+					pStateSet = Accessible_getStateSet (pKey->accessible_node->paccessible);
+					is_active = AccessibleStateSet_contains (pStateSet, 
+										 SPI_STATE_CHECKED);
+					pKey->ComponentState.active = is_active;
+					AccessibleStateSet_unref (pStateSet);
+				}
 			}
 			return is_branched;
 			break;
@@ -1968,6 +1977,15 @@
 		return KEYSTYLE_INSENSITIVE;
 }
 
+static KeyStyles 
+gok_style_if_selectable (AccessibleStateSet *states, KeyStyles style) 
+{
+	if (AccessibleStateSet_contains (states, SPI_STATE_SELECTABLE))
+		return style;
+	else
+		return KEYSTYLE_INSENSITIVE;
+}
+
 /**
 * gok_keyboard_update_dynamic
 * @pKeyboard: Pointer to the keyboard that gets updated.
@@ -1980,7 +1998,7 @@
 gok_keyboard_update_dynamic (GokKeyboard* pKeyboard)
 {
 	AccessibleNode* pNodeAccessible;
-	AccessibleNode* pNodeAccessibleNext;
+	GSList *nodes;
 	AccessibleStateSet *pStateSet;
 	GokKey* pKey;
 	GokKey* pKeyTemp;
@@ -1998,13 +2016,6 @@
 		return FALSE;
 	}
 
-	/* delete the AccessibleNode list if one exists */
-	if (pKeyboard->pNodeAccessible != NULL)
-	{
-		gok_spy_free(pKeyboard->pNodeAccessible);
-		pKeyboard->pNodeAccessible = NULL;
-	}
-	
 	/* delete any keys that are currently on the keyboard */
 	pKey = pKeyboard->pKeyFirst;
 	while (pKey != NULL)
@@ -2017,31 +2028,34 @@
 
 	
 #if REINSTATE_APPLICATIONS
-	if (pKeyboard->search_role == GOKSPY_ROLE_APPLICATION)
+	if (pKeyboard->search_type == SEARCH_TYPE_APPLICATION)
 	{
 		pNodeAccessible = gok_spy_get_applications();
 	}
 	else
 	{
 #endif
-	gok_log("calling get list with accessible [%#x] and role [%s]", 
-		pKeyboard->pAccessible, AccessibleRole_getName(pKeyboard->search_role));
-	/* create new keys for the keyboard */
+	gok_log("calling get list with accessible [%#x]", pKeyboard->pAccessible);
 
+	/* create new keys for the keyboard */
+	switch (pKeyboard->search_type)
+	{
+	case GOK_SPY_SEARCH_CHILDREN:
+		nodes = gok_spy_get_children (pKeyboard->pAccessible);
+		break;
+	default:
+		nodes =	gok_spy_get_list (pKeyboard->pAccessible);
+		break;
+	}
 
-	/* TODO: REFACTOR: enum KeyType (keyboard role) */
-	pNodeAccessible = 
-		gok_spy_get_list (pKeyboard->pAccessible, pKeyboard->search_type, pKeyboard->search_role);
-		
-	if (pNodeAccessible == NULL)
+	if (nodes == NULL)
 	{
-		gok_log_x ("Warning: pNodeAccessible is NULL!");
+		gok_log_x ("Warning: no nodes found!");
 		gok_log_leave();
 		return FALSE;
 	}
 	
-	/* store the list head on the keyboard so that it can be deallocated later */
-	pKeyboard->pNodeAccessible = pNodeAccessible;
+	pNodeAccessible = nodes->data;
 	
 	/* add the new keys to the dynamic keyboard */
 	/* first, add a 'back' key */
@@ -2061,120 +2075,139 @@
 	pKeyboard->bLaidOut = FALSE;
 
 	column = 1;
-	pNodeAccessibleNext = pNodeAccessible;
 
-	while (pNodeAccessibleNext != NULL)
+	while (nodes)
 	{
-		pKey = gok_key_new (pKeyPrevious, NULL, pKeyboard);
-		pKeyPrevious = pKey;
-		
-		pKey->Style = KEYSTYLE_GENERALDYNAMIC;
-		
-		gok_log("node has role: [%s]",Accessible_getRoleName(pNodeAccessibleNext->paccessible));
-		
-		pStateSet = Accessible_getStateSet (pNodeAccessibleNext->paccessible);
-		switch (Accessible_getRole(pNodeAccessibleNext->paccessible))
-		{
-			/*
-			  case SPI_ROLE_INVALID:
-			  gok_log_x("invalid role in accessible node list!");
-			  pKey->Type = KEYTYPE_NORMAL;
-			  break;
-			*/
-		case SPI_ROLE_MENU:
-			gok_log("setting key type BRANCHMENUITEMS");
-			pKey->Type = KEYTYPE_BRANCHMENUITEMS;
-			pKey->Style = gok_style_if_enabled (pStateSet, KEYSTYLE_BRANCHMENUITEMS);
-			break;
-			/* add cases here	
-			   case SPI_ROLE_XXX:
-			   pKey->Type = KEYTYPE_BRANCHXXX;
-			   break;
-			*/
-		case SPI_ROLE_CHECK_BOX:
-		case SPI_ROLE_CHECK_MENU_ITEM:
-		case SPI_ROLE_TOGGLE_BUTTON:
-			pKey->Type = KEYTYPE_BRANCHGUIACTIONS;
-			pKey->Style = gok_style_if_enabled (pStateSet, KEYSTYLE_BRANCHGUIACTIONS);
-			pKey->has_image = TRUE;
-			pKey->pImage = gok_keyimage_new (pKey, NULL);
-			pKey->pImage->type = IMAGE_TYPE_INDICATOR;
-			is_active = AccessibleStateSet_contains (pStateSet, 
-								 SPI_STATE_CHECKED);
-			pKey->ComponentState.active = is_active;
-			break;
-		case SPI_ROLE_RADIO_BUTTON:
-		case SPI_ROLE_RADIO_MENU_ITEM:
-			pKey->Type = KEYTYPE_BRANCHGUIACTIONS;
-			pKey->Style = gok_style_if_enabled (pStateSet, KEYSTYLE_BRANCHGUIACTIONS);
-			pKey->has_image = TRUE;
-			pKey->pImage = gok_keyimage_new (pKey, NULL);
-			pKey->pImage->type = IMAGE_TYPE_INDICATOR;
-			is_active = AccessibleStateSet_contains (pStateSet, 
-								 SPI_STATE_CHECKED);
-			pKey->ComponentState.active = is_active;
-			pKey->ComponentState.radio = TRUE;
-			break;
-		case SPI_ROLE_PAGE_TAB:
-			/* no action implemented,, must use selection API on parent */
-			pKey->Type = KEYTYPE_PAGESELECTION;
-			pKey->Style = gok_style_if_enabled (pStateSet, KEYSTYLE_PAGESELECTION);
-			break;
-		case SPI_ROLE_TEXT:
-			/* should only be in the list if it's editable...*/
-			if (pNodeAccessibleNext->is_link) {
-			      pKey->Type = KEYTYPE_HYPERLINK;
-			      pKey->Style = KEYSTYLE_HYPERLINK;
-			      is_active = FALSE;
-			}
-			else {
-			      pKey->Type = KEYTYPE_BRANCHTEXT;
-			      if (AccessibleStateSet_contains (pStateSet, SPI_STATE_EDITABLE)) { 
-				      pKey->Style = gok_style_if_enabled (pStateSet, KEYSTYLE_BRANCHTEXT);
-				      is_active = TRUE;
-			      }
-			      else {
-				      is_active = FALSE;
-				      pKey->Style = KEYSTYLE_INSENSITIVE;
-			      }
-			}
-			pKey->ComponentState.active = is_active;
-			break;
-		case SPI_ROLE_HTML_CONTAINER: /* TODO: check Hypertext interface instead */
-			pKey->Type = KEYTYPE_BRANCHHYPERTEXT;
-			pKey->Style = KEYSTYLE_BRANCH; /* reuse 'normal' branch style for now. */
-			is_active = AccessibleStateSet_contains (pStateSet, 
-								 SPI_STATE_SENSITIVE);
-			pKey->ComponentState.active = is_active;
-			break;
-		default:
-			if (Accessible_isHypertext (pNodeAccessibleNext->paccessible)) {
-				pKey->Type = KEYTYPE_BRANCHHYPERTEXT;
-				pKey->Style = KEYSTYLE_BRANCH; /* reuse 'normal' branch style for now. */
-				is_active = TRUE; /* FIXME, might not be enabled? */
+	        pNodeAccessible = nodes->data;
+		if (gok_spy_node_match (pNodeAccessible, pKeyboard->search_type)) {
+			pKey = gok_key_new (pKeyPrevious, NULL, pKeyboard);
+			pKeyPrevious = pKey;
+			
+			pKey->Style = KEYSTYLE_GENERALDYNAMIC;
+			
+			gok_log("node has role: [%s]",Accessible_getRoleName(pNodeAccessible->paccessible));
+
+			fprintf (stderr, "%s: %s\n", Accessible_getRoleName (pNodeAccessible->paccessible), 
+				 Accessible_getName (pNodeAccessible->paccessible));
+			
+			pStateSet = Accessible_getStateSet (pNodeAccessible->paccessible);
+			switch (Accessible_getRole(pNodeAccessible->paccessible))
+			{
+				/*
+				  case SPI_ROLE_INVALID:
+				  gok_log_x("invalid role in accessible node list!");
+				  pKey->Type = KEYTYPE_NORMAL;
+				  break;
+				*/
+			case SPI_ROLE_MENU:
+				gok_log("setting key type BRANCHMENUITEMS");
+				fprintf (stderr, "key type menus created\n");
+				pKey->Type = KEYTYPE_BRANCHMENUITEMS;
+				pKey->Style = gok_style_if_enabled (pStateSet, KEYSTYLE_BRANCHMENUS);
+				break;
+				/* add cases here	
+				   case SPI_ROLE_XXX:
+				   pKey->Type = KEYTYPE_BRANCHXXX;
+				   break;
+				*/
+			case SPI_ROLE_CHECK_BOX:
+			case SPI_ROLE_CHECK_MENU_ITEM:
+			case SPI_ROLE_TOGGLE_BUTTON:
+				pKey->Type = KEYTYPE_BRANCHGUIACTIONS;
+				pKey->Style = gok_style_if_enabled (pStateSet, KEYSTYLE_BRANCHGUIACTIONS);
+				pKey->has_image = TRUE;
+				pKey->pImage = gok_keyimage_new (pKey, NULL);
+				pKey->pImage->type = IMAGE_TYPE_INDICATOR;
+				is_active = AccessibleStateSet_contains (pStateSet, 
+									 SPI_STATE_CHECKED);
 				pKey->ComponentState.active = is_active;
-			}
-			else {
-				/* this might be a dangerous catch all... */
-				gok_log("setting key type BRANCHGUIACTIONS");
+				break;
+			case SPI_ROLE_RADIO_BUTTON:
+			case SPI_ROLE_RADIO_MENU_ITEM:
 				pKey->Type = KEYTYPE_BRANCHGUIACTIONS;
 				pKey->Style = gok_style_if_enabled (pStateSet, KEYSTYLE_BRANCHGUIACTIONS);
+				pKey->has_image = TRUE;
+				pKey->pImage = gok_keyimage_new (pKey, NULL);
+				pKey->pImage->type = IMAGE_TYPE_INDICATOR;
+				is_active = AccessibleStateSet_contains (pStateSet, 
+									 SPI_STATE_CHECKED);
+				pKey->ComponentState.active = is_active;
+				pKey->ComponentState.radio = TRUE;
+				break;
+			case SPI_ROLE_PAGE_TAB:
+				/* no action implemented,, must use selection API on parent */
+				pKey->Type = KEYTYPE_PAGESELECTION;
+				pKey->Style = gok_style_if_enabled (pStateSet, KEYSTYLE_PAGESELECTION);
+				break;
+			case SPI_ROLE_SPIN_BUTTON:
+			case SPI_ROLE_TEXT:
+				/* should only be in the list if it's editable...*/
+				if (pNodeAccessible->flags.is_link) {
+					pKey->Type = KEYTYPE_HYPERLINK;
+					pKey->Style = KEYSTYLE_HYPERLINK;
+					is_active = FALSE;
+				}
+				else {
+					pKey->Type = KEYTYPE_BRANCHTEXT;
+					if (AccessibleStateSet_contains (pStateSet, SPI_STATE_EDITABLE)) { 
+						pKey->Style = gok_style_if_enabled (pStateSet, KEYSTYLE_BRANCHTEXT);
+						is_active = TRUE;
+					}
+					else {
+						is_active = FALSE;
+						pKey->Style = KEYSTYLE_INSENSITIVE;
+					}
+				}
+				pKey->ComponentState.active = is_active;
+				break;
+			case SPI_ROLE_HTML_CONTAINER: /* TODO: check Hypertext interface instead */
+				pKey->Type = KEYTYPE_BRANCHHYPERTEXT;
+				pKey->Style = KEYSTYLE_BRANCH; /* reuse 'normal' branch style for now. */
+				is_active = AccessibleStateSet_contains (pStateSet, 
+									 SPI_STATE_SENSITIVE);
+				pKey->ComponentState.active = is_active;
+				break;
+			case SPI_ROLE_ICON:
+				gok_log("setting key type for icon key to BRANCHGUIACTIONS");
+				if (Accessible_isAction (pNodeAccessible->paccessible))
+				{
+					pKey->Type = KEYTYPE_BRANCHGUISELECTACTION;
+					pKey->Style = gok_style_if_selectable (pStateSet, KEYSTYLE_BRANCHGUIACTIONS);
+				}
+				break;
+			default:
+				if (Accessible_isHypertext (pNodeAccessible->paccessible)) {
+					pKey->Type = KEYTYPE_BRANCHHYPERTEXT;
+					pKey->Style = KEYSTYLE_BRANCH; /* reuse 'normal' branch style for now. */
+					is_active = TRUE; /* FIXME, might not be enabled? */
+					pKey->ComponentState.active = is_active;
+				}
+				if (Accessible_isSelection (pNodeAccessible->paccessible)) {
+					pKey->Type = KEYTYPE_BRANCHGUISELECTION;
+					pKey->Style = gok_style_if_enabled (pStateSet, KEYSTYLE_BRANCHGUIACTIONS);
+				}
+				else {
+					/* this might be a dangerous catch all... */
+					gok_log("setting key type BRANCHGUIACTIONS");
+					pKey->Type = KEYTYPE_BRANCHGUIACTIONS;
+					pKey->Style = gok_style_if_enabled (pStateSet, KEYSTYLE_BRANCHGUIACTIONS);
+				}
+				break;
 			}
-			break;
+			AccessibleStateSet_unref (pStateSet);
+			pKey->Top = 0;
+			pKey->Bottom = 1;
+			pKey->Left = column;
+			pKey->Right = column + 1;
+			gok_spy_accessible_ref (pNodeAccessible->paccessible);
+			pKey->accessible_node = pNodeAccessible;
+			
+			gok_log("adding label %s to dynamic key",pNodeAccessible->pname);
+			gok_key_add_label (pKey, pNodeAccessible->pname, 0, 0);
+			
+			column++;
 		}
-
-		AccessibleStateSet_unref (pStateSet);
-		pKey->Top = 0;
-		pKey->Bottom = 1;
-		pKey->Left = column;
-		pKey->Right = column + 1;
-		pKey->pNodeAccessible = pNodeAccessibleNext;
-		
-		gok_log("adding label %s to dynamic key",pNodeAccessibleNext->pname);
-		gok_key_add_label (pKey, pNodeAccessibleNext->pname, 0, 0);
-		
-		column++;
-		pNodeAccessibleNext = pNodeAccessibleNext->pnext;
+		nodes = g_slist_next (nodes);
 	}	
 
 	gok_log_leave();
@@ -2185,22 +2218,21 @@
 * gok_keyboard_branch_gui
 * @pNodeAccessible: Pointer to the accessible node (parent object).
 * @type: Type of dynamic keyboard to branch to (the role of the children).
-* @role: role to match, if type is #GOK_SPY_SEARCH_ROLE.
 *
 * Displays the generic gui keyboard - currently used for widgets inside windowish things
 *
 * Returns: TRUE if the keyboard was displayed, FALSE if not.
 **/
 gboolean 
-gok_keyboard_branch_gui (AccessibleNode* pNodeAccessible, 
-				  GokSpySearchType type, AccessibleRole role)
+gok_keyboard_branch_gui (AccessibleNode *pNodeAccessible, 
+			 GokSpySearchType type)
 {
 	Accessible* pAccessibleRoot;
 	GokKeyboard* pKeyboard;
 	GokKeyboard* pKeyboardTemp;
 
 	gok_log_enter();
-	
+
 	pAccessibleRoot = NULL;
 
 	if (pNodeAccessible != NULL)
@@ -2247,7 +2279,6 @@
 	pKeyboardTemp->pKeyboardNext = pKeyboard;
 	pKeyboard->pKeyboardPrevious = pKeyboardTemp;
 	pKeyboard->search_type = type;
-	pKeyboard->search_role = role;
 
 	/* set the name and type of the keyboard */
 	switch (type)
@@ -2256,10 +2287,9 @@
 		pKeyboard->Type = KEYBOARD_TYPE_GUI;
 		gok_keyboard_set_name (pKeyboard, _("GUI"));
 		break;
-	case GOK_SPY_SEARCH_ROLE:
-		pKeyboard->Type = KEYBOARD_TYPE_TOOLBAR; /* catch-all ok ? */
-		/* TODO: localize the return value from AccessibleRole_getName */
-		gok_keyboard_set_name (pKeyboard, AccessibleRole_getName (role));
+	case GOK_SPY_SEARCH_TOOLBARS:
+		pKeyboard->Type = KEYBOARD_TYPE_TOOLBAR; 
+		gok_keyboard_set_name (pKeyboard, _("Toolbars"));
 		break;
 	case GOK_SPY_SEARCH_APPLICATIONS:
 		pKeyboard->Type = KEYBOARD_TYPE_APPLICATIONS;
@@ -2267,19 +2297,9 @@
 		break;
 	case GOK_SPY_SEARCH_MENU:
 	default:
-		switch (role) {
-		case SPI_ROLE_MENU:
-			pKeyboard->Type = KEYBOARD_TYPE_MENUS;
-			gok_keyboard_set_name (pKeyboard, _("Menus"));
-			pKeyboard->search_type = GOK_SPY_SEARCH_MENU;
-			break;
-		case SPI_ROLE_MENU_ITEM:
-		default:
-			pKeyboard->Type = KEYBOARD_TYPE_MENUITEMS;
-			gok_keyboard_set_name (pKeyboard, _("Menu"));   
-			pKeyboard->search_type = GOK_SPY_SEARCH_MENU;
-			break;
-		}
+		pKeyboard->Type = KEYBOARD_TYPE_MENUS;
+		gok_keyboard_set_name (pKeyboard, _("Menu"));
+		pKeyboard->search_type = type;
 		break;
 	}
 	
@@ -2298,6 +2318,38 @@
 	return TRUE;
 }
 
+/**
+* gok_keyboard_branch_gui_selectaction
+* @pNodeAccessible: the node thich represents the gui widget
+*
+* Select the given child and invoke the first available action.
+*
+* returns: TRUE if the selection+action were carried out, FALSE if not.
+**/
+gboolean 
+gok_keyboard_branch_gui_selectaction (AccessibleNode* node)
+{
+	AccessibleSelection* aselection;
+	Accessible *parent;
+	parent = Accessible_getParent (node->paccessible);
+	if (parent) 
+	{
+		aselection = Accessible_getSelection (parent);
+		if (aselection) 
+		{
+			gint index = Accessible_getIndexInParent (node->paccessible);
+			if ((index >= 0) && AccessibleSelection_selectChild (aselection, index))
+			{
+				Accessible_unref (parent);
+				AccessibleSelection_unref (aselection);
+				return gok_keyboard_branch_gui_actions (node);
+			}
+			AccessibleSelection_unref (aselection);
+		}
+		Accessible_unref (parent);
+	}
+	return FALSE;
+}
 
 /**
 * gok_keyboard_branch_gui_actions
@@ -2308,7 +2360,7 @@
 * returns: TRUE if the keyboard was displayed, FALSE if not.
 **/
 gboolean 
-gok_keyboard_branch_gui_actions (AccessibleNode* pNodeAccessible)
+gok_keyboard_branch_gui_actions (AccessibleNode* node)
 {
 	AccessibleAction* paaction;
 	gint i = 0;
@@ -2316,13 +2368,12 @@
 		
 	gok_log_enter();
 
-	g_assert(pNodeAccessible != NULL);
-	g_assert(pNodeAccessible->paccessible != NULL);
+	g_assert(node != NULL);
 
 	/* Editable text fields: branch to the composer instead of invoking action */
-        if (Accessible_isEditableText (pNodeAccessible->paccessible))
+        if (Accessible_isEditableText (node->paccessible))
 	{
-		if (gok_keyboard_focus_object (pNodeAccessible->paccessible))
+		if (gok_keyboard_focus_object (node->paccessible))
 		{
 			return gok_main_display_scan (NULL, "Keyboard", KEYBOARD_TYPE_UNSPECIFIED,
 						      KEYBOARD_LAYOUT_UNSPECIFIED, 
@@ -2330,37 +2381,9 @@
 		}
 	}
 	
-	/* 
-	 * just in case: before we do any actions check to see if this object has 
-	 * interesting children and if so, branch to them instead.
-	 * Note that this may not be the right thing to do in all cases,
-	 * since it implies that we can't activate the parent's actions.
-	 */
-	gok_log("checking for children with interesting roles");
-	for (i=0; i< NUM_INTERESTING_ROLES; i++)
-	{
-		if (gok_spy_has_child (pNodeAccessible->paccessible, 
-				       GOK_SPY_SEARCH_ROLE, m_InterestingRole[i]) == TRUE)
-		{
-			gok_log_x("Abort action. Branching to child(ren)!");
-			gok_log_leave();
-			if (gok_spy_is_menu_role (m_InterestingRole[i]))
-			{
-				gok_log("a submenu exists...");
-				return gok_keyboard_branch_gui(pNodeAccessible, 
-										   GOK_SPY_SEARCH_MENU,
-										   SPI_ROLE_MENU); 
-			}
-			return gok_keyboard_branch_gui(pNodeAccessible, 
-						       GOK_SPY_SEARCH_ROLE,
-						       m_InterestingRole[i]);
-		}
-	}
-	gok_log("no children with interesting roles");
-
 	/* possible TODO: build a keyboard if more than one action available 
 	(and do this before above branch to children!)*/
-	paaction = Accessible_getAction(pNodeAccessible->paccessible);
+	paaction = Accessible_getAction(node->paccessible);
 	if (paaction != NULL)
 	{
 		/* for now just perform the first action */
@@ -2371,7 +2394,7 @@
 	}	
 
 	/* branch back when a menu item is activated*/
-	if (gok_spy_is_menu_role(Accessible_getRole(pNodeAccessible->paccessible))){
+	if (gok_spy_is_menu_role(Accessible_getRole(node->paccessible))){
 		gok_log_leave();
 		return gok_main_display_scan_previous();
 	}
@@ -2380,6 +2403,7 @@
 	return FALSE;	
 }
 
+
 gboolean 
 gok_keyboard_branch_editableTextAction (GokKeyboard* pKeyboard, GokKey* pKey)
 {
@@ -2714,7 +2738,7 @@
 {
 	AccessibleHypertext *hypertext = NULL; 
 	AccessibleText *text = NULL;
-	AccessibleNode *node = key->pNodeAccessible;
+	AccessibleNode *node = key->accessible_node;
 	AccessibleHyperlink *link = NULL;
 	gboolean is_editable = FALSE;
 	gboolean activated = FALSE;
@@ -2750,7 +2774,7 @@
 		if (!activated) { /* fallback hack if text is focussable */
 			text = Accessible_getText (node->paccessible);
 			is_editable = Accessible_isEditableText (node->paccessible);
-			if (link && text && node->is_link && !is_editable) {
+			if (link && text && node->flags.is_link && !is_editable) {
 				gboolean is_focussed = FALSE;
 				long int start, end;
 				AccessibleHyperlink_getIndexRange (link, &start, &end);
@@ -3119,10 +3143,10 @@
 			break;
 
 		case KEYTYPE_BRANCHTEXT:
-			if (pKey->pNodeAccessible && 
-				pKey->pNodeAccessible->paccessible) {
+			if (pKey->accessible_node && 
+				pKey->accessible_node->paccessible) {
 					if (gok_keyboard_focus_object 
-						(pKey->pNodeAccessible->paccessible))
+						(pKey->accessible_node->paccessible))
 					{
 						gok_main_display_scan ( NULL, "Keyboard", 
 									KEYBOARD_TYPE_UNSPECIFIED, 
@@ -3200,6 +3224,8 @@
 		case KEYTYPE_MENUITEM:
 		case KEYTYPE_PAGESELECTION:
 		case KEYTYPE_BRANCHGUIACTIONS:
+	        case KEYTYPE_BRANCHGUISELECTION:
+	        case KEYTYPE_BRANCHGUISELECTACTION:
 			if (!gok_keyboard_branch_byKey (pKey))
 				gok_main_display_scan_reset ();
 			break;
@@ -3280,20 +3306,13 @@
 {
 	GokKeyboard* pKeyboard;
 	GokKey* pKey;
-	gboolean bHasMenuBranch;
-	gboolean bHasToolbarBranch;
-	gboolean bHasGUIBranch;
-	gboolean bHasEditTextBranch;
+	GokSpyUIFlags ui_flags, keyboard_ui_flags;
 	gboolean bChanged;
 
 	gok_log_enter();
 
+	keyboard_ui_flags.value = 0;
 	pKeyboard = gok_main_get_current_keyboard();
-	bHasMenuBranch = FALSE;
-	bHasToolbarBranch = FALSE;
-	bHasGUIBranch = FALSE;
-	bHasEditTextBranch = FALSE;
-	bChanged = FALSE;
 	
 	/* are there any keys that branch to a dynamic keyboard? */
 	pKey = pKeyboard->pKeyFirst;
@@ -3301,35 +3320,33 @@
 	{
 		if (pKey->Type == KEYTYPE_BRANCHMENUS)
 		{
-			bHasMenuBranch = TRUE;
+			keyboard_ui_flags.menus = TRUE;
 		}
 		else if (pKey->Type == KEYTYPE_BRANCHTOOLBARS)
 		{
-			bHasToolbarBranch = TRUE;
+			keyboard_ui_flags.toolbars = TRUE;
 		}
 		else if (pKey->Type == KEYTYPE_BRANCHGUI)
 		{
-			bHasGUIBranch = TRUE;
+			keyboard_ui_flags.gui = TRUE;
 		}
 		else if (pKey->Type == KEYTYPE_BRANCHCOMPOSE)
 		{
-			bHasEditTextBranch = TRUE;
+			keyboard_ui_flags.editable_text = TRUE;
 		}
 		pKey = pKey->pKeyNext;
 	}
 	
 	/* don't do anything if there are no menu and no toolbar keys */
-	if ((bHasMenuBranch == FALSE) &&
-		(bHasToolbarBranch == FALSE) &&
-		(bHasGUIBranch == FALSE) &&
-		(bHasEditTextBranch == FALSE))
+	if (keyboard_ui_flags.value == 0)
 	{
 		gok_log("this keyboard has no dynamic branch keys");
 		gok_log_leave();
 		return bChanged;
 	}
 	
-	/* FIXME - optimize here & in gok-spy -currently too many GUI tree searches.
+	/* build a list of 'relevant' UI components */
+	ui_flags = gok_spy_update_component_list (pAccessibleForeground, keyboard_ui_flags);
 
 	/* enable/disable the branch keys */
 	pKey = pKeyboard->pKeyFirst;
@@ -3337,8 +3354,7 @@
 	{
 		if (pKey->Type == KEYTYPE_BRANCHMENUS)
 		{
-			if (gok_spy_has_child (pAccessibleForeground, 
-					       GOK_SPY_SEARCH_MENU, SPI_ROLE_MENU) == TRUE)
+			if (ui_flags.menus)
 			{
 				/* set this flag if the button state changes */
 				if (strcmp (gtk_widget_get_name(pKey->pButton), "StyleButtonBranchMenus") != 0)
@@ -3365,8 +3381,7 @@
 		}
 		else if (pKey->Type == KEYTYPE_BRANCHTOOLBARS)
 		{
-			if (gok_spy_has_child (pAccessibleForeground, GOK_SPY_SEARCH_ROLE,
-					       SPI_ROLE_TOOL_BAR) == TRUE)
+			if (ui_flags.toolbars)
 			{
 				/* set this flag if the button state changes */
 				if (strcmp (gtk_widget_get_name(pKey->pButton), "StyleButtonBranchToolbars") != 0)
@@ -3393,11 +3408,7 @@
 		}
 		else if (pKey->Type == KEYTYPE_BRANCHGUI)
 		{
-			/* TODO: REFACTOR: enum KeyType */
-			if ((gok_spy_has_child (pAccessibleForeground, 
-						GOK_SPY_SEARCH_ROLE, SPI_ROLE_PUSH_BUTTON) == TRUE) ||
-				(gok_spy_has_child (pAccessibleForeground, 
-						    GOK_SPY_SEARCH_EDITABLE_TEXT, SPI_ROLE_TEXT) == TRUE))
+			if (ui_flags.gui)
 			{
 				/* set this flag if the button state changes */
 				if (strcmp (gtk_widget_get_name(pKey->pButton), "StyleButtonBranchGUI") != 0)
@@ -3424,7 +3435,7 @@
 		}
 		else if (pKey->Type == KEYTYPE_BRANCHCOMPOSE)
 		{
-			if (gok_spy_get_accessibleWithText() != NULL)
+			if (ui_flags.editable_text)
 			{
 				/* set this flag if the button state changes */
 				if (strcmp (gtk_widget_get_name(pKey->pButton), "StyleButtonBranchGUI") != 0)
Index: gok/gok-keyboard.h
===================================================================
RCS file: /cvs/gnome/gok/gok/gok-keyboard.h,v
retrieving revision 1.42
diff -u -r1.42 gok-keyboard.h
--- gok/gok-keyboard.h	17 Nov 2003 13:54:39 -0000	1.42
+++ gok/gok-keyboard.h	7 Jan 2004 13:41:54 -0000
@@ -123,8 +123,6 @@
 	gboolean bCommandPredictionKeysAdded;
 	GokKeyboardExpandPolicy expand;
 	Accessible* pAccessible;
-	AccessibleNode* pNodeAccessible;
-	AccessibleRole  search_role;
 	GokSpySearchType search_type;
 	gboolean bFontCalculated;
 	struct GokKey* pKeyFirst;
@@ -170,7 +168,7 @@
 void gok_keyboard_notify_xkb_event (XkbEvent* event);
 gboolean gok_keyboard_layout (GokKeyboard* pKeyboard, KeyboardLayouts layout, KeyboardShape shape, gboolean force);
 gboolean gok_keyboard_branch_byKey (GokKey* pKey);
-gboolean gok_keyboard_branch_gui (AccessibleNode* pNodeAccessible, GokSpySearchType type, AccessibleRole role);
+gboolean gok_keyboard_branch_gui (AccessibleNode* pNodeAccessible, GokSpySearchType type);
 gboolean gok_keyboard_branch_gui_actions (AccessibleNode* pNodeAccessible);
 gboolean gok_keyboard_branch_edittext (void);
 gboolean gok_chunker_chunk (GokKeyboard* pKeyboard);
Index: gok/gok-spy-priv.h
===================================================================
RCS file: /cvs/gnome/gok/gok/gok-spy-priv.h,v
retrieving revision 1.11
diff -u -r1.11 gok-spy-priv.h
--- gok/gok-spy-priv.h	7 Nov 2003 21:03:38 -0000	1.11
+++ gok/gok-spy-priv.h	7 Jan 2004 13:41:54 -0000
@@ -39,20 +39,32 @@
 GOKSPY_STATE_EVENT
 };
 
+typedef struct
+{
+	union {
+		guint value;
+		struct {
+			guint is_link:1;
+			guint is_ui:1;
+			guint is_menu:1;
+			guint is_toolbar_item:1;
+		};
+	};
+} AccessibleNodeFlags;
+
 /* this structure used in the creation of a linked list of Accessible*, char* (name) pairs */
 typedef struct AccessibleNode
 {
-    struct AccessibleNode* pnext;
     Accessible* paccessible;
-    guint is_link:1;
-    guint link:7; /* FIXME: need to generalize with type-safety, maybe a union? */
+    AccessibleNodeFlags flags;
+    guint link;
     char* pname;
 } AccessibleNode;
 
 /* this structure intended for use with a GQueue */
 typedef struct EventNode
 {
-	Accessible* paccessible;
+	const AccessibleEvent *event;
 	gint type; /* easier than dealing with string data */
 } EventNode;
 
Index: gok/gok-spy.c
===================================================================
RCS file: /cvs/gnome/gok/gok/gok-spy.c,v
retrieving revision 1.100
diff -u -r1.100 gok-spy.c
--- gok/gok-spy.c	8 Dec 2003 12:00:03 -0000	1.100
+++ gok/gok-spy.c	7 Jan 2004 13:41:59 -0000
@@ -77,12 +77,6 @@
 SPIBoolean gok_spy_key_listener (const AccessibleKeystroke *key,
                                  void *user_data);
 
-AccessibleNode* gok_spy_create_list (Accessible *anAccessible,
-				     GokSpySearchType type,
-                                     AccessibleRole anAccessiblerole);
-
-static void gok_spy_find_children (AccessibleNode* pNode, GokSpySearchType type, AccessibleRole Role);
-
 static gboolean gok_spy_has_child_aux (Accessible* accessible,
 				       GokSpySearchType search_type,
                                        AccessibleRole role,
@@ -90,13 +84,14 @@
                                        gint depth, gint cdepth,
                                        gboolean* found);
 
-static AccessibleNode*  gok_spy_append_node (AccessibleNode* pnode,
-                                             Accessible* pAccessible);
+static GSList*  gok_spy_append_node (GSList *nodes,
+				     Accessible* pAccessible,
+				     AccessibleNodeFlags flags);
 
 static void gok_spy_modifier_listener(const AccessibleEvent *event,
                                       void *user_data);
 
-static gboolean gok_spy_worth_searching (Accessible* accessible, AccessibleRole role);
+static gboolean gok_spy_worth_searching (Accessible* accessible);
 
 static void gok_spy_window_activate_listener (const AccessibleEvent *event,
                                               void *user_data);
@@ -108,10 +103,10 @@
                                                 void *user_data);
 
 static gboolean gok_spy_is_visible (Accessible *accessible);
-
-static void gok_spy_resolve_namesakes (AccessibleNode *node);
+		
+static void gok_spy_free_nodes (GSList *nodelist);										
+static void gok_spy_resolve_namesakes (GSList *nodelist);
 												
-
 /*
  * gok-spy variables
  */
@@ -122,6 +117,8 @@
 static void* m_ptheMouseButtonListener;
 static void* m_ptheStateChangeListener;
 
+static GSList* _priv_ui_nodes = NULL;
+
 /* pointer to the current window */
 static Accessible* m_ptheWindowAccessible;
 
@@ -437,13 +434,14 @@
 		while (g_queue_is_empty(eventQueue) == FALSE)
 		{
 			en = (EventNode*)g_queue_pop_head(eventQueue);
-			gok_spy_accessible_unref(en->paccessible);
+			AccessibleEvent_unref (en->event);
 			g_free(en);
 		}
 		g_queue_free(eventQueue);
 		eventQueue = NULL;
 	}
-	
+	gok_spy_free_nodes (_priv_ui_nodes);
+
 	gok_log_leave ();
 }
 
@@ -536,24 +534,90 @@
 	m_ptheMouseButtonListener = NULL;
 }
 
+/**
+ * gok_spy_node_match:
+ *
+ * 
+ * Returns: TRUE if the node matches search type @type, FALSE otherwise.
+ **/
+gboolean
+gok_spy_node_match (AccessibleNode *node, GokSpySearchType type)
+{
+	fprintf (stderr, "flags=%x, type=%d\n", node->flags.value, type);
+	switch (type)
+	{
+	case GOK_SPY_SEARCH_MENU:
+		return node->flags.is_menu;
+		break;
+	case GOK_SPY_SEARCH_TOOLBARS:
+		return node->flags.is_toolbar_item;
+		break;
+	case GOK_SPY_SEARCH_UI:
+		return node->flags.is_ui;
+		break;
+	case GOK_SPY_SEARCH_EDITABLE_TEXT:
+		if (Accessible_isEditableText (node->paccessible))
+			return TRUE;
+		break;
+	case GOK_SPY_SEARCH_CHILDREN:
+	case GOK_SPY_SEARCH_ALL:
+		return TRUE;
+		break;
+	case GOK_SPY_SEARCH_APPLICATIONS:
+		if (Accessible_isApplication (node->paccessible))
+			return TRUE;
+		break;
+	default:
+		break;
+	}
+	return FALSE;
+}
+
+/**
+ * 
+ * gok_spy_get_children:
+ *
+ **/
+GSList *
+gok_spy_get_children (Accessible *search_root)
+{
+	GSList *nodes = NULL;
+	AccessibleNodeFlags flags;
+	Accessible *child;
+	long child_count;
+	long i;
+
+	g_assert (search_root);
+	/* TODO: should this recurse down, and should we check for 'interesting'-ness first ? */
+	flags.value = 0xff;
+	child_count = Accessible_getChildCount (search_root);
+	for (i = 0; i < child_count; ++i)
+	{
+		child = Accessible_getChildAtIndex (search_root, i);
+		if (child) 
+		{
+			gok_spy_accessible_implicit_ref (child);
+			nodes = gok_spy_append_node (nodes, child, flags);
+			gok_spy_accessible_unref (child);
+		}
+	}
+	return nodes;
+}
+
 /** 
 * gok_spy_get_list 
 * 
 * @paccessible: The parent accessible to the list
-* @type: The type of list to return, i.e. the search criteria
-* @role: The role of the list members
 *
 * User must call gok_spy_free when finished with this list.
 * 
 * Returns: pointer to the list or NULL
 **/ 
-AccessibleNode* gok_spy_get_list( Accessible* paccessible, GokSpySearchType type, AccessibleRole role )
+GSList* gok_spy_get_list( Accessible* paccessible)
 {
-	AccessibleNode* plist = NULL;
-	gok_log_enter();
-	plist = gok_spy_create_list( paccessible, type, role );
-	gok_log_leave();
-	return plist;
+	fprintf (stderr, "getting list of %d nodes\n.", g_slist_length (_priv_ui_nodes));
+	/* TODO: should return a copy, with client-side incremented refs */
+	return _priv_ui_nodes;
 }
 
 /** 
@@ -574,7 +638,7 @@
 }
 
 /**
-* gok_spy_free
+* gok_spy_free_nodes
 *
 * Frees the memory used by the given list. This must be called for every list
 * that is created.
@@ -583,22 +647,22 @@
 *
 * Returns: void
 **/
-void gok_spy_free (AccessibleNode* pNode)
+void gok_spy_free_nodes (GSList *nodes)
 {
-	AccessibleNode* pNodeToFree;
-	pNodeToFree = NULL;
-	
-	gok_log_enter();
-	while (pNode != NULL)
+	GSList *nodelist = nodes;
+	while (nodelist) 
 	{
-		pNodeToFree = pNode;
-		pNode = pNode->pnext;
+		AccessibleNode *node = nodelist->data;
 		/* we gfree this since we've dup'd the SPI string */
-		g_free (pNodeToFree->pname);
-		gok_spy_accessible_unref (pNodeToFree->paccessible);
-		g_free (pNodeToFree);
+		if (node != NULL)
+		{
+			g_free (node->pname);
+			gok_spy_accessible_unref (node->paccessible);
+			g_free (node);
+		}
+		nodelist = nodelist->next;
 	}
-	gok_log_leave();
+	g_slist_free (nodes);
 }
 
 /** 
@@ -667,16 +731,16 @@
 		gok_log ("eventQueue->length = %d", eventQueue->length);
 
 #if defined(ENABLE_LOGGING_NORMAL)
-		if (en->paccessible != NULL)
+		if (en && en->event && en->event->source != NULL)
 		{
-			s = Accessible_getName (en->paccessible);
+			s = Accessible_getName (en->event->source);
 			if (s == NULL)
 			{
-				gok_log ("%#x", en->paccessible);
+				gok_log ("%#x", en->event->source);
 			}
 			else
 			{
-				gok_log ("%#x %s", en->paccessible, s);
+				gok_log ("%#x %s", en->event->source, s);
 				SPI_freeString (s);
 			}
 		}
@@ -688,21 +752,19 @@
 			/* TODO: remove obsolete focus events from queue since process
 			   accessible is expensive. */
 			gok_log("GOKSPY_FOCUS_EVENT");
-			gok_spy_process_accessible(en->paccessible);
+			gok_spy_process_accessible(en->event->source);
 			break;
 		case GOKSPY_STATE_EVENT:
 			gok_log("GOKSPY_STATE_EVENT");
-			/* gok_spy_accessible_ref (en->paccessible); */
-			((AccessibleChangeListenerCB)(m_ptheStateChangeListener))(en->paccessible);
+			((AccessibleChangeListenerCB)(m_ptheStateChangeListener))(en->event->source);
 			break;
 		case GOKSPY_WINDOW_ACTIVATE_EVENT:
 			gok_log("GOKSPY_WINDOW_ACTIVATE_EVENT");
 			/* reset word completion, if it's being used */
 			gok_wordcomplete_reset (gok_wordcomplete_get_default ());
-			/* FIXME !! the ref needs to happen in the original event loop */
-			if (en->paccessible != m_ptheWindowAccessible) {
+			if (en->event->source != m_ptheWindowAccessible) {
 				gok_spy_accessible_unref (m_ptheWindowAccessible);
-				m_ptheWindowAccessible = en->paccessible;
+				m_ptheWindowAccessible = en->event->source;
 				gok_spy_accessible_ref (m_ptheWindowAccessible);
 				((AccessibleChangeListenerCB)(m_ptheWindowChangeListener))(m_ptheWindowAccessible);
 			}
@@ -728,7 +790,7 @@
 			 * events unless they come from what gok thinks
 			 * is the current window.
 			 */
-			if (en->paccessible == m_ptheWindowAccessible) {
+			if (en->event->source == m_ptheWindowAccessible) {
 				gok_spy_accessible_unref (m_ptheWindowAccessible);
 				gok_spy_accessible_unref (m_ptheAccessibleWithText);
 				m_ptheWindowAccessible = NULL;
@@ -740,7 +802,10 @@
 			gok_log_x("unknown event type in internal gok event queue!");
 			break;
 		}
-		gok_spy_accessible_unref (en->paccessible);
+		if (en->event) 
+		{
+			AccessibleEvent_unref (en->event);
+		}
 		g_free(en);
 	}
 	gok_log_leave();
@@ -780,61 +845,45 @@
  * gok_spy_worth_searching:
  *
  * @accessible: the accessible (possibly a parent) to examine for worthiness.
- * @role: the role we are searching for.
  *
  * This function decides if the accessible might have a subtree worth searching.
  *
  * Returns: boolean success. 
 */ 
-gboolean gok_spy_worth_searching (Accessible* accessible, AccessibleRole role)
+gboolean gok_spy_worth_searching (Accessible* accessible)
 {
-	gboolean worthiness;
-	gboolean bmenu;
+	gboolean worthiness = TRUE;
+	gboolean bmenu = FALSE;
 	AccessibleStateSet* ass = NULL;
 
 	gok_log_enter();
-	bmenu = gok_spy_is_menu_role (role);
-	if (bmenu)
-	{		
-		switch (Accessible_getRole(accessible))
-		{
-			/* using this breaks mozilla menus:
-			case SPI_ROLE_TOOL_BAR: */
-			case SPI_ROLE_STATUS_BAR:
-			case SPI_ROLE_COMBO_BOX:
-				/* add cases here */
-				gok_log("aborting menu search");
-				gok_log_leave();
-				return FALSE;
-		}
-	}
-	else
+	
+	switch (Accessible_getRole (accessible)) 
 	{
-		switch (Accessible_getRole(accessible))
-		{
-			case SPI_ROLE_MENU_BAR:
-			case SPI_ROLE_MENU:
-			case SPI_ROLE_COMBO_BOX:
-				/* add cases here */
-				gok_log("aborting search");
-				gok_log_leave();
-				return FALSE;
-		}
+	case SPI_ROLE_MENU:
+	case SPI_ROLE_MENU_BAR:
+	case SPI_ROLE_MENU_ITEM:
+	case SPI_ROLE_CHECK_MENU_ITEM:
+	case SPI_ROLE_RADIO_MENU_ITEM:
+		bmenu = TRUE;
+		break;
+	default:
+		bmenu = FALSE;
 	}
-	
-	worthiness = TRUE;
 	ass = Accessible_getStateSet(accessible);
 	if (ass != NULL)
 	{
-		AccessibleRole role = Accessible_getRole (accessible);
 		/* state heuristic: 
 		 * - if this thing manages its own children, then it 
 		 * is probably not worth traversing.
 		 * - if it is a menu-like thing then it doesn't need to be "showing"
 		 */
-		if (AccessibleStateSet_contains( ass, SPI_STATE_MANAGES_DESCENDANTS ) ||
+	  if (/*AccessibleStateSet_contains( ass, SPI_STATE_MANAGES_DESCENDANTS ) ||*/
 			(!bmenu && !AccessibleStateSet_contains( ass, SPI_STATE_SHOWING )) )
 		{
+		  gchar *name = Accessible_getName (accessible);
+		  gchar *role_name = Accessible_getRoleName (accessible);
+		  fprintf (stderr, "%s %s is not worth searching", role_name, name);
 			worthiness = FALSE;
 		}
 		AccessibleStateSet_unref(ass);
@@ -874,7 +923,7 @@
     if (accessible == NULL) return *found; 
 	if (cdepth++ == depth) return *found;
 	
-	if (gok_spy_worth_searching(accessible, role) == FALSE) return *found;
+	if (gok_spy_worth_searching(accessible) == FALSE) return *found;
 	
     child_count = Accessible_getChildCount (accessible);
     
@@ -968,7 +1017,8 @@
 static gboolean
 gok_spy_is_ui (Accessible *accessible, AccessibleRole role)
 {
-	gboolean is_interesting_ui_component = FALSE;
+	gboolean interesting = FALSE;
+
 	switch (role) {
 	case SPI_ROLE_PUSH_BUTTON:
 	case SPI_ROLE_CHECK_BOX:
@@ -976,144 +1026,32 @@
 	case SPI_ROLE_RADIO_BUTTON:
 	case SPI_ROLE_PAGE_TAB:
 	case SPI_ROLE_TOGGLE_BUTTON:
-		if (gok_spy_is_visible (accessible))
-			is_interesting_ui_component = TRUE;
+		interesting = TRUE;
+		break;
 	default:
+		if (Accessible_isEditableText (accessible) ||
+		    Accessible_isHypertext (accessible) ||
+		    Accessible_isAction (accessible))
+			interesting = TRUE;
+	  fprintf (stderr, "checking for interesting interfaces... %s\n", interesting ? "yes" : "no");
+	  fprintf (stderr, "is icon: %s\n", role == SPI_ROLE_ICON ? "yes" : "no");
 		break;
 	}
 	/* EditableText and Hypertext components are always interesting */
-	if (!is_interesting_ui_component) {
-		if ((Accessible_isEditableText (accessible)) ||
-		    (Accessible_isHypertext (accessible)))
-			if (gok_spy_is_visible (accessible)) 
-				is_interesting_ui_component = TRUE;
-	}
-	return is_interesting_ui_component;
-}
-
-/**
- * gok_spy_find_children:
- * @pNode: Before execution of this function it is the node that you
- * would like to search for children under.  After execution of this
- * function pNode->pnext is the start of the list of children that
- * satisfy the role requested.  Please note that this function may
- * also modify pNode->paccessible.
- * @role: The role you are searching for.
- *
- * Finds the children of the given node that have the given role.
- * These children are added to the list of children on the node,
- * beginning at pNode->pnext.  Please note that this function may also
- * modify pNode->paccessible.  This is a recursive function.
- */
-void gok_spy_find_children (AccessibleNode* pNode, GokSpySearchType type, AccessibleRole role) 
-{ 
-	Accessible* pAccessibleChild;
-	AccessibleRole childrole;
-	Accessible* pAccessibleParent;
-	long child_count;
-	long i;
-
-	g_assert(pNode != NULL);
-	g_assert(pNode->paccessible != NULL); 
-
-	pAccessibleParent = pNode->paccessible; 
-
-	if (gok_spy_worth_searching(pAccessibleParent, role) == FALSE) return;
-
-	child_count = Accessible_getChildCount (pAccessibleParent);
-
-	if (child_count < 0)
-	{
-		gok_log_x("exception occurred trying to get the child count");
-	}
-
-	/* look through all the children of the given node */
-	for (i=0; i<child_count; i++)
-	{
-		pAccessibleChild
-			= Accessible_getChildAtIndex (pAccessibleParent, i);
-		gok_spy_accessible_implicit_ref (pAccessibleChild);
-
-		if (pAccessibleChild != NULL)
-		{
-			childrole = Accessible_getRole (pAccessibleChild);
-
-			/* check role: special-casing some stuff REFACTOR THIS later TODO */
-			if ((type == GOK_SPY_SEARCH_ALL) /* include everything */
-			    ||
-			    /* include all menu-ish when search type: GOK_SPY_SEARCH_MENU*/
-			    ((type == GOK_SPY_SEARCH_MENU) && 
-			     gok_spy_is_menu_role (childrole))
-			    ||
-			    /* the search role matches the child role */
-			    ((type == GOK_SPY_SEARCH_ROLE) && (childrole == role))
-			    ||
-			    /* all ui */
-			    ((type == GOK_SPY_SEARCH_UI) && 
-			     (gok_spy_is_ui (pAccessibleChild, childrole)))
-			    ||
-				/* editable text */
-			    ((type == GOK_SPY_SEARCH_EDITABLE_TEXT) &&
-			     (Accessible_isEditableText(pAccessibleChild))))
-			{
-				gok_spy_append_node (pNode, pAccessibleChild);
-				if (childrole == SPI_ROLE_PAGE_TAB) {
-					pNode->paccessible = pAccessibleChild;
-					gok_spy_find_children (pNode, type, role);
-				}
-			}
-			else /* search through the children of this child */
-			{
-				pNode->paccessible = pAccessibleChild;
-				gok_spy_find_children (pNode, type, role);
-			}
-
-		gok_spy_accessible_unref (pAccessibleChild);
-
-		}
-	}
-}
- 
-/**
- * gok_spy_create_list:
- * @anAccessible: Pointer to parent accessible object.
- * @anAccessibleRole: The role you are searching for.
- *
- * Creates a list of accessible pointers of the given role.
- *
- * Returns: First node in the list of children. Will be NULL if no
- * children found.
- */
-AccessibleNode* gok_spy_create_list (Accessible *anAccessible,
-				     GokSpySearchType type,
-                                     AccessibleRole anAccessibleRole)
-{
-	AccessibleNode nodeRoot;
-
-	gok_log_enter();
-
-	g_assert(anAccessible != NULL);
-
-	nodeRoot.paccessible = anAccessible;
-	nodeRoot.pnext = NULL;
-	nodeRoot.pname = NULL;
-
-	gok_spy_find_children (&nodeRoot, type, anAccessibleRole);
-
-	gok_spy_resolve_namesakes (nodeRoot.pnext);
-	gok_log_leave();
-	return nodeRoot.pnext;
+	/* however, invisible UI components are not interesting */
+	return (interesting && gok_spy_is_visible (accessible)); 
 }
 
 /* return a node (if exists) from the list with the given name */
-static AccessibleNode*
-gok_spy_node_get_node_named (AccessibleNode *node, gchar *name)
+static GSList*
+gok_spy_node_get_node_named (GSList *list, gchar *name)
 {
-	while (node != NULL) {
+	while (list != NULL) {
+	        AccessibleNode *node = list->data;
 		if (strcmp (name, node->pname) == 0) {
-			return node;
+			return list;
 		}
-		node = node->pnext;
+		list = list->next;
 	}
 	return NULL;
 }
@@ -1172,78 +1110,71 @@
 
 /**
  * gok_spy_resolve_namesakes:
- * @node the start node (in the node list)
+ * @list the GSList of interesting nodes
  *
  * Disambiguate nodes in the given list that have the same name.
  */
 static void
-gok_spy_resolve_namesakes (AccessibleNode *node)
+gok_spy_resolve_namesakes (GSList *list)
 {
 	gchar name[64]; /* names longer thank this will not be resolved */
-	AccessibleNode *namesake;
+	GSList *namesake;
 	gboolean distinguished_source = FALSE;
 	
 	/* for every node in the given list... */
-	while (node != NULL) {
-		namesake = node;
+	while (list != NULL) {
+		AccessibleNode *node = list->data;
 		strncpy (name, node->pname, 63);
 		/* for every node with the same name as the current node... */
-		while ((namesake = gok_spy_node_get_node_named ( namesake->pnext, name )) 
+		while ((namesake = gok_spy_node_get_node_named ( list->next, name )) 
 				!= NULL) {
 			if (!distinguished_source) {
 				distinguished_source = TRUE;
-				gok_spy_distinguish_node_name ( node );
+				gok_spy_distinguish_node_name ( list->data );
 			}
 			gok_spy_distinguish_node_name ( namesake );
 		}
 		distinguished_source = FALSE;	
-		node = node->pnext;
+		list = list->next;
 	}
 }
 
-static gboolean
-gok_spy_add_node (AccessibleNode *prev, Accessible *accessible, gint i, char *name)
+static GSList *
+gok_spy_add_node (GSList *nodes, Accessible *accessible, AccessibleNodeFlags flags, gint link, char *name)
 {
 	AccessibleNode *newnode = NULL;
 
-	if (!prev) return FALSE;
-
 	newnode = (AccessibleNode*)g_malloc(sizeof(AccessibleNode));
 	
 	if (newnode != NULL) {
 		newnode->paccessible = accessible;
 		gok_spy_accessible_ref (accessible);
-		newnode->is_link = (i >= 0) ? TRUE : FALSE;
-		newnode->link = MAX (0, i);
+		newnode->flags = flags;
+		newnode->link = link;
 		newnode->pname = name;
-		newnode->pnext = NULL;
 		gok_log("newnode->pname = %s", newnode->pname);
-		/* append this to end of list */
-		while (prev->pnext)
-			prev = prev->pnext;
-		prev->pnext = newnode;	
-		return TRUE;
+		nodes = g_slist_append (nodes, newnode);
 	}
-	return FALSE;
+	return nodes;
 }
 
 /**
  * gok_spy_append_node:
- * @pNode: An existing list of AccessibleNode to append to, must be
- * non-NULL.
+ * @pNode: An existing list of AccessibleNode to append to (may be NULL).
  * @pAccessible: The Accessible to append to the list.
+ * @flags: Flags indicating the type of accessible in the node.
  *
  * Creates a new AccessibleNode for pAccessible and appends it to the
  * existing list of AccessibleNode at pNode.  Please note that this
  * function calls gok_spy_accessible_ref (pAccessible) when it
- * attaches it to the AccessibleNode created for it.  Please also note
- * that the list must exist already and pNode must be non-NULL.
+ * attaches it to the AccessibleNode created for it.  
  *
  * Returns: the address of the AccessibleNode created for pAccessible
  * or NULL if problems occur.
  */
-AccessibleNode* gok_spy_append_node (AccessibleNode* pNode,
-                                     Accessible* pAccessible)
+GSList* gok_spy_append_node (GSList* nodes,
+			     Accessible* pAccessible,
+			     AccessibleNodeFlags flags)
 {
 	AccessibleNode* pLastNode = NULL;
 	AccessibleNode* pNewNode = NULL;
@@ -1255,8 +1186,6 @@
 	int j = 0;
 	int ntargets = 0;
 
-	g_assert (pNode != NULL);
-
 	gok_log_enter();
 
         s = Accessible_getName (pAccessible);
@@ -1287,7 +1216,8 @@
 			   * on the link!  But at the moment the link objects are not
 			   * actionable, so we have to fake it.
 			   */
-				gok_spy_add_node (pNode, pAccessible, i, g_strdup (linkname));
+				flags.is_link = TRUE;
+				nodes = gok_spy_add_node (nodes, pAccessible, flags, i, g_strdup (linkname));
 				SPI_freeString (linkname);
 			}
 			Accessible_unref (link_object);
@@ -1296,20 +1226,14 @@
 		AccessibleHypertext_unref (hypertext);
 	}
 
-	/* if the name is empty then try LABELLED_BY, else assign "???" */ 
+	/* for other node types, try to create a reasonable label string */
 	else {
 		/* look for a label */
 		if (pName == NULL)
 		{
 			gok_log("no name, so looking at relations...");
 			relations = Accessible_getRelationSet(pAccessible);
-			/*
-			if (relations == NULL)	{
-				gok_log("no relationset for this object");
-				gok_log_leave();
-				return pNewNode;
-			}
-			*/
+
 			if (relations != NULL)
 			while (relations[i]) {
 				type = AccessibleRelation_getRelationType(relations[i]);
@@ -1338,6 +1262,25 @@
 				i++;
 			}
 		}
+
+		if (pName == NULL) {
+			Accessible *parent = Accessible_getParent (pAccessible);
+			/* if there are no siblings, we can use an ancestor's name */
+			while (parent && Accessible_getChildCount (parent) == 1) 
+			{
+				Accessible *tmp_parent = parent;
+				pName = Accessible_getName (tmp_parent); 
+				if (pName != NULL) 
+				{
+					if (strlen (pName))
+						break;
+					SPI_freeString (pName);
+				}
+				parent = Accessible_getParent (tmp_parent);
+				Accessible_unref (tmp_parent);
+			}
+			fprintf (stderr, "ancestor-name == %s\n", pName);
+		}
 		
 		if (pName == NULL) {
 			gok_log("still no name, so looking at description...");
@@ -1366,13 +1309,13 @@
 		if (pName != NULL) {
 			gok_log("we have a name: [%s]",pName);
 			/* create a new node */
-			gok_spy_add_node (pNode, pAccessible, -1, pName);
+			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));
 			gok_log ("Can't think of a good name so using role:[%s]",pName);
-			gok_spy_add_node (pNode, pAccessible, -1, pName);
+			nodes = gok_spy_add_node (nodes, pAccessible, -1, pName);
 		}
 		*/
 		else if (Accessible_isText (pAccessible)) {
@@ -1431,19 +1374,15 @@
 			}
 			if (pName != NULL) {
 				gok_log ("we have a name: [%s]",pName);
-				gok_spy_add_node (pNode, pAccessible, -1, pName);
+				nodes = gok_spy_add_node (nodes, pAccessible, flags, 0, pName);
 			}
 		}
 			
 	}
 	
-	
-	while (pNode->pnext) 
-		pNode = pNode->pnext;
-
 	gok_log_leave();
 
-	return pNode;
+	return nodes;
 }
 
 /** 
@@ -1455,9 +1394,9 @@
 { 
 	EventNode* en; 
 	gok_log_enter();
-	gok_spy_accessible_ref(event->source);
+	AccessibleEvent_ref (event);
 	en = (EventNode*)g_malloc(sizeof(EventNode));
-	en->paccessible = event->source;
+	en->event = event;
 	en->type = GOKSPY_FOCUS_EVENT;
 	g_queue_push_tail( eventQueue, en );
 
@@ -1477,7 +1416,7 @@
 
 	if (event->source == m_ptheWindowAccessible) {
 		en = (EventNode*) g_malloc(sizeof(EventNode));
-		en->paccessible = NULL; /* the source accessible is defunct! */
+		en->event = NULL;
 		en->type = GOKSPY_DEFUNCT_EVENT;
 		g_queue_push_tail ( eventQueue, en );
 		gok_spy_add_idle_handler ();
@@ -1494,9 +1433,9 @@
 	EventNode *en;
 	gok_log_enter ();
 
-	gok_spy_accessible_ref (event->source);
-	en = (EventNode*)g_malloc (sizeof (EventNode));
-	en->paccessible = event->source;
+	AccessibleEvent_ref (event);
+	en = (EventNode*) g_malloc (sizeof (EventNode));
+	en->event = event;
 	en->type = GOKSPY_WINDOW_ACTIVATE_EVENT;
 	g_queue_push_tail (eventQueue, en);
 	gok_spy_add_idle_handler ();
@@ -1511,9 +1450,9 @@
 	EventNode *en;
 	gok_log_enter ();
 
-	gok_spy_accessible_ref (event->source);
+	AccessibleEvent_ref (event);
 	en = (EventNode*)g_malloc (sizeof (EventNode));
-	en->paccessible = event->source;
+	en->event = event;
 	en->type = GOKSPY_WINDOW_DEACTIVATE_EVENT;
 	g_queue_push_tail (eventQueue, en);
 	gok_spy_add_idle_handler ();
@@ -1529,9 +1468,9 @@
 	EventNode *en;
 	gok_log_enter ();
 
-	gok_spy_accessible_ref (event->source);
+	AccessibleEvent_ref (event);
 	en = (EventNode*)g_malloc (sizeof (EventNode));
-	en->paccessible = event->source;
+	en->event = event;
 	en->type = GOKSPY_STATE_EVENT;
 	g_queue_push_tail (eventQueue, en);
 	gok_spy_add_idle_handler ();
@@ -1809,6 +1748,133 @@
 	return NULL;
 }
 
+static Accessible*
+gok_spy_get_toolbar_item (Accessible *toolbar_child)
+{
+	/* 
+	 * ROLE_TOOLBAR containers can have ROLE_PANEL or similarly useless children;
+	 * we need to drill down to the useful thingy i.e. pushbutton, etc.
+	 */
+	Accessible *parent = toolbar_child;
+	Accessible_ref (parent);
+	while (parent) 
+	{
+		Accessible *child = Accessible_getChildAtIndex (parent, 0);
+		Accessible_unref (parent);
+		if (child && Accessible_isAction (child)) 
+			return child;
+		else 
+			parent = child;
+	}
+	return NULL;
+}
+
+static GokSpyUIFlags 
+gok_spy_search_component_list (Accessible *rootAccessible, GokSpyUIFlags keyboard_ui_flags)
+{
+	Accessible* child;
+	Accessible* parent;
+	AccessibleRole role;
+	AccessibleRole parent_role;
+	GokSpyUIFlags ui_flags;
+	long child_count;
+	long i;
+
+	ui_flags.value = 0;
+	parent = rootAccessible;
+	
+	if (gok_spy_worth_searching (parent) == FALSE) 
+	{
+		fprintf (stderr, "not worth searching.\n");
+		return ui_flags;
+	}	
+	parent_role = Accessible_getRole (parent);
+	child_count = Accessible_getChildCount (parent);
+	for (i = 0; i < child_count; ++i)
+	{
+		AccessibleNodeFlags flags;
+		flags.value = 0;
+		child = Accessible_getChildAtIndex (parent, i);
+		gok_spy_accessible_implicit_ref (child);
+		if (child)
+		{
+			flags.value = 0;
+			role = Accessible_getRole (child);
+			if (keyboard_ui_flags.menus && gok_spy_is_menu_role (role))
+			{
+				fprintf (stderr, "menu\n");
+				ui_flags.menus = flags.is_menu = TRUE;
+			}
+			else if (keyboard_ui_flags.toolbars && 
+				 parent_role == SPI_ROLE_TOOL_BAR)
+			{
+				Accessible *toolbar_item = gok_spy_get_toolbar_item (child);
+				if (keyboard_ui_flags.gui) 
+					flags.is_ui = TRUE; /* toolbar items are ui elements too */
+				ui_flags.toolbars = flags.is_toolbar_item = TRUE;
+				_priv_ui_nodes = gok_spy_append_node (_priv_ui_nodes, toolbar_item, flags);
+				fprintf (stderr, "toolbar\n");
+			}
+			else if (keyboard_ui_flags.gui && !flags.is_menu && gok_spy_is_ui (child, role))
+			{
+				ui_flags.gui = flags.is_ui = TRUE;
+				if (keyboard_ui_flags.editable_text && Accessible_isEditableText (child)) 
+				{
+					ui_flags.editable_text = TRUE;
+					fprintf (stderr, "editable-text\n");
+				}
+				fprintf (stderr, "ui\n");
+			}
+			if (!flags.is_toolbar_item) /* toolbar items already added */
+			{
+				if (flags.value) 
+				{
+					_priv_ui_nodes = gok_spy_append_node (_priv_ui_nodes, child, flags);
+				}
+				else
+				{
+					ui_flags.value |= gok_spy_search_component_list (child, keyboard_ui_flags).value;
+				}
+			}
+			gok_spy_accessible_unref (child);
+		}
+	}	
+
+	gok_spy_resolve_namesakes (_priv_ui_nodes);
+
+	return ui_flags;
+}
+
+
+/**
+ * gok_spy_update_component_list:
+ *
+ * Call this to update GOK's internal list of 'interesting UI components'.
+ * It searches the topmost accessible of the currently-focussed window 
+ * (which should be passed in as @rootAccessible), and update's GOK's list
+ * based on the relevant children.  
+ *
+ * returns: A set of flags indicating the types of UI components available in
+ *          the context specified by @rootAccessible.
+ **/
+GokSpyUIFlags 
+gok_spy_update_component_list (Accessible *rootAccessible, GokSpyUIFlags keyboard_ui_flags)
+{
+	GokSpyUIFlags ui_flags;
+
+	gok_spy_free_nodes (_priv_ui_nodes);
+	_priv_ui_nodes = NULL;
+
+	fprintf (stderr, "updating component list [flags=%x]...", keyboard_ui_flags.value);
+
+	ui_flags = gok_spy_search_component_list (rootAccessible, keyboard_ui_flags);
+
+	fprintf (stderr, "found %d components [flags=%x].\n", 
+		 g_slist_length (_priv_ui_nodes), ui_flags.value);
+
+	return ui_flags;
+}
+
 /*
 gboolean gok_spy_is_desktop(Accessible* pAccessible)
 {
@@ -1882,3 +1948,4 @@
 	gok_log_leave();
 }
 */
+
Index: gok/gok-spy.h
===================================================================
RCS file: /cvs/gnome/gok/gok/gok-spy.h,v
retrieving revision 1.28
diff -u -r1.28 gok-spy.h
--- gok/gok-spy.h	7 Nov 2003 13:47:32 -0000	1.28
+++ gok/gok-spy.h	7 Jan 2004 13:41:59 -0000
@@ -38,13 +38,32 @@
 
 typedef enum {
 	GOK_SPY_SEARCH_ROLE,
+	GOK_SPY_SEARCH_TOOLBARS,
 	GOK_SPY_SEARCH_MENU,
 	GOK_SPY_SEARCH_UI,
 	GOK_SPY_SEARCH_EDITABLE_TEXT,
 	GOK_SPY_SEARCH_APPLICATIONS,
+	GOK_SPY_SEARCH_CHILDREN,
 	GOK_SPY_SEARCH_ALL
 } GokSpySearchType;
 
+typedef struct {
+	AccessibleNodeFlags match_flags;
+} GokSpyMatchCondition;
+
+typedef struct
+{
+	union {
+		guint value;
+		struct {
+			guint menus:1;
+			guint toolbars:1;
+			guint gui:1;
+			guint editable_text:1;
+		};
+	};
+} GokSpyUIFlags;
+
 void gok_spy_open(void);        /* call this first (user must call SPI_init first) */
 void gok_spy_close(void);       /* call this when shutting down */ 
 void gok_spy_stop (void);       /* call this first, as soon as you start shutting down */
@@ -67,16 +86,18 @@
 gboolean gok_spy_is_menu_role (AccessibleRole role);
 /* gboolean gok_spy_is_desktop(Accessible* pAccessible); */
 /* gboolean gok_spy_accessible_is_desktopChild(Accessible* accessible); */
-Accessible* gok_spy_get_active_frame( void );
-AccessibleNode* gok_spy_get_list( Accessible* paccessible, GokSpySearchType type, AccessibleRole role ); 
-AccessibleNode* gok_spy_get_ui_list( Accessible* paccessible); 
-AccessibleNode* gok_spy_refresh( AccessibleNode* plist); 
-void gok_spy_free( AccessibleNode* plist ); /* call this to free up an uneeded list's memory */ 
+Accessible*     gok_spy_get_active_frame (void );
+GSList*         gok_spy_get_list (Accessible* paccessible); 
+GSList*         gok_spy_get_children (Accessible* paccessible); 
+GokSpyUIFlags   gok_spy_update_component_list (Accessible* accessible, GokSpyUIFlags keyboard_ui_flags);
+AccessibleNode* gok_spy_get_ui_list (Accessible* paccessible); 
+AccessibleNode* gok_spy_refresh (AccessibleNode* plist); 
+void            gok_spy_free (GSList *nodes); /* call this to free up an uneeded list's memory */ 
 
-Accessible* gok_spy_get_accessibleWithText(void);
+Accessible*     gok_spy_get_accessibleWithText(void);
 
 gboolean gok_spy_has_child (Accessible* accessible, GokSpySearchType type, AccessibleRole role); 
-
+gboolean gok_spy_node_match (AccessibleNode *node, GokSpySearchType type);
 gboolean gok_spy_check_queues(void);
 gboolean gok_spy_check_window(AccessibleRole role);
 void gok_spy_add_idle_handler (void);
Index: gok/gok-word-complete.c
===================================================================
RCS file: /cvs/gnome/gok/gok/gok-word-complete.c,v
retrieving revision 1.26
diff -u -r1.26 gok-word-complete.c
--- gok/gok-word-complete.c	4 Nov 2003 13:40:12 -0000	1.26
+++ gok/gok-word-complete.c	7 Jan 2004 13:42:00 -0000
@@ -52,15 +52,15 @@
 	                                         GokWordComplete *complete, gunichar letter);
 static gchar **gok_wordcomplete_real_predict (GokWordComplete *complete, gint num_predictions);
 static gchar *gok_wordcomplete_real_get_word_part (GokWordComplete *complete);
-static gchar *  gok_wordcomplete_real_get_aux_dict (GokWordComplete *complete);
-static gboolean gok_wordcomplete_real_set_aux_dict (GokWordComplete *complete, const gchar *dict_path);
+static const gchar *  gok_wordcomplete_real_get_aux_dict (GokWordComplete *complete);
+static gboolean gok_wordcomplete_real_set_aux_dict (GokWordComplete *complete, gchar *dict_path);
 
 struct _GokWordCompletePrivate 
 {
         /* the word, or part word, that is getting completed */
 	gchar     *word_part;
 	gunichar     compose;
-	const gchar *aux_dictionaries;
+	gchar *aux_dictionaries;
 };
 
 static GokWordComplete *default_wordcomplete_engine = NULL;
@@ -316,7 +316,7 @@
 * 
 * returns: a fully-delimited file path to an auxiliary word prediction dictionary
 **/
-gchar*   
+const gchar*   
 gok_wordcomplete_get_aux_dictionaries (GokWordComplete *complete)
 {
 	GokWordCompleteClass *klass = GOK_WORDCOMPLETE_GET_CLASS (complete);
@@ -332,7 +332,7 @@
 * returns: TRUE if an aux dictionary can be used by the word-completion engine, FALSE otherwise.
 **/
 gboolean 
-gok_wordcomplete_set_aux_dictionaries (GokWordComplete *complete, const gchar *dictionary_path)
+gok_wordcomplete_set_aux_dictionaries (GokWordComplete *complete, gchar *dictionary_path)
 {
 	GokWordCompleteClass *klass = GOK_WORDCOMPLETE_GET_CLASS (complete);
 	if (*klass->set_aux_dictionary)
@@ -636,7 +636,7 @@
 
 /**
  **/
-static gchar *
+static const gchar *
 gok_wordcomplete_real_get_aux_dict (GokWordComplete *complete)
 {
 	return complete->priv->aux_dictionaries;
@@ -645,7 +645,7 @@
 /**
  **/
 static gboolean
-gok_wordcomplete_real_set_aux_dict (GokWordComplete *complete, const gchar *dict_path)
+gok_wordcomplete_real_set_aux_dict (GokWordComplete *complete, gchar *dict_path)
 {
 	if (complete && complete->priv)
 		complete->priv->aux_dictionaries = dict_path;
Index: gok/gok-word-complete.h
===================================================================
RCS file: /cvs/gnome/gok/gok/gok-word-complete.h,v
retrieving revision 1.13
diff -u -r1.13 gok-word-complete.h
--- gok/gok-word-complete.h	14 Nov 2003 17:39:15 -0000	1.13
+++ gok/gok-word-complete.h	7 Jan 2004 13:42:00 -0000
@@ -77,7 +77,7 @@
 	GokWordCompletionCharacterCategory (* unichar_get_category) (GokWordComplete *complete, gunichar letter);
 	gchar*    (* get_word_part) (GokWordComplete *complete);
         const gchar*    (* get_aux_dictionary) (GokWordComplete *complete);
-	gboolean  (* set_aux_dictionary) (GokWordComplete *complete, const gchar *dict_path);
+	gboolean  (* set_aux_dictionary) (GokWordComplete *complete, gchar *dict_path);
 };
 
 gboolean gok_wordcomplete_open           (GokWordComplete *complete, gchar *directory);
@@ -95,8 +95,8 @@
 					       gint num_predictions);
 
 gchar*   gok_wordcomplete_get_word_part (GokWordComplete *complete);
-gchar*   gok_wordcomplete_get_aux_dictionaries (GokWordComplete *complete);
-gboolean gok_wordcomplete_set_aux_dictionaries (GokWordComplete *complete, const gchar *dictionary_path);
+const gchar*   gok_wordcomplete_get_aux_dictionaries (GokWordComplete *complete);
+gboolean gok_wordcomplete_set_aux_dictionaries (GokWordComplete *complete, gchar *dictionary_path);
 
 #ifdef __cplusplus
 }
Index: gok/main.c
===================================================================
RCS file: /cvs/gnome/gok/gok/main.c,v
retrieving revision 1.127
diff -u -r1.127 main.c
--- gok/main.c	6 Jan 2004 20:23:35 -0000	1.127
+++ gok/main.c	7 Jan 2004 13:42:03 -0000
@@ -360,7 +360,8 @@
 	/* initialize the word prediction engine with gconf values */
 	if (gok_data_get_use_aux_dictionaries ())
 		gok_wordcomplete_set_aux_dictionaries (gok_wordcomplete_get_default (),
-						       gok_data_get_aux_dictionaries ());
+						       (gchar *) gok_data_get_aux_dictionaries ());
+	/* cast silences compiler; we are discarding 'const' */
 
 	gok_log ("gok_data_initialize has finished");
 
@@ -441,7 +442,8 @@
 	gok_chunker_initialize();
 	gok_keyboard_initialize();
 	gok_branchbackstack_initialize();
-	
+
+	fprintf (stderr, "login mode = %s\n", bLoginOption ? "true" : "false");
 	if (!bLoginOption) {
 		gok_main_initialize_wordcomplete ();
 		gok_main_initialize_commandprediction ();
@@ -495,7 +497,7 @@
 gok_log ("finished check");
 	
 	/* connect signal handlers; don't trap SIGKILL */ 
-	signal(SIGSEGV, (void (*)(int))gok_sig_handler); 
+/*	signal(SIGSEGV, (void (*)(int))gok_sig_handler); */
 	signal(SIGTERM, (void (*)(int))gok_sig_handler);
 	signal(SIGINT,  (void (*)(int))gok_sig_handler);
 
@@ -674,27 +676,33 @@
 	if (pKB != NULL) {
 		pK = pKB->pKeyFirst;
 		while (pK != NULL) {
-			if (pK->pNodeAccessible != NULL) {
-				if (pK->pNodeAccessible->paccessible == pAccessible) {
-					/* note: this is very specific for now because we are doing
-					   this to make sure checkbox and radio menu item state
-					   is represented properly. TODO: generalize
-					*/
-					ass = Accessible_getStateSet(pAccessible);
-					if (AccessibleStateSet_contains( ass, SPI_STATE_CHECKED )) {
-						pK->ComponentState.active = TRUE;
-					}
-					else {
-						pK->ComponentState.active = FALSE;
-					}
-					AccessibleStateSet_unref(ass);
-					gok_key_update_toggle_state (pK);
- 					break;
+			if (pK->accessible_node && (pK->accessible_node->paccessible == pAccessible)) {
+				/* note: this is very specific for now because we are doing
+				   this to make sure checkbox and radio menu item state
+				   is represented properly. TODO: generalize
+				*/
+				ass = Accessible_getStateSet(pAccessible);
+				if (AccessibleStateSet_contains( ass, SPI_STATE_CHECKED )) {
+					pK->ComponentState.active = TRUE;
+				}
+				else {
+					pK->ComponentState.active = FALSE;
 				}
+				AccessibleStateSet_unref(ass);
+				gok_key_update_toggle_state (pK);
+				break;
 			}
 			pK = pK->pKeyNext;
 		}
 	}
+
+	/* notes:
+	   we now check to see if the current keyboard requires updating, currently
+	   we simply call gok_main_ds, but if this is too slow we can create a 
+	   method that updates the specific key in question 
+	   wph - I deleted the code that was commented out, don't think it would work
+	   for us - wph
+	*/
 }	
 
 
Index: po/cs.po
===================================================================
RCS file: /cvs/gnome/gok/po/cs.po,v
retrieving revision 1.20
diff -u -r1.20 cs.po
--- po/cs.po	12 Dec 2003 17:50:58 -0000	1.20
+++ po/cs.po	7 Jan 2004 13:42:05 -0000
@@ -6,14 +6,14 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: gok VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2003-12-12 15:12+0100\n"
-"PO-Revision-Date: 2003-12-12 18:50+0100\n"
+"POT-Creation-Date: 2003-12-08 18:34+0000\n"
+"PO-Revision-Date: 2003-12-02 20:40+0100\n"
 "Last-Translator: Miloslav Trmac <mitr@volny.cz>\n"
 "Language-Team: Czech <cs@li.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Report-Msgid-Bugs-To: \n"
 
 #: automatic-scanning.xml.in.h:1
 msgid "Automatic Scanning"
@@ -719,11 +719,11 @@
 msgid "pixels"
 msgstr "pixelů"
 
-#: gok/callbacks.c:388
+#: gok/callbacks.c:456
 msgid "Sorry, Access Method Wizard not implemented yet."
 msgstr "Promiňte, průvodce pro přístupové metody zatím není implementován."
 
-#: gok/callbacks.c:390
+#: gok/callbacks.c:458
 msgid "GOK Access Method Wizard"
 msgstr "Průvodce pro přístupové metody GOK"
 
@@ -743,7 +743,7 @@
 msgid "GOK Inverse Scanning Advanced"
 msgstr "Pokročilé inverzní skenování GOK"
 
-#: gok/gok-editor.c:148 gok/gok-editor.c:181 gok/gok-editor.c:261
+#: gok/gok-editor.c:148 gok/gok-editor.c:181 gok/gok-editor.c:260
 msgid ""
 "You have modified the current file.\n"
 "Do you want to discard your changes?"
@@ -751,8 +751,8 @@
 "Současný soubor jste upravili.\n"
 "Chcete vaše změny zahodit?"
 
-#: gok/gok-editor.c:150 gok/gok-editor.c:183 gok/gok-editor.c:263
-#: gok/gok-editor.c:1055
+#: gok/gok-editor.c:150 gok/gok-editor.c:183 gok/gok-editor.c:262
+#: gok/gok-editor.c:1037
 msgid "Keyboard Filename Invalid"
 msgstr "Neplatný název souboru klávesnice"
 
@@ -761,30 +761,20 @@
 msgstr "nový"
 
 #. create the file selector dialog
-#: gok/gok-editor.c:273
+#: gok/gok-editor.c:272
 msgid "Select keyboard file for editing"
 msgstr "Vyberte soubor klávesnice pro úpravu"
 
-#: gok/gok-editor.c:283 gok/gok-editor.c:976
-msgid ".kbd files"
-msgstr "soubory .kbd"
-
-#: gok/gok-editor.c:538
+#: gok/gok-editor.c:529
 msgid "label"
 msgstr "titulek"
 
-#: gok/gok-editor.c:712
+#: gok/gok-editor.c:703
 #, c-format
 msgid "Can't save file: %s\n"
 msgstr "Nelze uložit soubor: %s\n"
 
-#. get name of keyboard filename
-#. create the file selector dialog
-#: gok/gok-editor.c:966
-msgid "Save keyboard file as"
-msgstr "Uložit soubor klávesnice jako"
-
-#: gok/gok-editor.c:1047
+#: gok/gok-editor.c:1029
 #, c-format
 msgid ""
 "This is not a valid keyboard filename:\n"
@@ -793,7 +783,7 @@
 "Toto není platný název souboru klávesnice:\n"
 "%s"
 
-#: gok/gok-editor.c:1077
+#: gok/gok-editor.c:1059
 msgid "(new)"
 msgstr "(nový)"
 
@@ -897,7 +887,7 @@
 
 #: gok/gok-keyboard.c:2861
 msgid "Full Credits"
-msgstr "Úplné kredity"
+msgstr ""
 
 #. create the 'new action name' dialog
 #: gok/gok-page-actions.c:382 gok/gok-page-actions.c:427
@@ -1165,27 +1155,27 @@
 msgid "No keyboards to display!"
 msgstr "Nejsou k zobrazení žádné klávesnice!"
 
-#: gok/main.c:1382
+#: gok/main.c:1381
 msgid "Can't read any keyboards!"
 msgstr "Nelze načíst žádné klávesnice!"
 
-#: gok/main.c:1523
+#: gok/main.c:1522
 msgid "could not access method directory key from GConf!"
 msgstr "nemohu přistupovat ke klíči adresáře metod v GConf!"
 
-#: gok/main.c:1528
+#: gok/main.c:1527
 msgid "possibly unknown access method!"
 msgstr "možná neznámá přístupová metoda!"
 
-#: gok/main.c:1953
+#: gok/main.c:1952
 msgid "Sorry, GOK can't run because:\n"
 msgstr "Promiňte, GOK nelze spustit z důvodu:\n"
 
-#: gok/main.c:1962
+#: gok/main.c:1961
 msgid "GOK Fatal Error"
 msgstr "Fatální chyba GOK"
 
-#: gok/main.c:1974
+#: gok/main.c:1973
 msgid ""
 "GOK uses GConf 2 to store its settings and requires certain settings to be "
 "in GConf to run.  GOK is currently unable to retrieve those settings.  If "
@@ -1199,7 +1189,7 @@
 "muset znovu spustit gconfd, například příkazem 'gconftool-2 --shutdown' nebo "
 "se odhlaste a znovu přihlaste."
 
-#: gok/main.c:1991
+#: gok/main.c:1990
 msgid ""
 "Currently GOK requires that the x, y, width and height all be given.  Sorry, "
 "your geometry specification will not be used."
@@ -1207,11 +1197,11 @@
 "V současné době GOK vyžaduje, aby byly zadány x, y, šířka a výška. Promiňte, "
 "ale vaše zadání geometrie nebude použito."
 
-#: gok/main.c:1993
+#: gok/main.c:1992
 msgid "gok: Unsupported geometry specification"
 msgstr "gok: Nepodporované zadání geometrie"
 
-#: gok/main.c:2230
+#: gok/main.c:2229
 msgid ""
 "Assistive Technology Support Is Not Enabled.\n"
 "\n"
@@ -1239,11 +1229,11 @@
 "GOK ukončíte kliknutím na Zavřít.\n"
 "\n"
 
-#: gok/main.c:2249
+#: gok/main.c:2248
 msgid "Enable and Log Out"
 msgstr "Povolit a odhlásit se"
 
-#: gok/main.c:2261
+#: gok/main.c:2260
 msgid "Continue"
 msgstr "Pokračovat"
 
Index: po/es.po
===================================================================
RCS file: /cvs/gnome/gok/po/es.po,v
retrieving revision 1.15
diff -u -r1.15 es.po
--- po/es.po	13 Dec 2003 00:46:19 -0000	1.15
+++ po/es.po	7 Jan 2004 13:42:07 -0000
@@ -1,3 +1,4 @@
+# translation of gok.HEAD.po to Spanish
 # translation of gok.HEAD.es.po to Spanish
 # Spanish translation for gok.
 # Copyright © 2003 Free Software Foundation, Inc.
@@ -9,14 +10,14 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: gok.HEAD\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2003-12-12 20:14+0100\n"
-"PO-Revision-Date: 2003-12-13 01:45+0100\n"
+"POT-Creation-Date: 2003-12-08 18:34+0000\n"
+"PO-Revision-Date: 2003-08-26 11:51+0200\n"
 "Last-Translator: Francisco Javier F. Serrador <serrador@arrakis.es>\n"
 "Language-Team: Spanish <traductores@es.gnome.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Report-Msgid-Bugs-To: \n"
 "X-Generator: KBabel 1.0.2\n"
 
 #: automatic-scanning.xml.in.h:1
@@ -82,18 +83,20 @@
 "para seleccionar."
 
 #: singlekey-automatic-scanning.xml.in.h:2
+#, fuzzy
 msgid "Single Key Automatic Scanning"
-msgstr "Rastreo automático de tecla simple"
+msgstr "Rastreo automático"
 
 #: singlekey-inverse-scanning.xml.in.h:2
+#, fuzzy
 msgid "Single Key Inverse Scanning"
-msgstr "Rastreo inverso de tecla simple"
+msgstr "Rastreo inverso"
 
 #: gok-with-references.schemas.in.h:1
 msgid ""
 "A semicolon-delimited list of fully specified paths to additional word-"
 "completion dictionaries"
-msgstr "Una lista delimitada por puntos y comas de rutas completamente especificadas a diccionarios de completado de palabras"
+msgstr ""
 
 #: gok-with-references.schemas.in.h:2
 msgid "Are the preferences to be restricted?"
@@ -244,7 +247,7 @@
 msgid ""
 "Whether to use additional word lists when searching for GOK word-completion "
 "candidates"
-msgstr "Indica si debe usar listas de palabras adicionales al buscar candidatos para completado de palabras"
+msgstr ""
 
 #: gok.desktop.in.h:1
 msgid "On-Screen Keyboard"
@@ -732,11 +735,11 @@
 msgid "pixels"
 msgstr "píxeles"
 
-#: gok/callbacks.c:388
+#: gok/callbacks.c:456
 msgid "Sorry, Access Method Wizard not implemented yet."
 msgstr "Lo siento, el asistente de métodos de acceso no está implementado aún."
 
-#: gok/callbacks.c:390
+#: gok/callbacks.c:458
 msgid "GOK Access Method Wizard"
 msgstr "Asistente de método de acceso de GOK"
 
@@ -756,7 +759,7 @@
 msgid "GOK Inverse Scanning Advanced"
 msgstr "Rastreo inverso avanzado de GOK"
 
-#: gok/gok-editor.c:148 gok/gok-editor.c:181 gok/gok-editor.c:261
+#: gok/gok-editor.c:148 gok/gok-editor.c:181 gok/gok-editor.c:260
 msgid ""
 "You have modified the current file.\n"
 "Do you want to discard your changes?"
@@ -764,8 +767,8 @@
 "Ha modificado el archivo actual.\n"
 "¿Desea descartar los cambios realizados?"
 
-#: gok/gok-editor.c:150 gok/gok-editor.c:183 gok/gok-editor.c:263
-#: gok/gok-editor.c:1055
+#: gok/gok-editor.c:150 gok/gok-editor.c:183 gok/gok-editor.c:262
+#: gok/gok-editor.c:1037
 msgid "Keyboard Filename Invalid"
 msgstr "Nombre de archivo de teclado incorrecto"
 
@@ -774,30 +777,20 @@
 msgstr "nuevo"
 
 #. create the file selector dialog
-#: gok/gok-editor.c:273
+#: gok/gok-editor.c:272
 msgid "Select keyboard file for editing"
 msgstr "Seleccione el archivo de teclado a editar"
 
-#: gok/gok-editor.c:283 gok/gok-editor.c:976
-msgid ".kbd files"
-msgstr "archivos .kbd"
-
-#: gok/gok-editor.c:538
+#: gok/gok-editor.c:529
 msgid "label"
 msgstr "etiqueta"
 
-#: gok/gok-editor.c:712
+#: gok/gok-editor.c:703
 #, c-format
 msgid "Can't save file: %s\n"
 msgstr "No se puede guardar el archivo: %s\n"
 
-#. get name of keyboard filename
-#. create the file selector dialog
-#: gok/gok-editor.c:966
-msgid "Save keyboard file as"
-msgstr "guardar el archivo de teclado como"
-
-#: gok/gok-editor.c:1047
+#: gok/gok-editor.c:1029
 #, c-format
 msgid ""
 "This is not a valid keyboard filename:\n"
@@ -806,22 +799,22 @@
 "Este no es un nombre válido para un archivo de teclado:\n"
 "%s"
 
-#: gok/gok-editor.c:1077
+#: gok/gok-editor.c:1059
 msgid "(new)"
 msgstr "(nuevo)"
 
 #: gok/gok-keyboard.c:132
 #, c-format
 msgid "Xkb extension could not be initialized! (error code %x)"
-msgstr "La extensión Xkb no pudo inicializarse (código de error %x)"
+msgstr ""
 
 #: gok/gok-keyboard.c:138
 msgid "keyboard description not available!"
-msgstr "descripción de teclado no disponible"
+msgstr ""
 
 #: gok/gok-keyboard.c:144 gok/gok-keyboard.c:341
 msgid "Keyboard Geometry cannot be read from your X Server."
-msgstr "La geometría del teclado no pudo leerse de su servidor X"
+msgstr ""
 
 #: gok/gok-keyboard.c:397
 msgid "Repeat Next Key"
@@ -841,27 +834,27 @@
 
 #: gok/gok-keyboard.c:629
 msgid "level 0|abcdefghijklmnopqrstuvwxyz1234567890-=[];'#\\,./"
-msgstr "nivel 0|abcdefghijklmnopqrstuvwxyz1234567890-=[];'#\\,./"
+msgstr ""
 
 #: gok/gok-keyboard.c:630
 msgid "level 1|ABCDEFGHIJKLMNOPQRSTUVWXYZ!\"3$%^&*()_+{}:@~<>?"
-msgstr "nivel 1|ABCDEFGHIJKLMNOPQRSTUVWXYZ!\"3$%^&*()_+{}:@~<>?"
+msgstr ""
 
 #: gok/gok-keyboard.c:631 gok/gok-keyboard.c:677
 msgid "level 2|"
-msgstr "nivel 2|"
+msgstr ""
 
 #: gok/gok-keyboard.c:632 gok/gok-keyboard.c:678
 msgid "level 3|"
-msgstr "nivel 3|"
+msgstr ""
 
 #: gok/gok-keyboard.c:675
 msgid "level 0|etaonrishdlfcmugypwbvkxjqz`1234567890-=\\[];'<,./"
-msgstr "nivel 0|etaonrishdlfcmugypwbvkxjqz`1234567890-=\\[];'<,./"
+msgstr ""
 
 #: gok/gok-keyboard.c:676
 msgid "level 1|ETAONRISHDLFCMUGYPWBVKXJQZ~!@#$%^&*()_+|{}:\"><>?"
-msgstr "nivel 1|ETAONRISHDLFCMUGYPWBVKXJQZ~!@#$%^&*()_+|{}:\"><>?"
+msgstr ""
 
 #. change the name of the window to the keyboard name
 #: gok/gok-keyboard.c:1575
@@ -906,7 +899,7 @@
 
 #: gok/gok-keyboard.c:2861
 msgid "Full Credits"
-msgstr "Créditos completos"
+msgstr ""
 
 #. create the 'new action name' dialog
 #: gok/gok-page-actions.c:382 gok/gok-page-actions.c:427
@@ -1176,29 +1169,29 @@
 msgid "No keyboards to display!"
 msgstr "No hay ningún teclado para mostrar"
 
-#: gok/main.c:1382
+#: gok/main.c:1381
 msgid "Can't read any keyboards!"
 msgstr "No se puede leer ningún teclado"
 
-#: gok/main.c:1523
+#: gok/main.c:1522
 msgid "could not access method directory key from GConf!"
 msgstr ""
 "¡no se ha podido acceder a la clave del directorio de métodos de acceso "
 "desde GConf!"
 
-#: gok/main.c:1528
+#: gok/main.c:1527
 msgid "possibly unknown access method!"
 msgstr "¡posiblemente un método de acceso desconocido!"
 
-#: gok/main.c:1953
+#: gok/main.c:1952
 msgid "Sorry, GOK can't run because:\n"
 msgstr "Lo siento, GOK no puede ejecutarte debido a:\n"
 
-#: gok/main.c:1962
+#: gok/main.c:1961
 msgid "GOK Fatal Error"
 msgstr "Error fatal de GOK"
 
-#: gok/main.c:1974
+#: gok/main.c:1973
 msgid ""
 "GOK uses GConf 2 to store its settings and requires certain settings to be "
 "in GConf to run.  GOK is currently unable to retrieve those settings.  If "
@@ -1213,7 +1206,7 @@
 "este comando para ello: «gconftool-2 --shutdown» o puede cerrar la sesión y "
 "volver a entrar."
 
-#: gok/main.c:1991
+#: gok/main.c:1990
 msgid ""
 "Currently GOK requires that the x, y, width and height all be given.  Sorry, "
 "your geometry specification will not be used."
@@ -1221,11 +1214,11 @@
 "En este momento GOK necesita obligatoriamente los valores de x,y el ancho y "
 "el alto. Lo siento, su especificación de geometría no será utilizada."
 
-#: gok/main.c:1993
+#: gok/main.c:1992
 msgid "gok: Unsupported geometry specification"
 msgstr "gok: Especificación de geometría no soportada"
 
-#: gok/main.c:2230
+#: gok/main.c:2229
 msgid ""
 "Assistive Technology Support Is Not Enabled.\n"
 "\n"
@@ -1253,11 +1246,11 @@
 "Para salir de GOK, pulse Cerrar.\n"
 "\n"
 
-#: gok/main.c:2249
+#: gok/main.c:2248
 msgid "Enable and Log Out"
 msgstr "Activar y salir de la sesión"
 
-#: gok/main.c:2261
+#: gok/main.c:2260
 msgid "Continue"
 msgstr "Continuar"
 
Index: po/sr.po
===================================================================
RCS file: /cvs/gnome/gok/po/sr.po,v
retrieving revision 1.15
diff -u -r1.15 sr.po
--- po/sr.po	14 Dec 2003 11:29:30 -0000	1.15
+++ po/sr.po	7 Jan 2004 13:42:09 -0000
@@ -9,8 +9,8 @@
 msgstr ""
 "Project-Id-Version: gok\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2003-12-14 13:27+0100\n"
-"PO-Revision-Date: 2003-12-14 13:27+0100\n"
+"POT-Creation-Date: 2003-12-11 18:53+0100\n"
+"PO-Revision-Date: 2003-12-11 18:54+0100\n"
 "Last-Translator: Данило Шеган <danilo@prevod.org>\n"
 "Language-Team: Serbian (sr) <serbiangnome-lista@nongnu.org>\n"
 "MIME-Version: 1.0\n"
@@ -758,7 +758,7 @@
 msgid "GOK Inverse Scanning Advanced"
 msgstr "Напредна Гокова обрнута провера"
 
-#: gok/gok-editor.c:148 gok/gok-editor.c:181 gok/gok-editor.c:261
+#: gok/gok-editor.c:148 gok/gok-editor.c:181 gok/gok-editor.c:260
 msgid ""
 "You have modified the current file.\n"
 "Do you want to discard your changes?"
@@ -766,8 +766,8 @@
 "Изменили сте текућу датотеку.\n"
 "Желите ли да одбаците ваше измене?"
 
-#: gok/gok-editor.c:150 gok/gok-editor.c:183 gok/gok-editor.c:263
-#: gok/gok-editor.c:1055
+#: gok/gok-editor.c:150 gok/gok-editor.c:183 gok/gok-editor.c:262
+#: gok/gok-editor.c:1037
 msgid "Keyboard Filename Invalid"
 msgstr "Неисправно име датотеке тастатуре"
 
@@ -776,30 +776,20 @@
 msgstr "нови"
 
 #. create the file selector dialog
-#: gok/gok-editor.c:273
+#: gok/gok-editor.c:272
 msgid "Select keyboard file for editing"
 msgstr "Изаберите коју датотеку тастатуре желите да уредите"
 
-#: gok/gok-editor.c:283 gok/gok-editor.c:976
-msgid ".kbd files"
-msgstr ".kbd датотеке"
-
-#: gok/gok-editor.c:538
+#: gok/gok-editor.c:529
 msgid "label"
 msgstr "ознака"
 
-#: gok/gok-editor.c:712
+#: gok/gok-editor.c:703
 #, c-format
 msgid "Can't save file: %s\n"
 msgstr "Не може да сачува датотеку: %s\n"
 
-#. get name of keyboard filename
-#. create the file selector dialog
-#: gok/gok-editor.c:966
-msgid "Save keyboard file as"
-msgstr "Сачувајте датотеку тастатуре као"
-
-#: gok/gok-editor.c:1047
+#: gok/gok-editor.c:1029
 #, c-format
 msgid ""
 "This is not a valid keyboard filename:\n"
@@ -808,7 +798,7 @@
 "Ово није исправна датотека за тастатуру:\n"
 "%s"
 
-#: gok/gok-editor.c:1077
+#: gok/gok-editor.c:1059
 msgid "(new)"
 msgstr "(нови)"
 
Index: po/sr@Latn.po
===================================================================
RCS file: /cvs/gnome/gok/po/sr@Latn.po,v
retrieving revision 1.15
diff -u -r1.15 sr@Latn.po
--- po/sr@Latn.po	14 Dec 2003 11:29:30 -0000	1.15
+++ po/sr@Latn.po	7 Jan 2004 13:42:11 -0000
@@ -9,8 +9,8 @@
 msgstr ""
 "Project-Id-Version: gok\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2003-12-14 13:27+0100\n"
-"PO-Revision-Date: 2003-12-14 13:27+0100\n"
+"POT-Creation-Date: 2003-12-11 18:53+0100\n"
+"PO-Revision-Date: 2003-12-11 18:54+0100\n"
 "Last-Translator: Danilo Šegan <danilo@prevod.org>\n"
 "Language-Team: Serbian (sr) <serbiangnome-lista@nongnu.org>\n"
 "MIME-Version: 1.0\n"
@@ -758,7 +758,7 @@
 msgid "GOK Inverse Scanning Advanced"
 msgstr "Napredna Gokova obrnuta provera"
 
-#: gok/gok-editor.c:148 gok/gok-editor.c:181 gok/gok-editor.c:261
+#: gok/gok-editor.c:148 gok/gok-editor.c:181 gok/gok-editor.c:260
 msgid ""
 "You have modified the current file.\n"
 "Do you want to discard your changes?"
@@ -766,8 +766,8 @@
 "Izmenili ste tekuću datoteku.\n"
 "Želite li da odbacite vaše izmene?"
 
-#: gok/gok-editor.c:150 gok/gok-editor.c:183 gok/gok-editor.c:263
-#: gok/gok-editor.c:1055
+#: gok/gok-editor.c:150 gok/gok-editor.c:183 gok/gok-editor.c:262
+#: gok/gok-editor.c:1037
 msgid "Keyboard Filename Invalid"
 msgstr "Neispravno ime datoteke tastature"
 
@@ -776,30 +776,20 @@
 msgstr "novi"
 
 #. create the file selector dialog
-#: gok/gok-editor.c:273
+#: gok/gok-editor.c:272
 msgid "Select keyboard file for editing"
 msgstr "Izaberite koju datoteku tastature želite da uredite"
 
-#: gok/gok-editor.c:283 gok/gok-editor.c:976
-msgid ".kbd files"
-msgstr ".kbd datoteke"
-
-#: gok/gok-editor.c:538
+#: gok/gok-editor.c:529
 msgid "label"
 msgstr "oznaka"
 
-#: gok/gok-editor.c:712
+#: gok/gok-editor.c:703
 #, c-format
 msgid "Can't save file: %s\n"
 msgstr "Ne može da sačuva datoteku: %s\n"
 
-#. get name of keyboard filename
-#. create the file selector dialog
-#: gok/gok-editor.c:966
-msgid "Save keyboard file as"
-msgstr "Sačuvajte datoteku tastature kao"
-
-#: gok/gok-editor.c:1047
+#: gok/gok-editor.c:1029
 #, c-format
 msgid ""
 "This is not a valid keyboard filename:\n"
@@ -808,7 +798,7 @@
 "Ovo nije ispravna datoteka za tastaturu:\n"
 "%s"
 
-#: gok/gok-editor.c:1077
+#: gok/gok-editor.c:1059
 msgid "(new)"
 msgstr "(novi)"
 
