Bug 21224 - Accessible parent of menu items is None in gcalctool
Summary: Accessible parent of menu items is None in gcalctool
Status: RESOLVED FIXED
Alias: None
Product: at-spi2
Classification: Unclassified
Component: atk (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Rob Taylor
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-16 07:53 UTC by Willie Walker
Modified: 2009-04-29 00:27 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
foo.py test case - note the wonderful method name it uses (263 bytes, text/plain)
2009-04-16 07:53 UTC, Willie Walker
Details

Description Willie Walker 2009-04-16 07:53:04 UTC
Created attachment 24867 [details]
foo.py test case - note the wonderful method name it uses

1) ./autogen.sh --prefix=`pwd`/bld --enable-xevie=no; make; make install

2) From three different shells sitting in my at-spi2-core directory, where foo.py in (c) is the test case attached to this bug:
   a) ./bld/libexec/at-spi-registryd
   b) gcalctool --gtk-module=`pwd`/bld/lib/gtk-2.0/modules/libspiatk.so
   c) PYTHONPATH=`pwd`/bld/lib/python2.4/site-packages python foo.py

3) In gcalctool, arrow through the menu items.  You will see output from foo.py that shows the parent is None:

focus:(0, 0, 0)
	source: [radio menu item | Advanced]
	host_application: [application | gcalctool]
SOURCE [radio menu item | Advanced]
SOURCE.PARENT None

Contrast this to the AT-SPI/CORBA implementation where there is a parent (though there also seems to be a bug because the accessible name of the parent should be present -- in this case it should be "View"):

focus:(0, 0, None)
	source: [menu item | Advanced]
	host_application: [application | gcalctool]
SOURCE [radio menu item | Advanced]
SOURCE.PARENT [menu | ]

Note also that the any_data field from the AT-SPI/D-Bus implementation is "0" whereas the any_data field from the AT-SPI/CORBA implementation is "None".
Comment 1 Mark Doffman 2009-04-29 00:27:35 UTC
The problem here was that re-parenting of widgets was not working. The parent-changed signal was not attached. For whatever reason gcalctool seems to create its menus by creating them on one widget and re-parenting them to the main menu.

It has been fixed in commit: 0717858dae3a3651834ace76a8fcbef7a18e2db8.

    2009-04-22 Mark Doffman <mark.doffman@codethink.co.uk>
            Register for property-change:parent events so that
            widgets that are re-parented are properly changed in the
            heirarchy.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.