Commit Graph

622 Commits

Author SHA1 Message Date
Timm Bäder
ad155fb26c Remove GtkStock API from GtkImage 2016-10-16 18:17:21 +02:00
Benjamin Otte
021fe010b6 API: Remove GtkPlug, GtkSocket and GtkWin32EmbedWidget 2016-10-16 18:17:21 +02:00
Benjamin Otte
da8cef16dc a11y: Correctly indent code 2016-08-25 23:02:27 +02:00
Timm Bäder
9d5fe26420 build: add GtkStack accessible private header at the right place 2016-05-30 20:41:49 +02:00
Timm Bäder
0b0d4765a0 Add GtkStackAccessible
Show only the currently visible child to a11y.
2016-05-30 19:12:52 +02:00
Matthias Clasen
2b1fc6166c a11y: Expose window type hint as attribute
This was an old request, maybe still useful.

https://bugzilla.gnome.org/show_bug.cgi?id=468122
2016-03-04 23:50:50 -05:00
Matthias Clasen
c264cd6785 Split off a private header for GtkTextBuffer
This avoids polluting the installed header with private symbols.
2015-10-15 23:04:44 -04:00
Matthias Clasen
93a4030c45 Remove a duplicate string
dialog-information was twice in the list of accessible labels
for icon names.
2015-07-26 02:57:39 -04:00
Joanmarie Diggs
8f644101b9 a11y: Only emit signals when cells change; not upon creation
This is a workaround for atspi-atk behaviour.

atspi-atk uses signal emission hooks. So it to already catches
signal emissions on creation of objects, before anyone could even
think of g_signal_connect()ing.

https://bugzilla.gnome.org/show_bug.cgi?id=746706
2015-04-10 16:36:06 +02:00
Joanmarie Diggs
9749013e5f Fix an AtkStateType emitted for GtkBooleanCellAccessible
An apparent copy-and-paste error is resulting in ATs being notified of
changes in ATK_STATE_CHECKED when the cell's "sensitive" state changes.

https://bugzilla.gnome.org/show_bug.cgi?id=746784
2015-03-26 08:23:37 -04:00
Joanmarie Diggs
1ed9d33d24 a11y: Only emit name-changed once
We were emitting it twice, once with deleting the old text, once with
inserting the new text.

https://bugzilla.gnome.org/show_bug.cgi?id=746706
2015-03-25 04:06:23 +01:00
Joanmarie Diggs
c66d165676 a11y: Free the cell text after emitting text-changed:delete.
This is needed because AT-SPI2's ATK bridge exposes the deleted string
to ATs.

https://bugzilla.gnome.org/show_bug.cgi?id=746706
2015-03-25 04:06:23 +01:00
Joanmarie Diggs
d553c0ae1e a11y: Refactor code
Put the equality check in front. This allows better detection of when an
insert or delete needs to be emitted.

Also, only emit text-changed:delete if the deleted text is not the empty
string. Only emit text-changed:insert if the inserted text is not the
empty string.

https://bugzilla.gnome.org/show_bug.cgi?id=746706
2015-03-25 04:06:23 +01:00
Joanmarie Diggs
4340e977e4 a11y: Refactor textcellaccessible code
Compute the new text and its length in advance. This way those
computations will not confuse us when they happen in the middle of the
actual action.

https://bugzilla.gnome.org/show_bug.cgi?id=746706
2015-03-25 04:06:23 +01:00
Christian Hergert
7bb3d9557f a11y: handle atk race condition where widget has been destroyed
If the widget has been destroyed since a DBus message had been sent,
we could be in a condition that the widget pointer exists but it does
not have a window.

This bails as if the widget didn't exist if there is no available
GdkWindow.

