After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 326540 - Enhance Accessibility::Text
Enhance Accessibility::Text
Status: RESOLVED FIXED
Product: at-spi
Classification: Platform
Component: api
1.6.x
Other All
: Normal enhancement
: ---
Assigned To: Ariel Rios
bill.haneman
Depends on:
Blocks: 318223
 
 
Reported: 2006-01-10 22:26 UTC by George Kraft IV
Modified: 2006-07-19 10:23 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Work on text.c and spi_text.c (3.15 KB, patch)
2006-07-10 19:58 UTC, Ariel Rios
none Details | Review
cspi bindigs (6.77 KB, patch)
2006-07-10 20:00 UTC, Ariel Rios
needs-work Details | Review
Modification to text idl (23.40 KB, patch)
2006-07-10 20:03 UTC, Ariel Rios
none Details | Review
The Changelog (1.05 KB, patch)
2006-07-10 20:09 UTC, Ariel Rios
none Details | Review
revised patch for cspi (4.64 KB, patch)
2006-07-12 11:59 UTC, bill.haneman
none Details | Review
patch to incorporate all of the above changes for Accessibility::Text enhancements (16.98 KB, patch)
2006-07-12 14:11 UTC, bill.haneman
committed Details | Review

Description George Kraft IV 2006-01-10 22:26:03 UTC
Enhance Accessibility::Text per http://gnome.org/%7Ebillh/at-spi-new-idl/html/html/ 

area: atk bridge

Some Text methods not marked as new will be deprecated.

Target Gnome 2.16 by the end of Jul 2006.
Comment 1 bill.haneman 2006-01-17 16:09:36 UTC
added Text::getAttributeValue to at-spi-1.7.0.  More Text changes are anticipated in at-spi 1.8.0.
Comment 2 George Kraft IV 2006-01-25 22:24:03 UTC
Should this bug be closed and another targeted for at-spi-1.8.0 be created?  What features will be added in the next release?
Comment 3 Calum Benson 2006-04-26 17:05:18 UTC
Apologies for spam... ensuring Sun a11y folks are cc'ed on all current accessibility bugs.
Comment 4 bill.haneman 2006-06-29 15:52:52 UTC
Ariel - this one might also be a good one for the 2.16 target.  I'd leave EditableText enhancements for 2.17/2.18.  

If you don't have time, please reassign it to me, no problem.
Comment 5 Ariel Rios 2006-06-29 15:56:38 UTC
Ok. For next bugs you reassign I will not answer yes. Only if I can't or don't want it I reassign to you.
Comment 6 Ariel Rios 2006-07-10 19:58:05 UTC
Created attachment 68743 [details] [review]
Work on text.c and spi_text.c

Bill,

Here's is work for this bug. I Still have doubt on how to use the flag includeDefaults on impl_getAttributeRun method implementation. If you told me what does it mean I can go and write whatever is needed or maybe is so simple you can do that for me. This patch includes also a fix on spi_private.h that add a prototype and correct another.

ariel
Comment 7 Ariel Rios 2006-07-10 20:00:31 UTC
Created attachment 68745 [details] [review]
cspi bindigs

Bill,

Here's is work for this bug. I Still have doubt on how to use the flag includeDefaults on impl_getAttributeRun method implementation. If you told me what does it mean I can go and write whatever is needed or maybe is so simple you can do that for me. This patch includes also a fix on spi_private.h that add a prototype and correct another.

ariel
Comment 8 Ariel Rios 2006-07-10 20:03:02 UTC
Created attachment 68746 [details] [review]
Modification to text idl

I used this modification to Accessible_Text.c but you prolly want to put it right. Still I attache it here
Comment 9 Ariel Rios 2006-07-10 20:09:53 UTC
Created attachment 68747 [details] [review]
The Changelog

I know. It might be better if I only send a patch but my local tree has work for like 4 different bugs.

+2006-07-05  Ariel Rios  <arios@us.ibm.com>
+
+       * cspi/bonobo/cspi-bonobo.c: Remove warning adding <cspi/spi-private.h>
+
+       * cspi/spi_text.c: (AccessibleText_getAttributeRun, AccessibleText_getDefaultAttributes):
+       New bindings for new emthods defined in idl and libspi.
+
+       * cspi/spi.h: (AccessibleText_getAttributeRun, AccessibleText_getDefaultAttributes):
+       Added prototype functions.
+
+
+       * libspi/text.c: (impl_getAttributeRun,
+       impl_getDefaultAttributeSet): New method implementation
+       Bug #326520
+       (spi_text_class_init): Added previous methods.
+
+       * libspi/spi.h:  (impl_getAttributeRun,
+       impl_getDefaultAttributeSet): Added prototypes
+
+       *libspi/spi-private.h: Corrections.
+
Comment 10 bill.haneman 2006-07-12 11:20:24 UTC
Comment on attachment 68746 [details] [review]
Modification to text idl

Ariel, you removed the comments from the new API.  The new methods can't be added without the docs/comments.
You are right, patches are better.  Please submit changes as patches (preferably a single patch!) in future.  Thanks!
I'll commit my own version of the new IDL today.
Comment 11 bill.haneman 2006-07-12 11:39:37 UTC
Comment on attachment 68743 [details] [review]
Work on text.c and spi_text.c

>Index: text.c
>===================================================================
>RCS file: /cvs/gnome/at-spi/libspi/text.c,v
>retrieving revision 1.24
>diff -u -r1.24 text.c
>--- text.c	16 Jan 2006 14:16:44 -0000	1.24
>+++ text.c	10 Jul 2006 19:42:39 -0000
>@@ -27,6 +27,7 @@
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
>+#include <bonobo/bonobo-exception.h>

Hmm, not sure including bonobo-exception here is a good idea, given the "deprecation imminent" status.  Perhaps we should replace the bonobo_return_... method with something else, below.

> #include <atk/atktext.h>
> #include <libspi/text.h>
> #include <libspi/spi-private.h>
>@@ -255,7 +256,7 @@
> }
> 
>+static Accessibility_AttributeSet *	
>+impl_getAttributeRun (PortableServer_Servant servant,		   
>+		      const CORBA_long offset, 
>+		      CORBA_long *startOffset, CORBA_long *endOffset, 
>+		      const CORBA_boolean includeDefaults, 
>+		      CORBA_Environment *ev){
>+		      
>+     AtkAttributeSet *attributes;
>+     gint intstart_offset, intend_offset;
>+     Accessibility_AttributeSet *retval;
>+     AtkText *text = get_text_from_servant (servant);
>+     gint n_attributes = 0;
>+     gint i;
>+     
>+     g_return_val_if_fail (text != NULL, NULL);
>+
>+     attributes = atk_text_get_run_attributes (text, offset,
>+					       &intstart_offset, &intend_offset);

If includeDefaults is TRUE, then we should also append the atk_text_get_default_attributes() here, for attribute names that aren't specified in the above set.

Otherwise this lookd good.
Comment 12 bill.haneman 2006-07-12 11:45:40 UTC
Comment on attachment 68745 [details] [review]
cspi bindigs

the patch includes changes to AccessibleTable, which it should not.
Ariel, I recommend working on these bugs in separate workspaces.
Comment 13 bill.haneman 2006-07-12 11:59:20 UTC
Created attachment 68808 [details] [review]
revised patch for cspi
Comment 14 bill.haneman 2006-07-12 14:11:30 UTC
Created attachment 68816 [details] [review]
patch to incorporate all of the above changes for Accessibility::Text enhancements