From e6196e71612e541aca3d93538dc3069c71b1752c Mon Sep 17 00:00:00 2001 From: billh Date: Fri, 9 Jun 2006 15:46:23 +0000 Subject: [PATCH] Fix for bug #339021, missing implementations for Table::nSelectedRows and Table::nSelectedColumns. git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@813 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- ChangeLog | 7 +++++++ libspi/table.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/ChangeLog b/ChangeLog index c0b0e02..1c58683 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2006-06-09 Bill Haneman + * libspi/table.c: + (impl_get_nSelectedRows, impl_get_nSelectedColumns): + New, missing implementations of attribute reading methods + in epv. Bug #339021. + +2006-06-09 Bill Haneman + * idl/Accessibility_State.idl: Added STATE_VISITED (bug #338369). diff --git a/libspi/table.c b/libspi/table.c index faac228..2c834cb 100644 --- a/libspi/table.c +++ b/libspi/table.c @@ -269,6 +269,36 @@ impl_getColumnHeader (PortableServer_Servant servant, return spi_accessible_new_return (header, FALSE, ev); } +static CORBA_long +impl__get_nSelectedRows (PortableServer_Servant servant, + CORBA_Environment *ev) +{ + gint *selectedRows = NULL; + gint retval = 0; + AtkTable *table = get_table_from_servant (servant); + + bonobo_return_val_if_fail (table != NULL, 0, ev); + + retval = atk_table_get_selected_rows (table, &selectedRows); + if (selectedRows) g_free (selectedRows); + return retval; +} + + +static CORBA_long +impl__get_nSelectedColumns (PortableServer_Servant servant, + CORBA_Environment *ev) +{ + gint *selectedColumns = NULL; + gint retval = 0; + AtkTable *table = get_table_from_servant (servant); + + bonobo_return_val_if_fail (table != NULL, 0, ev); + + retval = atk_table_get_selected_columns (table, &selectedColumns); + if (selectedColumns) g_free (selectedColumns); + return retval; +} static Accessibility_LongSeq * impl_getSelectedRows (PortableServer_Servant servant, @@ -433,6 +463,8 @@ spi_table_class_init (SpiTableClass *klass) epv->_get_summary = impl__get_summary; epv->_get_nRows = impl__get_nRows; epv->_get_nColumns = impl__get_nColumns; + epv->_get_nSelectedRows = impl__get_nSelectedRows; + epv->_get_nSelectedColumns = impl__get_nSelectedColumns; epv->getAccessibleAt = impl_getAccessibleAt; epv->getIndexAt = impl_getIndexAt; epv->getRowAtIndex = impl_getRowAtIndex; -- 2.7.4