We also set the extents to 0 to be defensive since this is a vfunc
implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=746586
2015-03-21 20:05:08 -04:00
Matthias Clasen
fec8a1ee7f menu button: Improve accessibility
Rework the way we assign an accessible name to menu buttons,
to make sure we pick up a label, should the button contain
one, and only override the name with "Menu" as a fallback.
2015-03-13 18:38:18 -04:00
Peter Bloomfield
5611cf2096 Do not return NULL AtkStateSet
https://bugzilla.gnome.org/show_bug.cgi?id=741511
2015-02-28 13:52:22 -05:00
Matthias Clasen
7624418ddf Drop nonworking code to set a11y roles of tooltips
This code relied on widget names, and we don't set those anymore.
2015-02-18 17:28:07 -05:00
Alexander Larsson
8c361fd7e2 gtk: Add support for g_autoptr()
https://bugzilla.gnome.org/show_bug.cgi?id=743640
2015-02-02 09:31:27 +01:00
Mike Gorse
9cbf04c1d2 A11y: fix typo when initializing a container cell accessible
Gtk_container_cell_widget_set should chain up to its parent's set
function, not its parent's unset function. This was resulting in
accessibles being erroneously marked defunct after being created.
2015-01-26 15:03:10 -06:00
Maks Naumov
54806d1295 Fix accessible_class->widget_set initialization
Signed-off-by: Maks Naumov <maksqwe1@ukr.net>

https://bugzilla.gnome.org/show_bug.cgi?id=742778
2015-01-13 19:01:01 -05:00
Matthias Clasen
25d9412c7e Split subdirectory file lists off
This moves a little closer to a proper nonrecursive setup, and
makes the gtk Makefile.am less monstrous.
2014-11-30 16:11:56 -05:00
Joanmarie Diggs
246c172e1e GtkButtonAccessible: Stop emitting state-change signals for ATK_STATE_ARMED
ATK_STATE_ARMED is now deprecated. There is no replacement.

https://bugzilla.gnome.org/show_bug.cgi?id=740438
2014-11-25 22:33:27 -05:00
Joanmarie Diggs
2893a71a3e Implement support for ATK_STATE_HAS_TOOLTIP
https://bugzilla.gnome.org/show_bug.cgi?id=738982
2014-10-22 22:55:13 -04:00
Matthias Clasen
ef62a872f5 GtkContainerAccessible: avoid resurrecting accessibles
When removing a child, we don't want to resurrect its
accessible needlessly.
2014-10-14 23:58:37 -04:00
Benjamin Otte
7e5b58c727 stylecontext: Move private a11y function to private header 2014-08-16 19:39:44 +02:00
Ryan Lortie
49ccb23743 GtkMenuItemAccessible: use "insert" signal
Use the "insert" rather than the "add" signal to reliably detect
additions of menu items.

https://bugzilla.gnome.org/show_bug.cgi?id=372545
2014-08-15 10:29:48 -04:00
Timm Bäder
fb7d710931 listboxrowaccessible: Avoid assertion failure
The next call to gtk_list_box_get_selection_mode just expected the
GtkListBoxRow's parent to be a GtkListBox and failed when the row was
added to something other than a GtkListBox.

https://bugzilla.gnome.org/show_bug.cgi?id=733782
2014-08-03 02:48:26 +02:00
Matthias Clasen
2b0ae4bad3 GtkPopover: Properly update a11y parent
When the relative-to widget changes, update the accessible parent
of the popovers accessible.

https://bugzilla.gnome.org/show_bug.cgi?id=733923
2014-07-30 23:14:41 +02:00
Alejandro Piñeiro
2be4474a19 a11y: unref selected item only if it is not NULL
https://bugzilla.gnome.org/show_bug.cgi?id=733610
2014-07-25 10:03:24 +02:00
Benjamin Otte
fcbbe54936 a11y: Do not include gtkx.h directly 2014-07-12 07:13:27 +02:00
Benjamin Otte
4b793dd508 a11y: Remove an outdated comment 2014-06-10 01:17:00 +02:00
Joanmarie Diggs
fc00381d30 GtkEntryAccessible: Emit signal after insertion
The signal needs to be emitted after the text insertion as at-spi gets
the text to compute the inserted text due to the AtkText::insert-text
signal not containing it.
Also adjust position to reflect changes to the offsets.

