Commit Graph

451 Commits

Author SHA1 Message Date
Mike Gorse
e529dfe949 A11y: Fix text functions for table cells
Keep the PangoLayout around, and refresh in update_cache.

https://bugzilla.gnome.org/show_bug.cgi?id=707729
2014-01-13 23:51:26 -05:00
John Lindgren
7a411eb6dd Fix memory leak in GtkTreeViewAccessible
https://bugzilla.gnome.org/show_bug.cgi?id=722030
2014-01-13 22:30:38 -05:00
Matthias Clasen
a4e4d7d1fd GtkMenuItem: fix initial accessible selection state
When the accessible is created for an already-selected
menuitem, we were not properly setting the state of the
the accessible. Fix that.
2014-01-05 22:45:39 -05:00
Matthias Clasen
e015102fa9 a11y: Fix keybindings in menus
GtkMenuItemAccessible was assuming that an accel label is
always the immediate child of a menu item. It also did not
deal with manually set accels.  Fix both of these.
https://bugzilla.gnome.org/show_bug.cgi?id=721086
2014-01-05 11:56:31 -05:00
Matthias Clasen
29cd52c854 Emit a11y state change notification for color swatches
Improve the color swatch accessible to set a proper role
depending on whether the swatch is selectable or not, and
set the checked atk state when appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=721048
2014-01-05 10:54:43 -05:00
Matthias Clasen
8085b41074 GtkCheckMenuItemAccessible: Make work with model menu items
GtkModelMenuItem does not emit the ::toggled signal when a radio
item is activated, so listen for property notification for that
property. We still keep the ::toggled signal handler, in order
to not break other uses of check and radio menu items.

https://bugzilla.gnome.org/show_bug.cgi?id=720983
2014-01-04 21:53:31 -05:00
Matthias Clasen
9137b4ed8e GtkColorSwatch: Set an accessible role
And update the colorchooser a11y test to a) use GtkColorChooser
instead of the deprecated GtkColorSelection and b) match this
change. Pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=721045
2014-01-04 18:52:46 -05:00
Matthias Clasen
4de1259cd9 Trivial formatting fix 2014-01-04 17:41:23 -05:00
Matthias Clasen
9bf89f2b5e GtkLabelAccessible: reorganize the code
Separate the GtkLabelAccessible, GtkLabelAccessibleLink and
GtkLabelAccessibleLinkImpl implementations more clearly.
2014-01-04 10:54:03 -05:00
Matthias Clasen
b85a8001e0 GtkLabelAccessible: update state of links
This commit makes the LinkImpl children of label accessibles
inherit all their state, except for focused and visited, which
are handled directly.

https://bugzilla.gnome.org/show_bug.cgi?id=721406
2014-01-04 10:54:03 -05:00
Matthias Clasen
5845356d66 GtkLabelAccessible: Implement AtkHypertext
This commit makes the label accessible implement AtkHypertext,
which returns a AtkHyperlink object for each link in the text.
At the same time, add AtkHyperlinkImpl objects as children
to the label accessible.

Also some private API to indicate that links have changed, and
call that from GtkLabel when needed.

Adjust expected output of the affected a11y tests.

https://bugzilla.gnome.org/show_bug.cgi?id=721410
https://bugzilla.gnome.org/show_bug.cgi?id=721421
2014-01-04 10:54:03 -05:00
Matthias Clasen
c6d9f82916 Add a gtklabelprivate.h header
For now, move the few private functions from gtklabel.h here.
2014-01-04 10:54:03 -05:00
Matthias Clasen
e375b564fb GtkLinkButtonAccessible: fix broken AtkHyperlink implementation
The get_end_index implementation was casting the accessible
to AtkText even though GtkLinkButtonAccessible does not
implement this interface. This did not show up in the a11y
tests because the they were not dumping the affected AtkHyperlinkImpl
properties. Oops.
2014-01-04 10:54:03 -05:00
Matthias Clasen
1bfe9d0db9 Fix a few warnings 2013-12-20 15:15:31 -05:00
Matthias Clasen
f200eebfd6 Improve menubutton a11y
The button now claims its menu as a child for a11y purposes,
which makes it possible for ATs to see it when the navigate
the tree top-down.

Update the a11y test to match.
2013-12-20 13:31:08 -05:00
Philip Withnall
480a005039 gtktreeviewaccessible: Fix potential uses of uninitialised variables
Found with scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-12-02 10:36:26 +00:00
Matthias Clasen
96c0903799 Fix the AtkImage implementation for GtkIconView items
We were returning uninitialized values for image size and
position.

