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 141437 - GOK UI Grab to Swing combo-boxes fails
GOK UI Grab to Swing combo-boxes fails
Status: RESOLVED NOTGNOME
Product: gok
Classification: Deprecated
Component: general
unspecified
Other Linux
: High normal
: ---
Assigned To: bill.haneman
bill.haneman
AP3
Depends on:
Blocks: 117582
 
 
Reported: 2004-04-29 21:48 UTC by korn
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to display ComboBox items for Swing apps (703 bytes, patch)
2004-05-14 15:35 UTC, padraig.obriain
needs-work Details | Review
patch to check for ROLE_LIST and return it as the list container; and use selection interface when SELECTABLE is available. (2.21 KB, patch)
2004-10-26 19:54 UTC, bill.haneman
committed Details | Review

Description korn 2004-04-29 21:48:58 UTC
1. Launch SwingSet2 with GOK running
2. Switch to the ComboBox panel
3. Select UI Grab
4. See "Philip", "Howard", and "Jeff" combo boxes, which appear on the GOK UI
Grab keyboard.  Selecting them from the UI Grab keyboard does nothing [BUG]
---
5. Launch gedit
6. Choose File->Open
7. Select UI Grab
8. See "All Files" and "Auto Detected" combo boxes, which appear on the GOK UI
Grab keyboard.  Selecting them from the UI Grab keyboard does nothing [BUG]
--
9. Still in gedit, choose Edit->Preferences
10. Choose Syntax Highlighting tab
11. Select UI Grab
12. See "Verilog" combo box, which appears on the GOK UI Grab keyboard. 
Selectign it DOES bring up a GOK Menu keyboard with the contents of that combo
box, and selecting an item (e.g. "HTML") is successful [no bug]
Comment 1 padraig.obriain 2004-04-30 07:53:29 UTC
The example which works is a GtkOptionMenu. The two which do not are
GtkComboBox. I am closing as a duplicate of bug #136657.

*** This bug has been marked as a duplicate of 136657 ***
Comment 2 korn 2004-04-30 16:46:21 UTC
Just a moment please - this bug notes problems in both GtkComboBox (a gail
issue) and in Swing (perhaps a gnome-java-bridge issue; hopefully not a Swing
issue).  We should either re-title this bug to focus on the Java issue, or I can
open a new one.  But let's please not loose the Java issue.
Comment 3 padraig.obriain 2004-05-04 09:23:29 UTC
Sorry about that. I have missed the Java problem.

I do not know enough about gok to know what it is attempting to do here. What
should gok do when the combo box is selected from the gok keyboard?
Comment 4 korn 2004-05-04 16:29:08 UTC
It should behave just as it does when selecting a standard menu (e.g. GOK->Menus
brings up a keyboard listing the menus of the app; choose File and get a
keyboard of the file menu items).  So selecting a non-editable combo box should
likewise display a keyboard with the menu items.  When it is an editable combo
box (where the user can type in an entry as well), then I believe the user
should see an intermediate keyboard with two options - one would lead to the
compose keyboard and the other to the menu keyboard).  I leave it to Bill and/or
David to confirm this latter situation.
Comment 5 padraig.obriain 2004-05-04 16:37:10 UTC
What I am trying to get at is what at-spi call behaves differently when Java's
combo box is not activated compared with when a combo-box is activated.
Comment 6 padraig.obriain 2004-05-14 13:47:36 UTC
I have found that gok_spy_get_list_parent() returns NULL for Swing's ComboBox.
I will dig further.

I needed to fix bug #141537 as a recent change in gok requires it.
Comment 7 padraig.obriain 2004-05-14 14:47:54 UTC
The problem seems to be that the children of the list have role LABEL. This
explains why the combo box list items are not being displayed.
Comment 8 padraig.obriain 2004-05-14 15:35:29 UTC
Created attachment 27704 [details] [review]
Patch to display ComboBox items for Swing apps

The reason that choosing a ComboBox item does not work is that gok calls
AccessibleAction_doAction() to do it and as the object in question has role
LABEL it does not implement AccessibleAction.
Comment 9 David Bolter 2004-05-14 15:41:42 UTC
Nice one.  Looks safe.  If tests okay please commit.
Comment 10 padraig.obriain 2004-05-14 15:49:15 UTC
The problem is that this patch does not fix the problem. It just allows the
ComboBox items to be shown on the keyboard. Fixing the problem looks too
difficult to me on a Friday afternoon.
Comment 11 bill.haneman 2004-05-14 16:21:25 UTC
I am not 100% sure about the patch, as ROLE_LABEL combo items seem pretty
strange to me.  If we get a combo-box-like object in future that has both list
items and some sort of labelling widgets, this patch would cause trouble as it
would result in the labels being included in the list of active items.