https://bugzilla.gnome.org/show_bug.cgi?id=731429
2014-06-10 01:07:57 +02:00
Evan Nemerson
bda145b19f gtk: fix annotation syntax and missing some missing annotations
These changes clean up various errors and omissions resulting from
either slightly incorrect G-I/gtk-doc syntax or missing documentation
blocks.

https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-27 21:10:32 -07:00
Matthias Clasen
04703689b8 Deprecate GtkAligment
This has been dangling ever since 3.0.

https://bugzilla.gnome.org/show_bug.cgi?id=645781
2014-05-23 20:31:25 -04:00
Evan Nemerson
4a4b23bfad a11y: build directly into libgtk instead of an internal library
https://bugzilla.gnome.org/show_bug.cgi?id=730615
2014-05-23 19:20:59 -04:00
Cosimo Cecchi
a2a1c6da95 cellarea: don't use focus-line-width
Use CSS padding instead.
2014-05-09 11:02:45 -07:00
Matthias Clasen
22ab2ca2a5 a11y: Avoid a warning
The listbox row accessible code was giving warnings when
parent is NULL, at destruction time.
2014-05-05 19:46:04 -04:00
Benjamin Otte
748b2bf5ae a11y: Disable deprecation warnings in AtkMisc implementation 2014-05-05 16:10:16 +02:00
Matthias Clasen
9d7f7ddadf GtkSpinButton: Implement new AtkValue interface
The AtkValue interface has been replaced in ATK 2.12.
Implement the new one in addition to the old one.
2014-05-02 20:47:16 -04:00
Matthias Clasen
fc7e7495a6 GtkScaleButton: Implement new AtkValue interface
The AtkValue interface has been replaced in ATK 2.12.
Implement the new one in addition to the old one.
2014-05-02 20:47:00 -04:00
Matthias Clasen
516cd70780 GtkRange: Implement new AtkValue interface
The AtkValue interface has been replaced in ATK 2.12.
Implement the new one in addition to the old one.
2014-05-02 20:46:45 -04:00
Matthias Clasen
1d50657740 GtkProgressBar: Implement new AtkValue interface
The AtkValue interface has been replaced in ATK 2.12.
Implement the new one in addition to the old one.
2014-05-02 20:46:30 -04:00
Matthias Clasen
98affc6829 GtkPaned: Implement new AtkValue interface
The AtkValue interface has been replaced in ATK 2.12.
Implement the new one in addition to the old one.
2014-05-02 20:46:17 -04:00
Matthias Clasen
987cce9e65 GtkLevelBar: Implement new AtkValue interface
The AtkValue interface has been replaced in ATK 2.12.
Implement the new one in addition to the old one.
2014-05-02 20:46:03 -04:00
Matthias Clasen
efcaaa524e list box: Update accessible implementation
Now that multi selection is supported, we can provide a more
complete AtkSelection implementation.
2014-04-06 01:44:36 -04:00
Matthias Clasen
fee33b1a81 Clean up private headers
This commit adds a few missing private headers, and cleans up
some irregularities in the existing ones
2014-04-05 02:06:29 -04:00
Jonas Danielsson
b29bbc6210 a11y: atk_table_get_row_at_index is deprecated
Do not use deprecated index based AtkTable functions use static
helper instead.

https://bugzilla.gnome.org/show_bug.cgi?id=727313
2014-04-01 21:40:24 -04:00
Jonas Danielsson
e7962f5871 a11y: atk_component_get_position is deprecated
Switch to using atk_component_get_extents instead.

https://bugzilla.gnome.org/show_bug.cgi?id=727313
2014-04-01 21:40:23 -04:00
Bastien Nocera
f71f7215ab all: Name more idles and timeouts
Following up from 438cd857c4,
name more timeouts and idles.

The original grep was missing checking for gdk_threads_add_*()
functions (at least for some of the files).

