Commit Graph

129 Commits

Author SHA1 Message Date
Cosimo Cecchi
a2a1c6da95 cellarea: don't use focus-line-width
Use CSS padding instead.
2014-05-09 11:02:45 -07: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
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
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
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
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
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
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
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
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
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
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
19fc090354 GtkTreeViewAccessible: add a private struct
Move instance fields to a private struct, in preparation
for installing a11y headers.
2012-10-15 05:56:41 -04:00
Benjamin Otte
9e486139ca a11y: Fix for -Wmissing-declarations
I'll add a bunch of fixes for gcc complaining about
-Wmissing-declarations after finding a bunch of cases today where I had
forgotten to make functions static in the CSS code.

A thorn in those patches is G_DEFINE_TYPE() which doesn't allow making
the get_type() function static, so I added definitions for that function
above the G_DEFINE_TYPE().

After those patches, GTK should compile without warnings when this flag
is enabled.
2012-10-02 19:32:38 +02:00
Benjamin Otte
0dbf5db0e1 a11y: Don't mess up if column gets hidden
We were using a function that insisted on visible columns for computing
the potential ID of an invisible column. Not good.

https://bugzilla.gnome.org/show_bug.cgi?id=675990
2012-07-09 01:28:26 +02:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Matthias Clasen
140e884868 Symbol exporting fixes 2012-02-21 01:50:19 +01:00
Benjamin Otte
90e65f30ab a11y: Mark cells as defunct when deleting them
Just unreffing isn't enough, atk-bridge might have a reference to the
object still.
2012-02-12 16:45:14 +01:00
Benjamin Otte
194a48bd4a a11y: Redo ref_accessible_at_point()
use direct access to the RBTree instead of fiddling with the path.

Removes the lat caller of get_index() and with it count_rows(), so those
are gone now.
2012-02-11 05:11:00 +01:00
Benjamin Otte
3827d75f64 a11y: create focus cell accessibles when they get focused 2012-02-11 04:44:27 +01:00
Benjamin Otte
bf8d9ceb2f a11y: Split out cell creation function 2012-02-11 04:41:45 +01:00
Benjamin Otte
315ac9413b a11y: Set relations without tree path
We can directly use at the rbtree's parent.
2012-02-11 04:13:04 +01:00
Benjamin Otte
6130c65470 a11y: Remove unused variable 2012-02-11 03:42:14 +01:00
Benjamin Otte
da30c8253b a11y: Keep treeview accessibles around
Refcounting behavior kinda requires that we track of accessibles until
the row goes away. This is necessary for reference handling and for some
assumptions that atk-bridge does.
2012-02-11 03:37:25 +01:00
Benjamin Otte
5e587229c8 a11y: Remove old treeview focus tracking code 2012-02-11 03:14:22 +01:00
Benjamin Otte
24db6d7a6f a11y: Emit focus change events when focus cell changes 2012-02-11 03:02:20 +01:00
Benjamin Otte
07f8336dbd a11y: Update treeview focused status
... when the cursor row changes. Also emit active-descendant-changed.
2012-02-11 02:50:26 +01:00
Benjamin Otte
f90ff5d50b treeview: Notify accessible about focus changes 2012-02-11 02:38:48 +01:00
Benjamin Otte
a4559f1e19 treeview: Tell accessible about focus column changes 2012-02-11 01:59:19 +01:00
Benjamin Otte
d2a58446ea a11y: Make GtkCellAccessible a GtkAccessible 2011-12-19 16:17:13 +01:00
Benjamin Otte
80a0413d40 a11y: Use widget_unset vfunc in treeview 2011-12-19 16:17:13 +01:00
Benjamin Otte
e4f6a7124b a11y: Simplify code
Use peek_cell() instead of a custom find_cell() function that duplicates
loads of functionality.
2011-12-19 16:17:12 +01:00
Benjamin Otte
113aff673f a11y: Don't emit children-changed when nothing changed
When we have 0 columns, no children ever get added or removed.
2011-12-16 13:39:43 +01:00
Benjamin Otte
c0fdcbf513 a11y: Remove unused gtk_cell_accessible_set_cell_data() 2011-12-16 04:53:17 +01:00
Benjamin Otte
64aa203773 a11y: Refactor treeview code even more
- Split out set_cell_data()
- Use it
- Get rid of update_cell_value() function, it's now just 2 calls
2011-12-16 04:53:16 +01:00
Benjamin Otte
eb6465167e a11y: Redo function signature
With the recent changes to gtk_cell_accessible_update_cache(), the
update_cell_value() function now needs less code, too.
2011-12-16 04:53:16 +01:00
Benjamin Otte
118bc610f6 a11y: Move update_cache to GtkCellAccesible
This way, we can call it for container renderers, too.
2011-12-16 04:53:16 +01:00
Benjamin Otte
2e7fcc24ac a11y: Redo cell update function
1) always emit signals
   Previously, newly constructed cells would be told to not emit events.
   However, we can ensure that nothing is connected to the signals, so
   they will not actually emit anything.
2) don't return anything
   The return value is unused anyway.
2011-12-16 04:53:16 +01:00
Benjamin Otte
a3f60349ed a11y: Don't copy data between renderers
Now that we don't use custom renderers anymore, we don't need to copy
data between them anymore.
2011-12-16 04:53:16 +01:00
Benjamin Otte
8ac579602c a11y: Use cell renderer creation funcs unconditionally
Also delete the previous "new" functions and actually set the real cell
renderer here.
2011-12-16 04:53:16 +01:00
Benjamin Otte
e5d5863a3f a11y: Use the accessible type 2011-12-16 04:53:16 +01:00
Benjamin Otte
dfb82333a3 a11y: Remove unused variable 2011-12-16 04:53:15 +01:00
Benjamin Otte
ccabccc42f treeview: Send changed signal directly to a11y code
No more signal handler is needed, therefore the code can also get rid of
tracking the treemodel. And we use a faster approach for iterating the
changed cellrenderers: We just iterate all columns instead of over all
cell accessibles, as that number is likely quite a bit smaller.
2011-12-16 04:53:15 +01:00