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 363807 - Orca should report the quantity of items in a table
Orca should report the quantity of items in a table
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Rich Burridge
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-10-21 01:43 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2006-10-22 19:40 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Patch to hopefully implement this enhancement. (989 bytes, patch)
2006-10-21 17:58 UTC, Rich Burridge
none Details | Review

Description Joanmarie Diggs (IRC: joanie) 2006-10-21 01:43:12 UTC
Orca now reports the number of items in a menu/submenu when you use whereAmI (http://bugzilla.gnome.org/show_bug.cgi?id=339789).  This functionality should be extended to items in a table.

(Suggested at Boston Orca users group)
Comment 1 Rich Burridge 2006-10-21 02:02:09 UTC
What exactly are we looking for here? 

Something like:

... blah blah blah ...
"Row 5 of 15 rows"
"Column 2 of 4 columns"

?


B.t.w. it looks like whereAmI() in default.py is broken
w.r.t. table cells. I tried it with the ListStore example
in gtk-demo and it reported:

SPEECH OUTPUT: 'gtk-demo application GtkListStore demo frame table'
SPEECH OUTPUT: 'Severity column header'
SPEECH OUTPUT: 'Major'

when I was in the table, about four rows down and two columns across.
Comment 2 Joanmarie Diggs (IRC: joanie) 2006-10-21 02:19:52 UTC
Looking at my notes from the meeting, we're looking for just the "row 5 of 15 rows" bit -- I'd offer "item 5 of 15" to be consist with what's already been implemented.

I *believe* this RFE is the result of Will being in an Open dialog box and navigating in a table that contained a list of files.  In other words, if you're on myFile.odt, how many files are in the list and where are you with respect to the entire list?

HTH and thanks!! 
Comment 3 Rich Burridge 2006-10-21 17:58:41 UTC
Created attachment 75144 [details] [review]
Patch to hopefully implement this enhancement.
Comment 4 Rich Burridge 2006-10-21 18:01:52 UTC
Changes checked into CVS HEAD (sans the line of debug).
Closing as FIXED.
Comment 5 Joanmarie Diggs (IRC: joanie) 2006-10-22 05:03:33 UTC
Hi Rich.  Thanks (again) for doing these so quickly!

Seems that in "item x of y", the range of x is currently 0 through y-1.  Thus, if you're on the first of six items, Orca reports that you are on item 0 of 6.  When you're on the sixth item in that same list, it reports that you are on item 5 of 6. (To reproduce, try it in the Files table of the Gedit Open dialog)
Comment 6 Rich Burridge 2006-10-22 15:36:36 UTC
Yup. Easy fix.

Index: default.py
===================================================================
RCS file: /cvs/gnome/orca/src/orca/default.py,v
retrieving revision 1.226
diff -u -r1.226 default.py
--- default.py  21 Oct 2006 19:54:47 -0000      1.226
+++ default.py  22 Oct 2006 15:34:49 -0000
@@ -1135,7 +1135,7 @@
                                         rolenames.ROLE_COLUMN_HEADER].speech
                         utterances.append(text)

-                text = _("Item ") + str(row) + _(" of ") + \
+                text = _("Item ") + str(row+1) + _(" of ") + \
                        str(parent.table.nRows)
                 utterances.append(text)

Change checked into CVS HEAD. Thanks!
Comment 7 Willie Walker 2006-10-22 18:10:23 UTC
Minor nits:

A "print" statement looks like it made it into the patch.

Something like _("Item %d of %d") % (str(row), str(parent.table.nRows)) might be a little more localizable.
Comment 8 Rich Burridge 2006-10-22 19:30:31 UTC
And it made it out again (see "sans the line of debug")
in comment #4. Or is there another print statement you are referring too?
I'll tweak the code per your suggestion in a few minutes.
Thanks.
Comment 9 Willie Walker 2006-10-22 19:32:34 UTC
I missed the "sans the line of debug" comment.  Sorry about that.
Comment 10 Rich Burridge 2006-10-22 19:40:37 UTC
No problem.

Actual change just made is:

Index: default.py
===================================================================
RCS file: /cvs/gnome/orca/src/orca/default.py,v
retrieving revision 1.227
diff -u -r1.227 default.py
--- default.py  22 Oct 2006 15:35:25 -0000      1.227
+++ default.py  22 Oct 2006 19:36:16 -0000
@@ -1135,8 +1135,7 @@
                                         rolenames.ROLE_COLUMN_HEADER].speech
                         utterances.append(text)

-                text = _("Item ") + str(row+1) + _(" of ") + \
-                       str(parent.table.nRows)
+                text = _("Item %d of %d") % ((row+1), parent.table.nRows)
                 utterances.append(text)

Change checked into CVS HEAD.