+2006-08-21 Bill Haneman <bill.haneman@sun.com>
+
+ Patch section from Ginn Chen...
+
+ * cspi/spi_accessible.c:
+ (_cspi_accessible_set_from_sequence):
+ Changed g_newa to g_new0 on Ginn Chen's suggestion.
+
+ * libspi/accessible.c:
+ (impl_getAttributes): Fixed to use the AtkAttribute struct properly.
+ (spi_accessible_new): Add the Document interface if present.
+
+ * libspi/document.c:
+ (impl_getAttributes): Fixed to use AtkAttribute properly.
+
+ * libspi/text.c:
+ (impl_getAttributes, impl_getDefaultAttributes):
+ (impl_getAttributeRun): Fixed to use AtkAttribute struct properly.
+
2006-08-17 Bill Haneman <bill.haneman@sun.com>
* cspi/spi-private.h, cspi/spi_accessible.c:
int i;
set->len = seq->_length;
- set->attributes = g_newa (char *, set->len);
+ set->attributes = g_new0 (char *, set->len);
for (i = 0; i < set->len; ++i)
{
set->attributes[i] = g_strdup (seq->_buffer [i]);
CORBA_Environment *ev)
{
Accessibility_AttributeSet *retval;
- GSList *attributes;
+ AtkAttributeSet *attributes = NULL;
+ AtkAttribute *attr = NULL;
gint n_attributes = 0;
gint i;
for (i = 0; i < n_attributes; ++i)
{
- retval->_buffer[i] = CORBA_string_dup (g_slist_nth_data (attributes, i));
+ attr = g_slist_nth_data (attributes, i);
+ retval->_buffer[i] = CORBA_string_dup (g_strconcat (attr->name, ":", attr->value, NULL));
}
+
+ atk_attribute_set_free (attributes);
return retval;
}
bonobo_object_add_interface (bonobo_object (retval),
BONOBO_OBJECT (spi_streamable_interface_new (o)));
}
+ if (ATK_IS_DOCUMENT (o))
+ {
+ bonobo_object_add_interface (bonobo_object (retval),
+ BONOBO_OBJECT (spi_document_interface_new (o)));
+ }
return retval;
}
AtkDocument *document = get_document_from_servant (servant);
AtkAttributeSet *attributes = NULL;
+ AtkAttribute *attr = NULL;
Accessibility_AttributeSet *retval;
gint n_attributes = 0;
gint i;
for (i = 0; i < n_attributes; ++i)
{
- retval->_buffer[i] = CORBA_string_dup (g_slist_nth_data (attributes, i));
+ attr = g_slist_nth_data (attributes, i);
+ retval->_buffer [i] = CORBA_string_dup (g_strconcat (attr->name, ":", attr->value, NULL));
}
atk_attribute_set_free (attributes);
CORBA_Environment *ev){
AtkAttributeSet *attributes, *default_attributes = NULL;
+ AtkAttribute *attr = NULL;
gint intstart_offset, intend_offset;
Accessibility_AttributeSet *retval = NULL;
AtkText *text = get_text_from_servant (servant);
for (i = 0; i < n_attributes; ++i)
{
- retval->_buffer[i] = CORBA_string_dup (g_slist_nth_data (attributes, i));
+ attr = g_slist_nth_data (attributes, i);
+ retval->_buffer[i] = CORBA_string_dup (g_strconcat (attr->name, ":", attr->value, NULL));
}
for (j = 0; j < n_default_attributes; ++i, ++j)
{
- retval->_buffer[i] = CORBA_string_dup (g_slist_nth_data (default_attributes, j));
+ attr = g_slist_nth_data (default_attributes, i);
+ retval->_buffer[i] = CORBA_string_dup (g_strconcat (attr->name, ":", attr->value, NULL));
}
atk_attribute_set_free (attributes);
impl_getDefaultAttributeSet (PortableServer_Servant servant,
CORBA_Environment *ev){
AtkAttributeSet *attributes;
+ AtkAttribute *attr = NULL;
Accessibility_AttributeSet *retval = NULL;
AtkText *text = get_text_from_servant (servant);
gint n_attributes = 0;
for (i = 0; i < n_attributes; ++i)
{
- retval->_buffer[i] = CORBA_string_dup (g_slist_nth_data (attributes, i));
+ attr = g_slist_nth_data (attributes, i);
+ retval->_buffer [i] = CORBA_string_dup (g_strconcat (attr->name, ":", attr->value, NULL));
}
atk_attribute_set_free (attributes);
}