Matthias Clasen [Thu, 23 Jun 2011 21:54:07 +0000 (17:54 -0400)]
GtkLabelAccessible: remove broken workarounds
This removes a horrible workaround for bug 126797. To prevent
picking up accidental markup in label texts, the label accessible
is listening for window creation and mapping and defers initializing
its text until then.
Matthias Clasen [Thu, 23 Jun 2011 21:52:39 +0000 (17:52 -0400)]
Add a testcase for a very old bug
This tests a problem that was first noticed in 2003, in
bug 126797: The text of a label accessible is not properly
updated when the label switches from !use-markup to use-markup.
Matthias Clasen [Thu, 23 Jun 2011 05:12:29 +0000 (01:12 -0400)]
GailLabel -> GtkLabelAccessible
A first experimental conversion from the gail namespace to gtkaccessible.
At the same time, use gtk_widget_class_set_accessible_type() to register
the accessible type for GtkLabel.
Matthias Clasen [Thu, 23 Jun 2011 02:27:10 +0000 (22:27 -0400)]
GailTreeView: optimize a bit
Avoid many unnecessary list iterations by using a hash table
to store cell infos, and caching row and column counts. Based
on patches by William Jon McCann, bug 554171.
tree-performance results:
before: (MINPERF:large tree test with a11y: 9.18531sec)
after: (MINPERF:large tree test with a11y: 0.923463sec)
for comparison, without accessibility:
(MINPERF:large tree test: 0.016179sec)
Benjamin Otte [Wed, 22 Jun 2011 02:24:32 +0000 (04:24 +0200)]
Revert "Add a filechooser testcase"
File choosers depend on the files in the current directory and the
settings the user has set for the file chooser, so the output cannot be
deterministic.
Benjamin Otte [Wed, 22 Jun 2011 01:47:25 +0000 (03:47 +0200)]
gail: Add support for action_set_description
As set_description is never called and unsupported by the at-spi, we can
omit implementing it.
This means we can also omit get_description calls in various places, as
they'd just return the default value: NULL.
Benjamin Otte [Tue, 21 Jun 2011 14:43:56 +0000 (16:43 +0200)]
a11y: Remove hack for old code
This code was supposed to work around a bad interaction between GOK and
Nautilus from 7 years ago.
If it still exists, the GOK developers may complain to the Nautilus
developers.
Matthias Clasen [Mon, 20 Jun 2011 13:03:25 +0000 (09:03 -0400)]
Don't build the libgail-util docs
The doc build for that is currently broken, and libgail-util is
undergoing reconstructive surgery anyway, currently.
Or maybe it'll turn out to be an amputation...
Matthias Clasen [Mon, 20 Jun 2011 04:00:39 +0000 (00:00 -0400)]
Fix GtkSwitchAccessible type definition
It turns out that ATK_DEFINE_TYPE_WITH_CODE() is broken; it
tells GType that the class and instance size for the accessible
type are the same as for its parent type. Which is not true
if your instance struct has members such as 'description' here.
This was causing hard-to-track-down memory corruption, since
description and the GtkAccessible private pointer were sharing
the same memory location.
Matthias Clasen [Sun, 19 Jun 2011 23:51:15 +0000 (19:51 -0400)]
Dump AtkComponent properties
Note that the spatial aspects of AtkComponent are all dependent
on fonts and other environmental factors, thus we only dump the
little bits outside of that.
Matthias Clasen [Sun, 19 Jun 2011 18:05:06 +0000 (14:05 -0400)]
Fix make check
Not really the best fix; for now just ignore accessible parents
that are not GtkAccessibles - it seems that something causes
GailToplevels to show up as parents of GailWindows, randomly.
Matthias Clasen [Sun, 19 Jun 2011 17:20:32 +0000 (13:20 -0400)]
Add a more convenient way to dump
For initial creation of the results, allow to run
accessibility-dump --generate file.ui,
which will dump just the expected output to stdout,
without any extra decorations.
Benjamin Otte [Sun, 19 Jun 2011 04:11:38 +0000 (06:11 +0200)]
tests: Add first shot at an accessibility dump tool
The tool works like this:
./accessibility-dump [FILE ...]
If no files are given, all files with the extension ".ui" in the current
directory are taken. For every file "test.ui", the following steps are
performed:
1) test.ui is loaded using GtkBuilder
2) The accessible for the window is loaded
3) The information of accessible is converted into a string using a
syntax defined in this test file
4) The generated string is diffed with the file "test.txt"
5) If the diff is empty, the test is a success, if not, the test fails.
6) The diff is output when the test runner is run with --verbose
So to add a test named "test", create a file called "test.ui", put it
into this directory. Then create the expected output file "test.txt",
put it into this directory too. You can create the initial version of
this file by invoking "./accessibility-dump --verbose test.ui". The
output will contain the expected text and can be copy/pasted into the
text file.
Benjamin Otte [Sat, 18 Jun 2011 07:51:18 +0000 (09:51 +0200)]
API: Add gtk_widget_class_set_accessible_type()
The function is supposed to bypass the ATK registry. For 2 reasons:
1) We get rid of a lot of boilerplate madness.
2) The registry allows creating multiple accessibles per widget and we
don't.
Benjamin Otte [Wed, 15 Jun 2011 10:46:50 +0000 (12:46 +0200)]
gtk: Include gail by default, don't build it as a module
It is now no longer possible to disable it.
This doesn't matter though because GTK will not instantiate a11y
objects until you actually use it. So nothing changes in practice.
Benjamin Otte [Tue, 14 Jun 2011 13:35:34 +0000 (15:35 +0200)]
gail: Include files directly
Instead of including <gail/gailfoo.h>, include "gailfoo.h"
Private headers should be included like this (to make it esily visible
that the headers are private) and we want to move this directory to a
different name, so hardcoding the directory name is counterproductive to
that.