Merge lp:~stolowski/unity-2d/shell-accessible-names into lp:unity-2d

Proposed by Paweł Stołowski
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 1050
Merged at revision: 1051
Proposed branch: lp:~stolowski/unity-2d/shell-accessible-names
Merge into: lp:unity-2d
Diff against target: 66 lines (+20/-4)
3 files modified
libunity-2d-private/src/unity2dapplication.cpp (+6/-3)
shell/Shell.qml (+14/-0)
shell/app/shellmanager.cpp (+0/-1)
To merge this branch: bzr merge lp:~stolowski/unity-2d/shell-accessible-names
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
Review via email: mp+101119@code.launchpad.net

Commit message

[a11y] Report correct names of root shell elements to accessibility stack, instead of just "Shell".

Description of the change

UNBLOCK

To post a comment you must log in.
Revision history for this message
Albert Astals Cid (aacid) wrote :

Looks good, works as well :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libunity-2d-private/src/unity2dapplication.cpp'
--- libunity-2d-private/src/unity2dapplication.cpp 2012-01-23 10:31:52 +0000
+++ libunity-2d-private/src/unity2dapplication.cpp 2012-04-06 15:28:20 +0000
@@ -109,11 +109,14 @@
109 return false;109 return false;
110}110}
111111
112QAccessibleInterface *panelFactory(const QString &classname, QObject *object)112QAccessibleInterface *accessibilityFactory(const QString &classname, QObject *object)
113{113{
114 QAccessibleInterface *interface = 0;114 QAccessibleInterface *interface = 0;
115115
116 if (classname == "Unity2dPanel" && object && object->isWidgetType()) {116 if (classname == "ShellDeclarativeView" && object && object->isWidgetType()) {
117 interface = new QAccessibleWidget(static_cast<QWidget *>(object), QAccessible::Pane);
118 }
119 else if (classname == "Unity2dPanel" && object && object->isWidgetType()) {
117 interface = new QAccessibleWidget(static_cast<QWidget *>(object), QAccessible::ToolBar);120 interface = new QAccessibleWidget(static_cast<QWidget *>(object), QAccessible::ToolBar);
118 }121 }
119122
@@ -179,7 +182,7 @@
179 qputenv("GSETTINGS_SCHEMA_DIR", unity2dDirectory().toLocal8Bit() + "/data");182 qputenv("GSETTINGS_SCHEMA_DIR", unity2dDirectory().toLocal8Bit() + "/data");
180 }183 }
181184
182 QAccessible::installFactory(panelFactory);185 QAccessible::installFactory(accessibilityFactory);
183}186}
184187
185Unity2dApplication::~Unity2dApplication()188Unity2dApplication::~Unity2dApplication()
186189
=== modified file 'shell/Shell.qml'
--- shell/Shell.qml 2012-04-04 08:26:18 +0000
+++ shell/Shell.qml 2012-04-06 15:28:20 +0000
@@ -28,6 +28,20 @@
28 property variant dashLoader28 property variant dashLoader
29 property variant hudLoader29 property variant hudLoader
3030
31 Binding {
32 target: declarativeView
33 property: "accessibleName"
34 value: {
35 if (shellManager.hudActive) {
36 return "Hud";
37 }
38 if (shellManager.dashActive) {
39 return "Dash";
40 }
41 return "Launcher";
42 }
43 }
44
31 /* Space reserved by strutManager is taken off screen.availableGeometry but45 /* Space reserved by strutManager is taken off screen.availableGeometry but
32 we want the shell to take all the available space, including the one we46 we want the shell to take all the available space, including the one we
33 reserved ourselves via strutManager. */47 reserved ourselves via strutManager. */
3448
=== modified file 'shell/app/shellmanager.cpp'
--- shell/app/shellmanager.cpp 2012-04-02 14:42:15 +0000
+++ shell/app/shellmanager.cpp 2012-04-06 15:28:20 +0000
@@ -117,7 +117,6 @@
117{117{
118 const QStringList arguments = qApp->arguments();118 const QStringList arguments = qApp->arguments();
119 ShellDeclarativeView * view = new ShellDeclarativeView(q, m_sourceFileUrl, screen);119 ShellDeclarativeView * view = new ShellDeclarativeView(q, m_sourceFileUrl, screen);
120 view->setAccessibleName("Shell");
121 if (arguments.contains("-opengl")) {120 if (arguments.contains("-opengl")) {
122 view->setUseOpenGL(true);121 view->setUseOpenGL(true);
123 }122 }

Subscribers

People subscribed via source and target branches