Comment 12 David Bolter 2004-05-14 19:54:18 UTC
Bill, perhaps that case could be deterred by the HIG?
Comment 13 bill.haneman 2004-05-17 15:01:40 UTC
David: I am thinking about future combo-widget types, which would be presumably
approved by the GNOME ui folks.  I don't think the HIG would necessarily accept
a guideline from us saying "combo boxes must not have non-list children".
Comment 14 David Bolter 2004-05-17 15:05:16 UTC
OK.  (-- and I wouldn't want to have to rely on folks following the HIG anyways)

Agreed.
Comment 15 David Bolter 2004-05-27 19:33:24 UTC
Where are we with this?

Bill, can we live with the ROLE_LABEL combo items?  I'm thinking we should ask
Padraig to apply his patch and worry about that possible strangeness if/when it
appears...

So my vote is to apply (at this time).
Comment 16 padraig.obriain 2004-05-28 08:33:08 UTC
As I noted above my patch does not fix the problem. It allows the items in the
ComboBox to be displayed but they do not implement AccessibleAction so they
cannot be activated.
Comment 17 David Bolter 2004-05-28 13:47:57 UTC
OK, can someone try at-poke on the swing combobox items to see if they can be
activated?
Comment 18 padraig.obriain 2004-05-28 15:16:08 UTC
In Swing the comboxbox items do not support AcessibleAction.
Comment 19 David Bolter 2004-05-28 15:19:19 UTC
So we need your patch + plus a Swing bug fix?  Is there a bug filed?
Comment 20 David Bolter 2004-05-28 15:48:16 UTC
Or should we be operating at the parent, combo-box level?  Perhaps making use of:
http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JComboBox.html#setSelectedIndex(int)

(indirectly of course)

??
Comment 21 bill.haneman 2004-07-20 18:03:25 UTC
The problem needs to be addressed in the JComboBox accessibility implementation.
 Closing as NOTGNOME (bug bugtraq bug needs to be filed; Peter will you do that
please?)
Comment 22 korn 2004-07-20 18:51:05 UTC
There may be JComboBox bugs here, but J2SDK 1.5 (aka J2SDK 5.0) is frozen, and
this is likely an API change that would have to wait for J2SDK 6.0 in ~2 years'
time.  The reason these objects have role LABEL is because that's what they are
generally, unless they are checkboxes or radio buttons or other wierd things
(which are allowed in menus), in which case that is the kind of thing they are.
 Given the Swing idioms, I don't think that should change.

We implemented the AccessibleSelection interface on JComboBoxes, and if that
interface fails (it seems to with at-poke and J2SDK 1.4.2), then that's a bug we
can fix without an API change.

Can GOK use the AccessibleSelection interface in this instance?
Comment 23 bill.haneman 2004-07-21 14:12:55 UTC
AccessibleSelection should work for us; reopening.  It's not clear why GOK isn't
already succeeding with AccessibleSelection, since it does attempt to expose
selectable items in UI Grab.
Comment 24 Calum Benson 2004-10-21 16:45:09 UTC
Apologies for spam-- ensuring Sun a11y team are cc'ed on all current a11y bugs.
 Filter on "SUN A11Y SPAM" to ignore.
Comment 25 bill.haneman 2004-10-26 19:46:05 UTC
I have a partial fix.  However there seems to be an underlying Swing bug that
prevents it from fully working; it only works if the combobox is first manually
popped down.  Otherwise, though the combobox's list children are now found be
GOK and selected, the selection-call on the parent list seems to have no effect
on the comboboxes.  If the combobox list is popped down, then the GOK select
action works fine.
Comment 26 bill.haneman 2004-10-26 19:48:02 UTC
Comment on attachment 27704 [details] [review]
Patch to display ComboBox items for Swing apps

I don't like the addition of LABEL roles here, I believe it will break stuff. 
It also doesn't fully fix the bug.
Comment 27 bill.haneman 2004-10-26 19:54:21 UTC
Created attachment 33090 [details] [review]
patch to check for ROLE_LIST and return it as the list container; and use selection interface when SELECTABLE is available.
Comment 28 bill.haneman 2004-10-26 19:55:52 UTC
Note that this patch only works when combos are posted before
activating/selecting the list child.  The remaining bug is NOTGNOME.

I don't see a nice workaround either - synthesizing a spacebar event would be
very nasty, and it would have to be toolkit-specific as well.
Comment 29 David Bolter 2004-10-26 20:26:30 UTC
The patch reads okay.  Will you be posting the NOTGNOME remainder bug somewhere?

The key style checking is a bit messy but should work.
Comment 30 bill.haneman 2004-11-10 21:35:36 UTC
marking this bug NOTGNOME as the rest of the problem is outside our control. 
But the Gok-related problems are now fixed.