https://bugzilla.gnome.org/show_bug.cgi?id=726870
2014-03-26 20:09:30 -04:00
Benjamin Otte
be7380a418 a11y: Move relationset updating to new vfunc
This way, we don't create lots of cell accessibles when creating the
first one (because surely one is the parent/child of another who again
is a parent/child of another who again....)
2014-03-24 16:38:18 +01:00
Benjamin Otte
8374a58623 a11y: Add API to update relationsets of cells to their parents 2014-03-24 16:38:18 +01:00
Benjamin Otte
fef14e0e87 a11y: Don't unref relations
Nobody was reffing those related object in the first place and that
was causing random crashes.
And if somebody had reffed those related objects, they'd have caused
reference cycles.

https://bugzilla.gnome.org/show_bug.cgi?id=726838
2014-03-24 16:38:17 +01:00
Carlos Garnacho
0e7884f1a7 a11y: Remove weak reference when updating a GtkPopoverAccessible relative-to widget
Otherwise the weak reference is left dangling, which later causes issues at the time
of destroying that widget.

https://bugzilla.gnome.org/show_bug.cgi?id=726749
2014-03-21 15:33:58 +01:00
Benjamin Otte
66fae0330c a11y: Don't use signals
Instead, call functions directly. Fixes the fact that the signals
weren't disconnected even when the accessible was destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=725733
2014-03-13 02:02:50 +01:00
Carlos Garnacho
89c4ef5873 a11y: Don't allocate a list just for counting widgets in GtkContainerAccessible
It's more straightforward if counting through gtk_container_foreach().
2014-03-10 23:02:41 +01:00
Carlos Garnacho
31cd153050 a11y: Add GtkPopopverAccessible
And let GtkPopover use it as its GtkAccessible implementation, this
accessible sets the POPUP_FOR relationship to the relative-to widget,
and keeps track of changes there.

https://bugzilla.gnome.org/show_bug.cgi?id=725864
2014-03-10 23:02:14 +01:00
Carlos Garnacho
d4d6968e1a a11y: Add private GtkContainerAccessible functions to add/remove a child
This may be useful in container implementations, or for internal children
that trigger no signal emission.

https://bugzilla.gnome.org/show_bug.cgi?id=725864
2014-03-10 23:01:59 +01:00
Carlos Garnacho
9d54fee952 a11y: Make GtkWindowAccessible know about popovers
https://bugzilla.gnome.org/show_bug.cgi?id=725864
2014-03-10 23:01:52 +01:00
Marek Kasik
158cb29e55 GtkIconViewAccessible: Don't access freed item
Don't get index from deleted GtkIconViewItem.
Remove the item before traversing list of items.

https://bugzilla.gnome.org/show_bug.cgi?id=701884
2014-03-05 21:03:36 +01:00
Benjamin Otte
af4b26f581 a11y: Fix refcounting for treeview cells
Old code assumed that AT-SPI would keep track of references and
therefore tried to only hold weak references. On the other hand it also
tried to keep objects alive so it referenced objects very randomly. All
of that lead to cycles and leaking.

As AT-SPI does not keep track of objects at all, the treeview now does.
The refcounting looks as follows:
GtkTreeViewAccessible
  => creates per row/column
GtkTreeViewAccessibleCellInfo
  => which references 1
GtkCellAccessible

If there is only one cell, this accessible is a
GtkRendererCellAccessible, otherwise a GtkContainerCellAccessible is
created and that accessible holds references to the
GtkRendererCellAccessibles that are created for every cell renderer.

https://bugzilla.gnome.org/show_bug.cgi?id=554618
2014-02-26 02:36:08 +01:00
Benjamin Otte
bcdb4aa2a7 a11y: Refactor function
Make the intent of the function clear by implementing it that way.
2014-02-26 02:36:08 +01:00
Benjamin Otte
5ea4dbf3e0 a11y: Split out a function
This will make the next refactoring easier.
2014-02-26 02:36:08 +01:00
Benjamin Otte
70ff97e812 a11y: Remove unused variable 2014-02-26 02:36:08 +01:00
Benjamin Otte
2fdd420e78 a11y: Use more obvious function name 2014-02-26 02:36:07 +01:00
Benjamin Otte
f60bb84d15 a11y: Split out creation of cell info
Don't mix cell info creation with cell accessible creation. Instead,
first create the accessible, then create the cell info.
2014-02-26 02:36:07 +01:00
Benjamin Otte
43fe3c499c a11y: Split out a function
First in a set of refactorings to make the create_cell() function
actually understandable.
2014-02-26 02:36:07 +01:00
Alejandro Piñeiro
79ed2b790a a11y: remove implementation for component->get_size
Recently get_size was removed because it was redundant, as
you can get the same information from get_extents.

