? gnopernicus/intltool-modules
? gnopernicus/modif
Index: gnopernicus/srcore/default.xml.in
===================================================================
RCS file: /cvs/gnome/gnopernicus/srcore/default.xml.in,v
retrieving revision 1.13
diff -u -r1.13 default.xml.in
--- gnopernicus/srcore/default.xml.in	8 Apr 2004 10:37:32 -0000	1.13
+++ gnopernicus/srcore/default.xml.in	21 May 2004 08:52:34 -0000
@@ -735,7 +735,7 @@
         </event>
       </role>
       <role name="page-tab">
-        <event name="generic">
+         <event name="focus:">
           <attribute type="string" voice="name">name</attribute>
           <attribute type="string" voice="role">role</attribute>
           <conditional type="string" condition="shortcut" voice="system">
@@ -746,7 +746,15 @@
           </conditional>
           <attribute type="string" voice="shortcut">shortcut</attribute>
         </event>
-      </role>
+	<event name="object:tab-added">
+	    <_literal voice="system">create tab</_literal>
+	    <attribute type="string" voice="name">name</attribute>
+	</event>
+	<event name="object:tab-removed">
+	    <_literal voice="system">closing tab</_literal>
+	    <attribute type="string" voice="name">name</attribute>
+	</event>
+      </role> 
       <role name="popup-menu">
         <event name="generic">
           <attribute type="string" voice="name">name</attribute>
Index: gnopernicus/srlow/libsrlow/SRLow.c
===================================================================
RCS file: /cvs/gnome/gnopernicus/srlow/libsrlow/SRLow.c,v
retrieving revision 1.89
diff -u -r1.89 SRLow.c
--- gnopernicus/srlow/libsrlow/SRLow.c	28 Apr 2004 13:42:07 -0000	1.89
+++ gnopernicus/srlow/libsrlow/SRLow.c	21 May 2004 08:52:43 -0000
@@ -69,6 +69,10 @@
 #define SRL_EVENT_NAME_ACTIVE_DESCENDANT_CHANGED "object:active-descendant-changed"
 #define SRL_EVENT_NAME_NAME_CHANGED		"object:property-change:accessible-name"
 #define SRL_EVENT_NAME_VISIBLE_DATA_CHANGED	"object:visible-data-changed"
+#define SRL_EVENT_NAME_CHILDREN_ADDED           "object:children-changed:add"
+#define SRL_EVENT_NAME_CHILDREN_REMOVED         "object:children-changed:remove"
+#define SRL_EVENT_NAME_TAB_ADDED                "object:tab-added"
+#define SRL_EVENT_NAME_TAB_REMOVED              "object:tab-removed"
 
 #define SRL_TOOLKIT_MOZILLA			"mozilla"
 #define SRL_APP_METACITY			"metacity"
@@ -107,6 +111,12 @@
     SRL_EVENT_ACTIVE_DESCENDANT_CHANGED,
     SRL_EVENT_NAME_CHANGED,
     SRL_EVENT_VISIBLE_DATA_CHANGED,
+    SRL_EVENT_CHILDREN_ADDED,
+    SRL_EVENT_CHILDREN_REMOVED,
+    SRL_EVENT_TAB_ADDED,
+    SRL_EVENT_TAB_REMOVED,
+    
+
     SRL_EVENT_WINDOW_RENAME
 }SRLEventType;
 
@@ -150,7 +160,11 @@
 	{SRL_EVENT_MOUSE_ABS,			SRL_EVENT_NAME_MOUSE_ABS},
 	{SRL_EVENT_ACTIVE_DESCENDANT_CHANGED, 	SRL_EVENT_NAME_ACTIVE_DESCENDANT_CHANGED},
 	{SRL_EVENT_NAME_CHANGED,		SRL_EVENT_NAME_NAME_CHANGED},
-	{SRL_EVENT_VISIBLE_DATA_CHANGED,	SRL_EVENT_NAME_VISIBLE_DATA_CHANGED}
+	{SRL_EVENT_VISIBLE_DATA_CHANGED,	SRL_EVENT_NAME_VISIBLE_DATA_CHANGED},
+	{SRL_EVENT_CHILDREN_ADDED,              SRL_EVENT_NAME_CHILDREN_ADDED},
+	{SRL_EVENT_CHILDREN_REMOVED,            SRL_EVENT_NAME_CHILDREN_REMOVED},
+	{SRL_EVENT_TAB_ADDED,                   SRL_EVENT_NAME_TAB_ADDED},
+	{SRL_EVENT_TAB_REMOVED,                 SRL_EVENT_NAME_TAB_REMOVED}
     };
 
 typedef struct _SRLEvent
