GNOME Bugzilla – Bug 363807
Orca should report the quantity of items in a table
Last modified: 2006-10-22 19:40:37 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)
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.
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!!
Created attachment 75144 [details] [review] Patch to hopefully implement this enhancement.
Changes checked into CVS HEAD (sans the line of debug). Closing as FIXED.
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)
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!
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.
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.
I missed the "sans the line of debug" comment. Sorry about that.
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.