https://bugzilla.gnome.org/show_bug.cgi?id=723863
2014-02-09 23:11:53 -05:00
Ignacio Casal Quinteiro
4238cc4b7b Revert "Fix memory leak in GtkTreeViewAccessible"
This reverts commit 7a411eb6dd.
This also makes gedit external tools manager to crash
2014-02-06 22:15:12 +01:00
William Jon McCann
2a45418b67 docs: use proper quotes 2014-02-05 15:08:42 -05:00
Benjamin Otte
43baa213b2 a11y: Ignore deprecation warnings for ATK focus tracker 2014-02-03 21:38:16 +01:00
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
Benjamin Otte
76670734f4 a11y: Only emit expandable/expanded for expander column
We don't want to emit state changes for all the cells in a row, just for
the cell in the expander column. It's the only one that reports EXPANDED
or EXPANDABLE states, after all.

Also, contains refactoring of the affected functions for all the special
cases.

https://bugzilla.gnome.org/show_bug.cgi?id=694059
2013-02-20 02:44:33 +01:00
Benjamin Otte
7b4c49a95f a11y: Fix copy-paste error in state flag notification
We weren't checking the removed flag but the added flag for removal
emissions, so what would happen for every state change notification was:
- on state-added, both an "added" and a "removed" event were emitted
- on state-removed, nothing

https://bugzilla.gnome.org/show_bug.cgi?id=694059
2013-02-19 23:25:12 +01:00
Matthias Clasen
0795237bb2 Plug a few memory leaks
The accessibles for icon view items were not properly freed
in all cases.
https://bugzilla.gnome.org/show_bug.cgi?id=683311
2013-02-11 00:42:28 -05:00
Rico Tzschichholz
4fe1effb36 Revert "Visual C++: Update gtka11y projects completion"
This broke 'make dist' on linux.

This reverts commit ecf2a9471b.
2013-02-08 18:29:22 +01:00
Rico Tzschichholz
656cc63c75 Revert "Drop things that break distcheck"
This reverts commit 2204f12083.
2013-02-08 18:29:13 +01:00
Matthias Clasen
2204f12083 Drop things that break distcheck 2013-02-04 14:14:07 -05:00
Matthias Clasen
2ae8a27b4a Remove a no-op AtkAction from GtkRange
The "activate" action here did not do anything.
It is possible we actually want to have some actions here,
like "step-up", "step-down", "page-up", "page-down", etc.
For now, just remove the AtkAction implementation.
https://bugzilla.gnome.org/show_bug.cgi?id=553334
2013-02-04 00:59:14 -05:00
Matthias Clasen
935d458fa1 Improve AtkAction implementations
Implement get_localized_name, and also translate the strings
returned by get_description.
https://bugzilla.gnome.org/show_bug.cgi?id=525226
2013-02-04 00:57:46 -05:00
Matthias Clasen
fae1da8ec9 Include gtklevelbaraccessible.h in gtk-a11y.h 2013-02-01 22:54:20 -05:00
Mike Gorse
92f0c5c384 Add accessibility for GtkLevelBar and value test 2013-02-01 11:44:15 -06:00
Chun-wei Fan
ecf2a9471b Visual C++: Update gtka11y projects completion
-Rename the "libgail" projects to gtka11y, for consistency with the
 autotools builds
-Update the projects completion in gtk/a11y/Makefile.am, as the sources are
 now listed under $(libgtka11y_la_SOURCES) instead of $(libgail_la_SOURCES)