@@ -633,6 +647,11 @@
     {
 	event->acc = AccessibleActiveDescendantChangedEvent_getActiveDescendant (event->acc_ev);
     }
+    if (srle_has_type (event, SRL_EVENT_CHILDREN_ADDED) ||
+        srle_has_type (event, SRL_EVENT_CHILDREN_REMOVED))
+    {
+	event->acc = AccessibleChildChangedEvent_getChildAccessible (event->acc_ev);
+    }	
     if (srle_has_type (event, SRL_EVENT_LINK_SELECTED))
     {
 	if (srl_acc_has_toolkit (srle_get_acc (event), SRL_TOOLKIT_MOZILLA))
@@ -663,11 +682,16 @@
 
     srl_assert (event);
 
+    if (srle_has_type (event, SRL_EVENT_CHILDREN_ADDED))
+	return SRL_EVENT_NAME_TAB_ADDED;
+    if (srle_has_type (event, SRL_EVENT_CHILDREN_REMOVED))
+	return SRL_EVENT_NAME_TAB_REMOVED;		
+	
     if (srle_has_type (event, SRL_EVENT_SELECTION_CHANGED) &&
 	srle_acc_has_role (event, SPI_ROLE_COMBO_BOX))
 	return SRL_EVENT_NAME_CONTENT_CHANGED;
     if (srle_has_type (event, SRL_EVENT_WINDOW_ACTIVATE))
-	return SRL_EVENT_NAME_WINDOW_SWITCH;
+	return SRL_EVENT_NAME_WINDOW_SWITCH;		
 
     for (i = 0; i < G_N_ELEMENTS (srl_events_type_name); i++)
     	if (srle_has_type (event, srl_events_type_name[i].type))
@@ -708,7 +732,9 @@
 	    event->type == SRL_EVENT_WINDOW_ACTIVATE ||
 	    event->type == SRL_EVENT_WINDOW_TITLELIZE||
 	    event->type == SRL_EVENT_WINDOW_DEACTIVATE ||
-	    event->type == SRL_EVENT_WINDOW_RENAME;
+	    event->type == SRL_EVENT_WINDOW_RENAME ||
+	    event->type == SRL_EVENT_CHILDREN_ADDED ||
+	    event->type == SRL_EVENT_CHILDREN_REMOVED;
 }
 
 static gboolean
@@ -1550,7 +1576,39 @@
     
     if (srle_acc_has_role (event, SPI_ROLE_EDITBAR))
 	rv = TRUE;
-
+    
+    /*made the traversal in order to receive
+     "object:children-change:add" and "object:children-change:remove"
+     events for SPI_ROLE_PAGE_TAB_LIST objects
+     */
+    if (srle_has_type (event, SRL_EVENT_FOCUS) && 
+        srle_acc_has_role (event, SPI_ROLE_TERMINAL))
+    {
+	gint childrencnt = 0;		
+        Accessible *parent = Accessible_getParent (event->acc_ev->source);
+	Accessible *child = NULL;
+	
+        while (Accessible_getRole (parent) != SPI_ROLE_PAGE_TAB_LIST)
+	    parent = Accessible_getParent (parent);
+	
+	if (parent)
+	{   
+	    gint i;
+	    childrencnt = Accessible_getChildCount (parent);
+	    for (i = 0; i < childrencnt; i++)
+	    {
+		child = Accessible_getChildAtIndex (parent, i);
+	    }
+	    
+	    if (child)
+		Accessible_unref (child);
+	    Accessible_unref (parent);	
+	}
+    }
+    if ((srle_has_type (event, SRL_EVENT_CHILDREN_ADDED) || 
+         srle_has_type (event, SRL_EVENT_CHILDREN_REMOVED))) 
+	rv = srle_acc_has_role (event, SPI_ROLE_PAGE_TAB);
+	
     return rv;
 }
 