Found in a pile of patches in
https://bugzilla.gnome.org/review?bug=712760
2013-12-01 18:33:38 -05:00
Philip Withnall
ada766025f gtktreeviewaccessible: Fix a potential division by zero
Found with scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-11-24 21:21:02 +00:00
Matthias Clasen
0cda29be88 Remove debug spew 2013-10-28 07:17:25 -04:00
Matthias Clasen
f9c8fefeda Restore accessible names for image-only buttons
With the stock system being deprecated now, we should provide
meaningful accessible names for buttons that are constructed
from icon names or GIcons. This commit reuses the existing
translations.

It is possible that some common icon names are not covered
here because they were not present as stock items. These can
be added to the table later.
2013-10-14 10:37:58 -04:00
Matthias Clasen
1e1c1556f6 Another forgotten a11y header 2013-10-07 16:43:36 -04:00
Matthias Clasen
1f4c60256f Install flowbox a11y headers
Pointed out by Jasper St. Pierre.
2013-10-07 16:29:51 -04:00
Matthias Clasen
943d575ec3 Add GtkFlowBox
GtkFlowBox is a container that its children in a reflowing
grid, which can be oriented horizontally or vertically.

It is similar to GtkListBox in that the children can
be sorted and filtered, and by requiring a dedicated child
widget type, GtkFlowBoxChild. It is similar to GtkTreeView
in that is supports a full set of selection modes, including
rubberband selection.

This is the culmination of work that has happened in the
egg-list-box module, and earlier in libegg. The origins of
this code are the EggSpreadTable in libegg, which was written
by Tristan van Berkom. It was moved to egg-list-box and
renamed EggFlowBox by Jon McCann, and I gave it some finishing
touched in the flowbox-improvements branch of that module.
2013-10-06 23:31:17 -04:00
Matthias Clasen
605b918b2d a11y: Drop obsolete focus tab handling in notebooks
GtkNotebook lost the concept of a separate 'focus tab' ages ago.
Time for the accessible implementation to follow suit.

https://bugzilla.gnome.org/show_bug.cgi?id=693586
2013-10-06 02:00:31 -04:00
Matthias Clasen
58621b00de Trivial: remove an unused declaration
_gtk_list_box_accessible_update_selected is not used and
does not exist.
2013-09-27 20:32:39 -04:00
Mario Sanchez Prada
8d83d989bb a11y: don't shutdown accessibility, so the atk bridge is always valid
This will fix issues in applications that for some reason make
several and not nested calls to gtk_main() during their lifetime,
effectively initializing a11y when the first, top most, main loop
is being run and shutting it down then that loop is quit.

https://bugzilla.gnome.org/show_bug.cgi?id=708024

https://bugzilla.gnome.org/show_bug.cgi?id=684076
2013-09-25 20:14:04 -04:00
Matthias Clasen
c22e27f986 Add a GtkListBoxRow accessible
This lets us do two things:
1. Set the list-item role
2. Set selectable and selected states as appropriate

https://bugzilla.gnome.org/show_bug.cgi?id=692258
2013-09-21 20:51:22 -04:00
Matthias Clasen
bdd4d65e85 Small improvement to GtkLinkButton a11y
ATK has a visited state, so propagate the visited property
of GtkLinkButton to that state.
2013-09-21 20:51:21 -04:00
Benjamin Otte
45d896a6b5 Revert "a11y: Remove AtkSelection implementation from combobox"
This reverts commit 7cecc8e524.

It is impossible to use the selection object of the menu while it is
collapsed (collapsed menus deselect everything for a start), so even
though the original patch was correct, the followup issues are too big
to solve this quickly to a release.

https://bugzilla.gnome.org/show_bug.cgi?id=707786
2013-09-16 15:41:15 +02:00
Alejandro Piñeiro
ef41c2a60f a11y: Remove default description from GtkSwitch
https://bugzilla.gnome.org/show_bug.cgi?id=707926
2013-09-12 11:52:51 +02:00
Alejandro Piñeiro
a86c665398 a11y: not using default name for switch
A proper name or label is required. In the same way, if the
widget is labelled, ATs uses to expose both the label and the
name, making the final output not really user-friendly.

https://bugzilla.gnome.org/show_bug.cgi?id=707872
2013-09-10 22:46:35 -04:00
Mike Gorse
3f2aacca52 a11y: Check whether a widget is mapped before querying its parent
Call gtk_widget_get_mapped() in a couple of places before looking at the
widget's parent, since it might be set to a widget that has been
finalized, causing an invalid read.
2013-08-31 16:42:07 -05:00
Matthias Clasen
5c90b46722 Revert "a11y: Check whether a widget is mapped before querying its parent"
This reverts commit 7e3db6fdd3.

