Merge lp://qastaging/~rodrigo-moya/unity/sync-geometries into lp://qastaging/unity

Proposed by Rodrigo Moya
Status: Merged
Approved by: Rodrigo Moya
Approved revision: no longer in the source branch.
Merged at revision: 965
Proposed branch: lp://qastaging/~rodrigo-moya/unity/sync-geometries
Merge into: lp://qastaging/unity
Diff against target: 962 lines (+414/-100)
16 files modified
po/unity.pot (+0/-69)
services/CMakeLists.txt (+25/-15)
services/panel-a11y.c (+6/-0)
services/panel-indicator-accessible.c (+111/-4)
services/panel-indicator-entry-accessible.c (+85/-7)
services/panel-main.c (+31/-3)
services/panel-marshal.list (+1/-0)
services/panel-service.c (+28/-0)
services/panel-service.h (+7/-0)
src/IndicatorObjectFactory.h (+1/-0)
src/IndicatorObjectFactoryRemote.cpp (+3/-0)
src/PanelIndicatorObjectView.cpp (+2/-1)
src/PanelIndicatorObjectView.h (+1/-1)
src/PanelView.cpp (+101/-0)
src/PanelView.h (+3/-0)
tests/CMakeLists.txt (+9/-0)
To merge this branch: bzr merge lp://qastaging/~rodrigo-moya/unity/sync-geometries
Reviewer Review Type Date Requested Status
Rodrigo Moya (community) Approve
Neil J. Patel (community) Approve
Alejandro Piñeiro (community) Approve
Review via email: mp+51929@code.qastaging.launchpad.net

Description of the change

Sync geometries of the indicators from unity to the panel service, so that that information can be used to implement AtkComponent for both PanelIndicatorAccessible and PanelIndicatorEntryAccessible

To post a comment you must log in.
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Note that there's something wrong with the geometries, and not all indicator objects/entries get highlighted in the correct position when selected in accerciser

Revision history for this message
Alejandro Piñeiro (apinheiro) wrote :

I have tested it with accerciser, and about this comment:
"Note that there's something wrong with the geometries, and not all indicator objects/entries get highlighted in the correct position when selected in accerciser"

I only got one indicator object/entry having the proper position.

About the code, in general seems good, although it would be required a review of the non accessibility related code (the methods and signals used by the AtkComponent implementation) except in one detail:

149 +panel_indicator_accessible_get_extents (AtkComponent *component,
150 + gint *x,
151 + gint *y,
152 + gint *width,
153 + gint *height,
154 + AtkCoordType coord_type)

309 +panel_indicator_entry_accessible_get_extents (AtkComponent *component,
310 + gint *x,
311 + gint *y,
312 + gint *width,
313 + gint *height,
314 + AtkCoordType coord_type)

You don't check coord_type at all. Take into account that the data that you return are totally different depending on coord_type. As far as I see, in both cases you try to return the result assuming global screen positions (ATK_XY_SCREEN), so it is missing the ATK_XY_WINDOW

In the same way, taking into account that you are already using the signal geometries_changed, I think that it would be easy to also emit the signal "bounds-changed":

http://library.gnome.org/devel/atk/stable/AtkComponent.html#AtkComponent-bounds-changed

BTW, about the signals. Each time that you receive this signal the size is updated, but, what happen with the initial state? Initially this is set to zero. That means that if the indicators/entry has already his position/size set before the accessible object is created, it will have a wrong position/size value? (as it is not updated by the signal)?

review: Needs Fixing
Revision history for this message
Alejandro Piñeiro (apinheiro) wrote :

BTW, although we already commented that via IRC, just to comment that the gen-marshal addition on cmake seems to not work properly, as I needed to execute it by hand.

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

All issues fixed, so please review again

Revision history for this message
Alejandro Piñeiro (apinheiro) wrote :

519 + root = atk_get_root ();
520 +
521 gtk_main ();

This get_root could mean a crash if the a11y is not enabled. So options:

a) Add a method on panel-a11y to check if the accessibility is enabled.
b) Move this call inside panel_a11y_init. As it is required that the service is created to this root, that would mean move panel_a11y_init to the line of this atk_get_root

review: Needs Fixing
Revision history for this message
Alejandro Piñeiro (apinheiro) wrote :

Code seems ok, and I tested it and the position is more accurate.

Anyway:

 * Be careful with the .pot file included on this branch
 * I'm not used to cmake and you modify non-a11y related code, so it would be good to have a second opinion here

review: Approve
Revision history for this message
Neil J. Patel (njpatel) wrote :

Looks good, approved.

review: Approve
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Neil gave his +1 on irc

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.