Benjamin Otte
ab9c2c2de2
a11y: Remove destroy_count_func usage
...
It's not needed anymore.
2011-12-16 04:53:14 +01:00
Benjamin Otte
8ca5192d6d
a11y: Emit row-deleted signal when rows get deleted
...
Instead of in the old callbacks.
2011-12-16 04:53:14 +01:00
Benjamin Otte
25445837ca
a11y: Revert 22a47c3dbd
...
The fix is wrong on multiple levels. I'll add a proper fix soon.
https://bugzilla.gnome.org/show_bug.cgi?id=548782
2011-12-16 04:53:14 +01:00
Benjamin Otte
95dc248790
treeview: Don't use signals in a11y row expansion
...
Instead, add a function and call it directly.
2011-12-16 04:53:14 +01:00
Benjamin Otte
d9b71702dc
a11y: Add _gtk_tree_view_accessible_add_state()
...
... and _gtk_tree_view_accessible_remove_state(). They should be called
by gtktreeview.c to notify about changes of state for a row.
2011-12-16 04:53:13 +01:00
Benjamin Otte
3badf48d2e
a11y: Split out function
...
I want to use that function when sending notifications. See next
commits.
2011-12-16 04:53:13 +01:00
Benjamin Otte
0ef6771bcc
a11y: Remove old notify about showing/visible
...
As cells are always visible and showing, there is no need to do complex
notification mechanisms anymore.
2011-12-16 04:53:13 +01:00
Benjamin Otte
acfb3b3d88
a11y: Don't duplicate information anymore
...
We do provide the expandable and expanded information via
GtkCellRendererState now so there is no need to use extra flags.
2011-12-16 04:53:13 +01:00
Benjamin Otte
bb029420fd
a11y: Set new treeview flags
2011-12-16 04:53:13 +01:00
Benjamin Otte
78aad2d35c
treeview: Use _gtk_rbtree_contains() in a11y code
2011-12-10 08:00:25 +01:00
Benjamin Otte
806dca0677
treeview: Rename function
...
_gtk_tree_view_find_path() was not a name that not really described what
the function does. And I kept forgetting it. Also, it took the tree view
as an argument and that was completely unnecessary.
2011-11-29 20:44:57 +01:00
Benjamin Otte
178686ba11
a11y: Add get_renderer_state() to cell accessibles
...
Accessibles can use this function to query the state that their row
would be rendered with.
2011-11-24 18:29:45 +01:00
Benjamin Otte
bcafd9ba3c
a11y: Add _gtk_cell_accessible_set_cell_data()
...
See the function documentation for details.
Also included is the implementation for the treeview, but no users yet.
2011-11-24 18:29:45 +01:00
Benjamin Otte
416b3ed204
treeview: Notify a11y about reordered rows
...
That way, no more signal handler is needed in the a11y code. Plus, we
avoid needless signal emissions for rows we don't care about.
2011-11-24 18:29:44 +01:00
Benjamin Otte
fbfbaa3d50
a11y: Don't create fake cell renderers
2011-11-24 18:29:44 +01:00
Matthias Clasen
f2569ba92b
Add a missing static
2011-11-19 18:08:18 -05:00
Benjamin Otte
acbf37bae7
a11y: Merge function into only caller
...
Also cleann up comments that are misleading now.
2011-11-16 04:39:26 +01:00
Benjamin Otte
a4b88c47cd
treeview: Call a11y functions for culmn changes directly
...
This way, the a11y code knows if a column was reordered, added or
removed and can do the right things instead of trying to guess and
getting it wrong.
Also, this patch finalizes the changes so that only visible columns
exist to the accessibility interface.
2011-11-16 04:39:25 +01:00
Benjamin Otte
5041286166
a11y: Unify column-by-index getting
...
We are only ever interested in visible columns. Invisible columns do not
exist for all a11y cares.
2011-11-16 04:39:25 +01:00
Benjamin Otte
bbf59c75d7
a11y: Use gtk_tree_view_get_n_columns()
...
In fact, invent our own function get_n_columns() which actually only
counts the visible functions, because that's the only ones we care
about.
The places where it's not used yet will be changed in the coming
patches.
2011-11-16 04:39:25 +01:00
Benjamin Otte
f7df354c5a
a11y: Fix get_column_index()
2011-11-16 04:39:25 +01:00
Benjamin Otte
f7fed686fd
a11y: remove argument from get_column_number()
...
The argument was always FALSE.
2011-11-16 04:39:25 +01:00
Benjamin Otte
b1fe9b6b8b
a11y: remove useless argument
...
The argument is unused these days, so don't confuse people with it.
2011-11-16 04:39:24 +01:00
Benjamin Otte
5af4ce6a66
a11y: Remove clean_rows function
...
It doesn't do anything anymore.
2011-11-16 04:39:24 +01:00
Benjamin Otte
c2410d0d04
a11y: Don't crete cell infos for non-children
...
When we use a container inbetween, this ensures that the cell infos
don't replace each other in the hash table.
2011-11-16 04:39:24 +01:00
Benjamin Otte
0b26a15b62
a11y: Make find by index lookup use the hash table again
...
This should give back the performance that was lost with the commit
"a11y: Make the cache lookup function inefficient".
2011-11-16 04:39:24 +01:00
Benjamin Otte
85fee33092
a11y: Add a hash function for cell infos
...
Note that comparing the tree is not necessary as the nodes are already
unique per row.
2011-11-16 04:39:24 +01:00
Benjamin Otte
104ddf8a6d
a11y: Compute the cell index quicker
...
We have the node available, so we can compute it from there.
2011-11-16 04:39:24 +01:00
Benjamin Otte
b8dec90f3a
a11y: Compute index the easy way
...
index is row_index * n_columns + column_index
We use it everywhere, why not here?
2011-11-16 04:39:24 +01:00
Benjamin Otte
acc5627e39
a11y: Redo indexing
...
We now index rows by actual expanded row number and don't count them
ourselves no more.
2011-11-16 04:39:24 +01:00
Benjamin Otte
e927a5b2c7
treeview: Redo row tracking
...
Track the RBNode/RBTree instead of keeping a TreeRowReference. This is a
whole lot faster and less error-prone.
Also, notify the accessible of removal of rows before actually removing
them, so we have a chance to clean up.
2011-11-16 04:39:23 +01:00
Benjamin Otte
24e4a03af2
a11y: Remove needless checks
...
The cell_row_ref and cell_col_ref variables are always non-NULL, so
there's no need to check it.
2011-11-16 04:39:23 +01:00
Benjamin Otte
918a9d0e3a
a11y: Add a cell_info_get_path() function
...
Reads better and we only need to change it in one place.
2011-11-16 04:39:23 +01:00
Benjamin Otte
9f91405d6c
a11y: Mark object as defunct in destroy notify
...
Instead of requiring a special functio to be called before just removing
from the hash table. This simplifies code a lot that used to remove from
the hash table.
2011-11-16 04:39:23 +01:00
Benjamin Otte
bd1bc88ed2
a11y: Remove in_use member
...
After the latest changes, it is now always TRUE, so adjust the code
accordingly.
2011-11-16 04:39:23 +01:00
Benjamin Otte
40b7e3044e
a11y: Don't garbage collect anymore
...
Instead, remove cell infos immediately from the hash table.
2011-11-16 04:39:23 +01:00
Benjamin Otte
64b825b87b
a11y: Improve cell_infos table
...
- Name it properly
- Make it just a set of cell_infos
Currently it's using direct hash, but as long as we don't actually
lookup stuff from it, who cares...
2011-11-16 04:39:23 +01:00
Benjamin Otte
71011f3e1e
a11y: Implement find_cell_info() using qdata lookup
...
That should be orders of magnitude faster then iterating over a hash
table.
2011-11-16 04:39:23 +01:00
Benjamin Otte
331a4c92b0
a11y: Store the cellinfo in the cell's qdata
2011-11-16 04:39:22 +01:00
Benjamin Otte
d265636526
a11y: Remove index from cellaccessible
...
That way we also get rid of the refresh_index function.
2011-11-16 04:39:22 +01:00
Benjamin Otte
f05d3f66b1
a11y: Don't use the cell's index anymore
...
We implement get_cell_index() now, so it's no longer necessary.
As a side effect, we need a different index for our hash table (which
now has a wrong name, but that will soon change).
2011-11-16 04:39:22 +01:00
Benjamin Otte
35b667a409
a11y: Implement get_child_index in treeview
2011-11-16 04:39:22 +01:00
Benjamin Otte
d5b52ae3b1
a11y: Implement get_child_index in treeviewaccessible
2011-11-16 04:39:22 +01:00
Benjamin Otte
a9dd3e559a
a11y: Make the cache lookup function inefficient
...
Ahem.
This is in preparation for future changes and is not meant to stay this
way. But I want to change the hash table's keys and this is way easier
when nobody is using them.
2011-11-16 04:31:06 +01:00
Benjamin Otte
ac29108586
a11y: Change function declaration
...
Returning an int seems way easier than having an int out argument to a
void function. Also, it doesn't lead to uninitialized memory, what a
concept!
2011-11-16 04:31:06 +01:00
Benjamin Otte
2bd69cbf8c
a11y: Remove idle handler for focus notifications
2011-11-16 04:31:06 +01:00
Benjamin Otte
0c2f454b41
a11y: Re-implement gtk_tree_view_accessible_get_n_rows()
...
... using the new _gtk_rbtree_find_index().
2011-11-16 04:31:06 +01:00
Benjamin Otte
2d3c36a021
a11y: Fix gcc warning
2011-11-10 17:10:04 +01:00
Benjamin Otte
1c96b0b838
a11y: It's not a bug if there's no row at some point
...
In that case, there's just nothing there.
2011-11-10 17:10:04 +01:00
Guillaume Desmottes
fb97c28bca
gtktreeviewaccessible: use a value_destroy_func with the cell_info_by_index hash
...
This ensures that we don't leak any GtkTreeViewAccessibleCellInfo when
re-inserting a new one with the same key.
https://bugzilla.gnome.org/show_bug.cgi?id=663694
2011-11-10 14:49:30 +01:00
Guillaume Desmottes
22807d8469
gtktreeviewaccessible: factor out cell_info_free()
...
https://bugzilla.gnome.org/show_bug.cgi?id=663694
2011-11-10 14:49:30 +01:00
Javier Jardón
0853ce3077
Use G_VALUE_INIT
...
Instead of an explicit { 0, } when declaring the variable.
2011-10-15 16:45:16 +01:00
Alban Crequy
6ab7b87a02
gtktreeviewaccessible: do not trigger an assertion
...
The following assertion was triggered in model_row_inserted() because
iterate_thru_children() modifies the parameter tree_model before passing it to
traverse_cells().
Gtk-CRITICAL **: gtk_tree_path_compare: assertion `b->depth > 0' failed
The stack with the bug was:
#0 gtk_tree_path_compare at gtktreemodel.c
#1 traverse_cells at gtktreeviewaccessible.c
#2 model_row_inserted at gtktreeviewaccessible.c
This patch calls iterate_thru_children() with a copy of the path so that the
original is not modified.
2011-09-23 12:04:39 -04:00
Matthias Clasen
e756b2e50d
Use canonical names
...
Use canonical names for both signals and properties.
2011-07-17 18:52:37 -04:00
Matthias Clasen
634e95eba1
Avoid more shadowing warnings
2011-07-10 00:20:17 -04:00
Matthias Clasen
ddfa756ac7
Convert GailCellParent to GtkCellAccessibleParent
2011-07-09 23:57:16 -04:00
Matthias Clasen
4e5629bed1
Convert GailTextCell to GtkTextCellAccessible
2011-07-09 23:57:16 -04:00
Matthias Clasen
7ddf0dff8f
Convert GailImageCell to GtkImageCellAccessible
2011-07-09 23:57:16 -04:00
Matthias Clasen
920c1c4c83
Convert GailRendererCell to GtkRendererCellAccessible
2011-07-09 23:57:16 -04:00
Matthias Clasen
3688c1a2d3
Convert GailBooleanCell to GtkBooleanCellAccessible
...
Including assorted cleanups and _-prefixing of exported API.
2011-07-09 23:57:16 -04:00
Matthias Clasen
1da67a2298
Convert GailContainerCell to GtkContainerCellAccessible
...
Including assorted cleanups and _-prefixing of exported API.
2011-07-09 23:57:16 -04:00
Matthias Clasen
07461459d4
Convert GailCell to GtkCellAccessible
...
Including _-prefixing the API to reduce unwanted exports.
2011-07-09 23:57:16 -04:00
Matthias Clasen
d98622b2ea
Reduce the number of unwanted exports
...
_-prefix most of the get_type functions in a11y/.
There are still some more symbols left.
2011-07-09 16:32:40 -04:00
Javier Jardon
8a84056d0a
gtktreeviewaccessible: free the string in the correct position
2011-07-06 14:36:29 +01:00
Matthias Clasen
b83122dc05
Drop use of factories for cell accessibles
2011-07-05 16:10:26 -04:00
Matthias Clasen
775ccf39e7
Initial conversion of GailWidget to GtkWidgetAccessible
2011-07-05 16:09:57 -04:00
Matthias Clasen
89e57c6978
Convert GailContainer to GtkContainerAccessible
2011-07-05 16:08:57 -04:00
Matthias Clasen
6012f096c9
Convert GailTreeView to GtkTreeViewAccessible
...
Mostly code rearrangement and cleanup, but also a memory
leak fix in gtk_tree_view_accessible_get_column_description().
2011-07-05 16:08:56 -04:00