It broke the testsuite.
2013-08-31 16:27:38 -04:00
Mike Gorse
7e3db6fdd3 a11y: Check whether a widget is mapped before querying its parent
Call gtk_widget_get_mapped() in a couple of places before looking at the
widget's parent, since it might be set to a widget that has been
finalized, causing an invalid read.
2013-08-30 09:42:41 -05:00
Matthias Clasen
b7e41a7eda GtkSpinButton: disconnect signals in the accessible
Just as for GtkRangeAccessible, we were not even trying to disconnect
the signal handler from the adjustment. The same fix works here:
override the widget_set and widget_unset vfuncs.

https://bugzilla.gnome.org/show_bug.cgi?id=705692
2013-08-14 00:04:46 -04:00
Matthias Clasen
b9a6e012d5 GtkRange: disconnect signals in the accessible
We were only disconnecting the signal in finalize, when
the widget was already unset. Instead, override the widget_set
and widget_unset vfuncs of GtkAccessible, and keep a reference
to the adjustment.

https://bugzilla.gnome.org/show_bug.cgi?id=705692
2013-08-14 00:04:05 -04:00
Emmanuele Bassi
365919d5f6 a11y: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:28:49 +01:00
William Jon McCann
aef9dca9d5 Deprecate GtkIconFactory, GtkIconSet, GtkIconSource
We want to use GtkIconTheme instead. It is worth noting that
the parts that remain undeprecated are GtkIconSize and gtk_icon_size_lookup.
2013-06-26 20:02:27 -04:00
William Jon McCann
424e1d0059 Start deprecating some GtkStock API 2013-06-25 19:05:32 -04:00
William Jon McCann
2b571f41e2 Remove more discontinued ChangeLogs
They are all in git.
2013-06-24 19:53:08 -04:00
Alexander Larsson
e319867f80 Add GtkListBox
This is basically an import/rename of EggListBox from the row-widget
branch of egg-list-box.
2013-06-13 12:17:06 +02:00
Matthias Clasen
92597da3a0 Add visibility flags in gtk/a11y 2013-05-05 15:38:48 -04:00
Matthias Clasen
4cec2337ab Add annotations in a11y headers 2013-05-05 15:38:47 -04:00
Benjamin Otte
7cecc8e524 a11y: Remove AtkSelection implementation from combobox
AtkSelection requires that the immediate children of the object are the
selectable items. The combobox however is implemented with just 1 child:
The popup menu.

The popup menu is implementing the selectable interface.

Test are updated to reflect this change.
2013-05-02 15:31:26 +02:00
Alban Browaeys
da961b7ab8 GtkEntryAccessible: also handle entry icon tooltip NULL in notify_gtk.
To clear the tooltip one is to set the tooltip to NULL. Though
the GtkEntryAccessible expect this tooltip to not be NULL in
gtk_entry_accessible_notify_gtk (already handling this case
 in its _init).

Fixes:
** (epiphany:23914): CRITICAL **: atk_object_set_description: assertion
`description != NULL' failed
when epiphany g_object_set the entry icon tooltip to NULL (clear the
tooltip) in its find bar.

https://bugzilla.gnome.org/show_bug.cgi?id=695375
2013-03-17 16:12:52 -04:00
Benjamin Otte
feb64f40b0 a11y: Emit text-changed signals directly
When setting new text on the label, the text-changed::delete signal
needs to be emitted before deleting the text (so that atk-bridge can
query the old text) while the text-changed::insert event needs to happen
afterwards (for the same reason). The old code using the notify signal
was only emitted after changing the text.
2013-03-15 00:58:29 +01:00
Bastien Nocera
32825a66ac GtkLabelAccessible: Sanity check _get_text() input values 2013-03-06 15:50:30 +01:00
Benjamin Otte
173317e9ce a11y: Emit active-descendants-changed when focus changes
This fixes the a11y/tree-relationships testcase.

The emission was lost in refactoring in commit
76670734f4
2013-03-05 11:56:56 +01:00
Benjamin Otte
ce0675f1fb a11y: Emit text-changed signals when the text-buffer changes 2013-02-26 16:17:33 +01:00
Chun-wei Fan
d861779b69 Redo Completion of Visual Studio projects for gtka11y
Update the Visual Studio projects for gtka11y and the completion of the
projects that go along with it.  This have been distcheck'ed on my Ubuntu
12.04 system.
2013-02-21 15:48:04 +08:00