2013-01-23 13:56:11 +08:00
Matthias Clasen
88ed5af5e4 Use g_signal_connect_object for adjustments in GtkSpinButtonAccessible
An instance of GtkAdjustment may be used by another instance after
the spin button widget is destroyed. In that case, the function
gtk_spin_button_accessible_value_changed() will be called with an
invalid argument. This situation is often caused when one use
GtkCellRendererSpin widget. To avoid invalid call of the function,
the signal handler for the "value-changed" signal should be disconnected
when the spin-button widget is destroyed.
Using g_signal_connect_object achieves just that.
https://bugzilla.gnome.org/show_bug.cgi?id=691592
2013-01-20 22:16:47 -05:00
Benjamin Otte
f260affbb8 a11y: Implement get_name() instead of setting variables
This avoids a later free of this const value.
2013-01-14 00:01:44 +01:00
Matthias Clasen
5adecf183b Move single-include guards inside include guards
gcc has optimizations for include guards that only work
if they are outermost in the the header.
https://bugzilla.gnome.org/show_bug.cgi?id=689810
2012-12-28 09:57:56 -05:00
Matthias Clasen
6bc2a2da48 Another trivial sorting fix 2012-12-27 12:15:05 -05:00
Matthias Clasen
38963870eb Rename gtkcolorswatchaccessible.h
Call it gtkcolorswatchaccessibleprivate.h. This matches what we're
doing for non-public widget headers in gtk/.
2012-12-27 12:11:12 -05:00
Matthias Clasen
12f9b81b1e Drop separate scrollbar accessible implementation
It didn't really add anything to the range accessible implementation.
2012-12-27 12:06:23 -05:00
Matthias Clasen
5fa4232404 Install a11y headers
We install the headers for the a11y implementations in
/usr/include/gtk-3.0/gtk/a11y/.
2012-12-27 12:05:02 -05:00
Matthias Clasen
c3577c66e5 Add single-include guards to a11y headers
More preparation for installing these headers.
2012-12-27 12:05:02 -05:00
Matthias Clasen
07a00d5939 Fix inter-header includes
Since we are going to install these headers soon, we need
to make their mutual includes work in the installed location
as well. Also, avoid including individual gtk headers, to
avoid trouble with single-include guards.
2012-12-27 12:04:01 -05:00
Matthias Clasen
d2944ce633 More gail removal
Rename GailMisc to GtkMiscImpl.
2012-12-27 11:27:46 -05:00
Matthias Clasen
4cd806ff0c Rename and clean up gailutil 2012-12-27 11:27:45 -05:00
Matthias Clasen
651241b685 Some renaming
Move gail.h to gtkaccessibility.h, and libgail to libgtka11y.
2012-12-27 11:27:45 -05:00
Matthias Clasen
221ac71278 Cosmetics
Replace GAIL in top comments by 'GTK+ - accessibility implementations'.
2012-12-27 11:27:44 -05:00
Matthias Clasen
e4b5e94eb9 Make accessible implementations public
This commit exposes the get_type() functions and standard
headers for accessible implementations. This makes it possible
to derive from the GTK accessible implementations without
GType magic tricks. This is necessary, because we require the
a11y type hierarchy to be parallel to the widget type hierarchy.
So, if you derive a widget and need to adjust its a11y implementation,
you have to be able to derive its accessible implementation.

This commit probably exposes more than is absolutely necessary,
it also exposes accessibles of widgets that are unlikely candidates
for deriving from.
2012-12-27 11:23:22 -05:00
Matthias Clasen
853b5e5fa2 Trivial sorting fix 2012-12-27 01:50:54 -05:00
Matthias Clasen
f229945dab NotebookPageAccessible: Implement selectable/selected states
The automatic handling for this was removed from atk, so
we need to do it ourselves here.
2012-12-17 23:59:23 -05:00
Matthias Clasen
5bee1a994f GtkMenuItemAccessible: implement selectable/selected states
The automatic handling for this was removed in atk, so
we need to do it ourselves now.
2012-12-17 23:58:24 -05:00
Cosimo Cecchi
3782cf77c3 a11y: fix uninitialized variables compiler warning
The code path where we update the tooltip text property doesn't set
the state and value variables, and so doesn't need to call
notify_state_change().
Return early, and move the if block at the beginning of the function for
clarity.
2012-12-13 21:52:51 -05:00