Commit Graph

516 Commits

Author SHA1 Message Date
Matthias Clasen
140e884868 Symbol exporting fixes 2012-02-21 01:50:19 +01:00
Matthias Clasen
e1a625aa78 GtkColorSwatch: Add accessible actions 2012-02-14 21:16:52 -05: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
dbabff0846 a11y: Invoke key snooper directly
Gets around the deprecated function warnings.
2012-01-19 10:32:21 +01:00
Benjamin Otte
ed8e7d1793 Revert "a11y: Remove keysnooping support"
This reverts commit 0c8ecba7dc.

The change broke Orca completely, and we need a proper fix first.
So we have to live with the bugs intorduced by this until then.
2012-01-18 18:33:11 +01:00
Matthias Clasen
3e6b37726a Remove a check that broke the color chooser a11y dump
With the visible check, the opacity slider ended up without
a labeled-by, which is sad.
2012-01-16 21:05:01 -05:00
Benjamin Otte
ff1e1e1f91 a11y: Disconnect from buffer signals
This way, we don't get crashes when the buffer is still in use after a
TextView gets finalized.

https://bugzilla.gnome.org/show_bug.cgi?id=667632
2012-01-12 04:45:34 +01:00
Benjamin Otte
0c8ecba7dc a11y: Remove keysnooping support
As previously announced, key snooping is something that we should not
support in GTK. In particular because AT-SPI made every key press a
synchronous DBUS call / spawned a nested main loop with the key
snoopers. This breaks responsiveness, order of key presses and internal
consistency when the AT decides to remove key events.
2012-01-06 05:23:42 +01:00
Matthias Clasen
2637240abe Remove an unnecessary warning
Don't warn if there's more than one mnemonic label for a widget,
and skip invisible labels.

Bug 665015
2011-12-30 02:01:15 -05:00
Benjamin Otte
902c5c6979 a11y: emit entry signals immediately
We want to emit signals when stuff happens, not sometime later. That way
we can also catch the correct text that was deleted.

https://bugzilla.gnome.org/show_bug.cgi?id=659445
2011-12-19 16:17:14 +01:00
Benjamin Otte
3d4a8dabb2 a11y: implement widget_(un)set in ContainerCell 2011-12-19 16:17:13 +01:00
Benjamin Otte
d2a58446ea a11y: Make GtkCellAccessible a GtkAccessible 2011-12-19 16:17:13 +01:00
Benjamin Otte
0c1f2f2fc1 widget: Set widget in accessible's constructor
No need to add t manually later.
2011-12-19 16:17:13 +01:00
Benjamin Otte
d801b28365 a11y: Don't connect_destroyed anymore
It's not used now that set_widget() does the right thing.
2011-12-19 16:17:13 +01:00
Benjamin Otte
1961be9ee9 iconview: Simplify adjustment monitoring for accessible 2011-12-19 16:17:13 +01:00
Benjamin Otte
4652d4c399 a11y: Remove widget_destroyed call
GtkAccessible does all of that for us now.
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
7b5b678e2e a11y: Fix crash in notebook
When the accessible was disposed before the notebook it referenced, the
weak ref could still trigger. This works around it.
2011-12-19 16:17:13 +01:00
Benjamin Otte
1305815bde iconview: Split out iconview accessible 2011-12-19 16:17:12 +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
b8b8ba8ed9 a11y: Make boolean cell render report its states the new way 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
4ac501736e a11y: Implement GtkContainerCellAccessible.update_cache 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
5cca6b2dc2 a11y: Remove unused function 2011-12-16 04:53:16 +01:00
Benjamin Otte
d2a9220006 a11y: remove now unused property lists 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
c28f641921 a11y: Add GtkRendererCellAcessible::renderer 2011-12-16 04:53:15 +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
Benjamin Otte
c9c7e91db9 a11y: Improve treeview's add/remove_selection() 2011-12-16 04:53:15 +01:00
Benjamin Otte
dc8f5effd4 a11y: Improve get_selected_rows() 2011-12-16 04:53:15 +01:00
Benjamin Otte
20b56689c5 a11y: Improve table_is_row_selected() 2011-12-16 04:53:15 +01:00
Benjamin Otte
3112679a5e treeview: Signal selection changes to the accessible
And another signal gone.
2011-12-16 04:53:15 +01:00
Benjamin Otte
1a3226e2f7 a11y: Emit children-changed properly for treeviews
Fixes the patch reverted in b7e74ef95f1d9cd851fb81a124beca0ca11dad00
properly.

https://bugzilla.gnome.org/show_bug.cgi?id=548782
2011-12-16 04:53:15 +01:00
Benjamin Otte
0005d820c7 treeview: Remove unnecessary accessible_expanded()
Instead, just call remove_state().
2011-12-16 04:53:15 +01:00
Benjamin Otte
c7b82c2cea treeview: Add add() function to accessible
... and use that to emit the insertion signals.
2011-12-16 04:53:14 +01:00
Benjamin Otte
82a9f6faa0 treeview: Set expandable flag from treeview
... instead of trying to update it manually.
2011-12-16 04:53:14 +01:00
Benjamin Otte
9e9533fc88 a11y: Redo cell accessible action handling
Multiple changes:
- actions are now available unconditionally, but only work in the right
  state. This mirrors other actions.
- instead of adding actions manually, they invoke the action on the
  GtkCellAccessibleParent interface.

Tests have been updated to reflect the changes
2011-12-16 04:53:14 +01:00
Benjamin Otte
f840efae96 a11y: Remove "toggle" action from cell renderers
This is identical to "edit" (even though that name is kinda confusing).
2011-12-16 04:53:14 +01:00
Benjamin Otte
adf183b71f treeview: Set EXPANDED state directly on a11y elements 2011-12-16 04:53:14 +01:00
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
ff80ae16d9 a11y: Readd FOCUSABLE state
The state was lost in commit 08d86fabc4.

Also order the states that are always set alphabetically.
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
7f42a9465a a11y: Add _gtk_cell_accessible_state_changed()
It's supposed to replace the old state_set calls.
2011-12-16 04:53:13 +01:00
Benjamin Otte
90f04b56a7 a11y: Split out renderer<->atk state matching
We now keep a state map. This makes adding new states easier, and
doesn't introduce bugs with state change emissions.
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
08d86fabc4 a11y: Implement ref_state_set using the new APIs
Various tiny semantic changes in here.

The big fix is that we consider every cell as visible and as showing if
the treeview is mapped.
This was also fixed in the tree dump test.
2011-11-24 18:29:45 +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
c3d96ff2c0 Improve AtkText implementations
There was some regressions from the recent display line fix;
while fixing it improve the test coverage and make GtkEntry
and GtkTextView return identical results.
2011-11-19 19:28:48 -05: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
533ee181de a11y: Add a special-case for cell index querying
I could have tried to make GtkContainerCellAccessible implement
GtkCellAccessibleParent, but the current implementation of that
interface doesn't make sense for it.
2011-11-16 04:31:06 +01:00
Benjamin Otte
02fd1e5a62 a11y: Add _gtk_cell_accessible_parent_get_child_index()
This will soon replace the shenanigans we do to keep the index of cells
current.
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
Matthias Clasen
4904a2f45b GtkTextViewAccessible: Respect display lines
This special tweak was lost when porting from GailTextUtil.

https://bugzilla.gnome.org/show_bug.cgi?id=663994
2011-11-15 00:25:18 -05:00
Matthias Clasen
005451e3f3 GtkComboBoxAccessible: Make keybindings work
https://bugzilla.gnome.org/show_bug.cgi?id=659151
2011-11-14 09:26:15 -05:00
Benjamin Otte
24b9599af7 a11y: Get rid of gtk.h includes in headers
This way, we can include them without accidentally including deprecated
code. Which means we can still use the recently added turning-off tricks
for deprecation warnings.
2011-11-10 17:10:04 +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
Matthias Clasen
feece3c0bb Move gtkstyle and gtkrc to deprecated/
This required a somewhat more substantial include reshuffling.
Some typedefs have been moved to gtkiconfactory.h and to
gtksettings.h.
2011-11-02 01:15:21 -04: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
Matthias Clasen
8f078992fd Include gdk.h in gail.c
This is needed so that we pick up deprecation macros here in the
future.
2011-10-11 15:01:41 -04:00
Benjamin Otte
a36b05fed7 a11y: Don't include gtkx when not needed 2011-09-30 23:23:36 +02:00
Benjamin Otte
4a43034761 a11y: Remove useless check 2011-09-30 23:23:36 +02: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
f1476f31fe a11y: Fix up listener registration minimally
For god-knows-what reason, at-spi is trying various formats
of strings when registering listeners, triggering g_warnings()
from gailutil code. Stop doing that.

Also, don't leak temporary string arrays that are a side-effect
of passing parameters around as formatted strings.

https://bugzilla.gnome.org/show_bug.cgi?id=658168
2011-09-05 11:56:54 -04:00
Alejandro Piñeiro
4244349600 a11y: Don't manage window events as a exception
https://bugzilla.gnome.org/show_bug.cgi?id=657260
2011-08-29 10:57:21 -04:00
Alejandro Piñeiro
08bf2e0463 a11y: Use AtkWindow on GtkWindowAccessible
GtkWindowAccessible doesn't require to define window related
signals. They are included on AtkWindow
2011-08-29 10:57:14 -04:00
Matthias Clasen
1090eba9a8 a11y: don't return random numbers
Return 0 for the image size if we don't have a pixbuf to measure.
2011-08-29 10:50:01 -04:00
Dan Winship
c4a5c99074 Fix cut-and-paste error in GtkEntryAccessible/GtkLabelAccessible
The y position of the character depends on the window's y coordinate,
not its x coordinate.
2011-08-10 15:19:56 -04:00
Benjamin Otte
b0e836e231 a11y: Merge gtksubmenuitem into gtkmenuitem
The reason why they were separate is historic, it's not useful to keep
the distinction.
2011-07-18 19:41:07 +02:00
Benjamin Otte
9306b266a0 a11y: Rename checksubmenuitem to checkmenuitem 2011-07-18 19:21:17 +02:00
Benjamin Otte
77f411c77a a11y: Remove gtkcheckmneuitemaccessible.[ch]
COde uses gtkchecksubmenuitemaccessible exclusively now. And I totally
dig these long finger-twisting names.
2011-07-18 19:05:28 +02:00
Benjamin Otte
fa16a54b21 a11y: Rename radiosubmenuitem to radiomenuitem 2011-07-18 19:01:40 +02:00
Benjamin Otte
438b78a27d a11y: Remove gtkradiomenuitemaccessible.[ch]
We use gtkradiosubmenuitemaccessible exclusively these days.
2011-07-18 18:47:12 +02:00
Benjamin Otte
d5ef8448bb checkbutton: Use gtk_widget_class_set_accessible_role() 2011-07-18 18:30:51 +02:00
Benjamin Otte
0c9b046af0 accellabel: Use gtk_widget_class_set_accessible_role() 2011-07-18 18:30:51 +02:00
Benjamin Otte
f2626b6183 menubar: Use gtk_widget_class_set_accessible_role() 2011-07-18 18:30:51 +02:00
Benjamin Otte
9c30ae02ee toolbar: Use gtk_widget_class_set_accessible_role() 2011-07-18 18:30:50 +02:00
Benjamin Otte
96245d4efb viewport: Use gtk_widget_class_set_accessible_role() 2011-07-18 18:30:50 +02:00
Benjamin Otte
d9bfa563d0 tearoffmenuitem: Use gtk_widget_class_set_accessible_role() 2011-07-18 18:30:50 +02:00
Benjamin Otte
480b5862d4 plug: Use gtk_widget_class_set_accessible_role() 2011-07-18 18:30:50 +02:00
Benjamin Otte
27f96820c8 fontsel: Use gtk_widget_class_set_accessible_role() 2011-07-18 18:30:50 +02:00
Benjamin Otte
c40875ad51 messagedialog: Use gtk_widget_class_set_accessible_role() 2011-07-18 18:30:50 +02:00
Benjamin Otte
6379faaa90 dialog: Use gtk_widget_class_set_accessible_role() 2011-07-18 18:30:50 +02:00
Benjamin Otte
2e570136f5 colorsel: Use gtk_widget_class_set_accessible_role() 2011-07-18 18:30:50 +02:00
Benjamin Otte
299b3bed96 filechooserdialog: Use gtk_widget_class_set_accessible_role() 2011-07-18 18:30:50 +02:00
Benjamin Otte
54e1caa428 a11y: Remove separator menu item special case
gtkseparator.c already takes care of this case.
2011-07-18 18:30:49 +02:00
Matthias Clasen
3bfa69fa53 Don't use object data for layer
Just add a regular member in GtkWidgetAccessible for it.
2011-07-17 23:17:38 -04:00
Matthias Clasen
6d33c783d0 Get rid of the focus_gtk vfunc
Only GtkWidgetAccessible and GtkWindowAccessible had implementations,
and they could easily be converted to focus_event handlers.
2011-07-17 23:04:00 -04:00
Matthias Clasen
2b5140c974 Avoid a compiler warning 2011-07-17 23:03:34 -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
dc2ae6c0a5 Don't emit a nonexisting signal
The signal is called "popdown", not "podown".
2011-07-17 18:45:46 -04:00
Matthias Clasen
102faa3037 GtkLabelAccessible: avoid extra selection-changed emissions
This copies the same code that the entry accessible uses
to check for selection changes.

https://bugzilla.gnome.org/show_bug.cgi?id=654428
2011-07-16 09:44:02 -04:00
Chun-wei Fan
5ab8120689 Added VS projects for a11y and libgail-util
-Added projects to compile the a11y portion of GTK+.  This is now necessary
 as a11y/GAIL is now integrated into the main GTK+ library, and it must
 be built before compiling/linking GTK+.  This project is done like the
 GDK/GTK+ projects, where the source file listings for the VS2008/2010
 projects are fed into templates (.vcprojin, .vcxprojin and
 .vcxproj.filtersin) during 'make dist'
-Added projects to compile the libgail-util DLL (no templates for this
 as this does not have source files added/removed often)
-Added the new projects into distribution, and headers, DLLs and .LIB files
 into the "install" stage
2011-07-14 11:53:36 +08:00
Chun-wei Fan
a32be5d7e6 Don't include unistd.h unconditionally 2011-07-13 15:27:28 +08:00
Matthias Clasen
5556ae9f80 Don't install any gail headers
There is no public API here.
2011-07-11 23:52:22 -04:00
Benjamin Otte
17d5afcae2 a11y: Only advertise action if menuitems are selectable
There's no "click" action for separatormenuitems, for example.
2011-07-11 03:08:32 +02:00
Benjamin Otte
a82cbf29a2 a11y: Don't advertise ROLE_MENU in submenuitems
We use submenuitems for all menuitems now. So they shouldn't be all
advertised as menus. For the ones that do have submenus, we still
advertise ROLE_MENU per the last patch.
2011-07-11 02:51:43 +02:00
Benjamin Otte
8f9493ddf2 a11y: Make menuitem accessible return ROLE_MENU when it has a submenu
Otherwise keep using the role set via atk_object_set_role().
2011-07-11 02:51:43 +02:00
Matthias Clasen
07380c1e64 Make all of a11y/ compile with -Wshadow 2011-07-10 00:24:26 -04:00
Matthias Clasen
634e95eba1 Avoid more shadowing warnings 2011-07-10 00:20:17 -04:00
Matthias Clasen
88312319c4 Avoid more compiler warnings
Turns out link is a shadow-happy name, too.
2011-07-10 00:16:53 -04:00
Matthias Clasen
1803e1b57c Avoid compiler warnings
The text variable in gtk_label_accessible_get_selection was
shadowing a parameter of the same name.
2011-07-10 00:10:54 -04:00
Matthias Clasen
9f58645eca Avoid compiler warnings
The obj variable in gtk_notebook_accessible_notify_gtk was shadowing
the parameter of the same name.
2011-07-10 00:10:20 -04:00
Matthias Clasen
a20c7ed214 Avoid unnecessary includes
Including string.h makes the compiler complain about parameters
and variables called index, which is not nice.
2011-07-10 00:10:15 -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
3846a59bab Drop a few more unwanted exports
Remaining now are just cell accessibles.
2011-07-09 16:43:39 -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
Matthias Clasen
671565245e Another forgotten static 2011-07-09 16:04:45 -04:00
Matthias Clasen
88537fb4cc Another forgotten static 2011-07-09 16:04:13 -04:00
Matthias Clasen
dc8d64d6f2 Add a forgotten static 2011-07-09 15:33:28 -04:00
Matthias Clasen
2aeb7042d0 Drop the fake GailUtil subclass
Since it is not a subclass at all. Instead, just have a function
that overrides the vfuncs in AtkUtilClass.
2011-07-09 15:33:28 -04:00
Benjamin Otte
05eb4113d9 a11y: Fix warnings when removing widgets that don't have accessibles
The remove handler would not check that removed widgets do indeed have
an accessible associated with them and would happily run all the removal
code with a NULL object. Not good.
2011-07-09 21:24:09 +02:00
Matthias Clasen
182b6f7a3c This is more horrible than I had realized
Due to tragic misunderstandings at the birth of ATK, AtkUtil
can't actually be properly derived. Instead, each implementation
has to poke its vfuncs directly into the AtkUtilClass struct.

So painful to have shipped this stuff for 10 years...
2011-07-08 23:20:06 -04:00
Matthias Clasen
d7ded58f51 Clean up gailutil.c a bit 2011-07-08 23:05:51 -04:00
Matthias Clasen
4c76d9fe31 Separate GailUtil and GailMisc
Not sure how these ended up as siamese twins in the same
source file. Of course, separating them doesn't make them
any more beautiful.
2011-07-08 22:52:03 -04:00
Matthias Clasen
56fb725a7e Convert GailToplevel to GtkToplevelAccessible 2011-07-08 22:39:00 -04:00
Matthias Clasen
9979e2a443 Drop remaining uses of gail_misc api
Fold them into their last remaining user, in gailtextcell.c
2011-07-08 22:03:13 -04:00
Matthias Clasen
64d3314a64 Drop now unused gail_misc API 2011-07-08 20:12:45 -04:00
Matthias Clasen
db1eeb0651 Drop gailtextutil from gtk/a11y
The last user was GailTextCell, and that can use gtk_pango
api instead.
2011-07-08 18:41:01 -04:00
Matthias Clasen
77db52ac9a We're no longer a module
And we don't support not loading the module anymore, either.
So take out the code that looks at environment variables for
that purpose, and don't print a misleading message about
module loading.
2011-07-08 16:37:07 -04:00
Matthias Clasen
fabc5a9117 gail_misc_add_attribute no longer used outside gailmisc.c
This reduces the number of unwanted exported gail symbols
from 90 to 89. Still some way to go...
2011-07-08 16:31:48 -04:00
Matthias Clasen
a38d119f16 Drop gail_misc_buffer_get_run_attributes
Instead fold the code into the sole caller and get rid
of gailmisc usage in the text view accessible altogether.
2011-07-06 23:19:40 -04:00
Matthias Clasen
d1b0ae62a5 Drop an unneeded include
One step close to dropping gailmisc.
2011-07-06 23:18:52 -04:00
Benjamin Otte
15ab20fdfb a11y: Make submenu code handle non-existing submenus
As we're going to merge the two accessibles for submenus, we need to
make sure the code that insisted on submenus can handle the case where
no submenu exists.
2011-07-06 20:55:11 +02:00
Benjamin Otte
d5dad3422b a11y: Fix leaking of state sets 2011-07-06 20:48:35 +02:00
Benjamin Otte
30930e643f a11y: Redo TextView cursor/selection signal handling
As part of the removal of idles, redo how we emit signals on the
accessible. Should work as good or better than before, but with a lot
less code.
2011-07-06 16:50:09 +02:00
Benjamin Otte
4abbe4cb52 a11y: Use the canonical way to connect to signals
No functional changes at all, the generated code should in fact be
identical.
2011-07-06 16:40:05 +02:00
Benjamin Otte
eeae39d359 a11y: Simplify code 2011-07-06 16:40:05 +02:00
Benjamin Otte
659d24c9ab a11y: Remove idle handler for switch action handling 2011-07-06 16:40:04 +02:00
Benjamin Otte
8efc350127 a11y: Remove set_description handling from GtkSwitch
The function is unused in AT-SPI.
2011-07-06 16:40:04 +02:00
Benjamin Otte
ccbe6c816b range: Do not use idles to trigger actions 2011-07-06 16:40:04 +02:00
Benjamin Otte
2870b58638 a11y: Don't use an idle handler for entry actions 2011-07-06 16:40:04 +02:00
Rico Tzschichholz
2c51d76c1f Fix two typos in Makefiles 2011-07-06 16:33:55 +02:00
Javier Jardon
8a84056d0a gtktreeviewaccessible: free the string in the correct position 2011-07-06 14:36:29 +01:00
Matthias Clasen
2980659ab1 Add api for setting the layer
Add api for setting the component layer, instead of open-coding
the object data key, and use it.
2011-07-05 16:10:26 -04:00
Matthias Clasen
e1463ab57c Silence compiler warnings 2011-07-05 16:10:26 -04:00
Matthias Clasen
5d90ca35c2 Set accessible parents of notebook children
Explicitly set the notebook page object as the accessible parent
of the page, otherwise, AtkObject follows the widget parents chain
and makes the notebook accessible the parent.
2011-07-05 16:10:26 -04:00
Matthias Clasen
b83122dc05 Drop use of factories for cell accessibles 2011-07-05 16:10:26 -04:00
Matthias Clasen
5559242ea9 Change the toolkit name in GailUtil to 'gtk', too 2011-07-05 16:10:25 -04:00
Matthias Clasen
b61043dcfa Change the toolkit attribute from gail to gtk
Update test results to match.
2011-07-05 16:10:25 -04:00
Matthias Clasen
eb81d45024 Move GtkSwitchAccessible to a11y/ 2011-07-05 16:10:25 -04:00
Matthias Clasen
e6251f0248 Move GtkSpinnerAccessible to a11y/ 2011-07-05 16:10:25 -04:00
Matthias Clasen
f839379d01 Drop the atk_component_add/remove_focus_handler implementation
Instead, just connect to focus-event directly.
2011-07-05 16:09:57 -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
64eec8a97a Convert GailMenuShell to GtkMenuShellAccessible 2011-07-05 16:08:57 -04:00
Matthias Clasen
0e2f3271b9 Convert GailMenu to GtkMenuAccessible 2011-07-05 16:08:57 -04:00
Matthias Clasen
ed08baccd9 Convert GailWindow to GtkWindowAccessible
While doing this, drop the get_mdi_zorder implementation
that really should come from the window manager side. Dropping
this saves some 500 lines.
2011-07-05 16:08:57 -04:00
Matthias Clasen
8432ea3574 Convert GailButton to GtkButtonAccessible
This drops the AtkText implementation, and also strips handling
of children out. Instead of listening for enter/leave/press/released,
just listen for state changes on the widget.
2011-07-05 16:08:57 -04:00
Matthias Clasen
a3113386df Drop unneeded includes of gdkkeysyms.h
Just a minor cleanup; gtk.h includes this header in GTK+ 3.
2011-07-05 16:08:57 -04:00
Matthias Clasen
254538bf77 Drop unneeded includes gailtextutil.h
Almost done with getting rid of GailTextUtil.
2011-07-05 16:08:57 -04:00
Matthias Clasen
3459dc480a Convert Gail(Sub)MenuItem to GtkAccessible classes
This is along the same lines as the previous commit,
with the same caveat.
2011-07-05 16:08:57 -04:00
Matthias Clasen
209a2d1ba0 Convert GailCheck(Sub)MenuItem to GtkAccessible classes
This is along the same lines as the previous commit,
with the same caveat.
2011-07-05 16:08:57 -04:00
Matthias Clasen
64b9599866 Convert GailRadio(Sub)MenuItem to GtkAccessible classes
The way submenus are handled here isn't really right, since
they can come and go at runtime, but I've left it like this
for now. A side-effect is that we can't use
gtk_widget_class_set_accessible_type here, but have to
override get_accessible.
2011-07-05 16:08:57 -04:00
Matthias Clasen
896769df69 Convert GailExpander to GtkExpanderAccessible
At the same time, drop the AtkText implementation.
Also, reintroduce a GtkBoxAccessible, since the previous
way of setting the role in get_accessible was affecting
GtkBox subclasses negatively.

Adjust expected test output to match.
2011-07-05 16:08:57 -04:00
Matthias Clasen
ff5eb4adfe Convert GailStatusbar to GtkStatusbarAccessible
And drop the AtkText implementation at the same time.
Update test results to match.
2011-07-05 16:08:56 -04:00
Matthias Clasen
9a0fd43df2 Convert GailNotebookPage to GtkNotebookPageAccessible
At the same time, drop the AtkText implementation, and simplify
accordingly. Test output has been updated to match.
2011-07-05 16:08:56 -04:00
Matthias Clasen
0bbe09a28e Avoid excessive child_changed::added emissions
We are listening to page-added and emit child_changed::added
in response to that, so don't let the add_gtk handler add
extraneous extra signal emissions. This fixes the child-handling
test for GtkNotebook.
2011-07-05 16:08:56 -04:00
Matthias Clasen
318192b937 Convert GailNotebook to GtkNotebookAccessible 2011-07-05 16:08:56 -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
Matthias Clasen
7371e3f7cf Convert GailComboBox to GtkComboBoxAccessible 2011-07-05 16:08:56 -04:00
Benjamin Otte
5d57716ef8 a11y: Make notebookpage emit child-added signal sync
Don't use an idle handler
2011-07-05 16:08:55 -04:00
Benjamin Otte
f59cb0e05d a11y: Keep the gail notebook in the notebook page
We used to keep the GtkNotebook, but that causes issues at creation time
of the GailNotebook, when the GtkNotebook does not yet have an
accessible set and so it can't be queried.
2011-07-05 16:08:55 -04:00
Benjamin Otte
790d8e324b a11y: Redo notebook page management
Previously, the code tried to track the indexes of the pages and keep
them up to date in a list and tracking the index in the
GtkNotebookPage. Now, we store the widget we are tracking in the
GailNotebookPage and keep a hash table of widget=>GailNotebookPage in the
GailNotebook. This frees us from the burden of tracking page changes.
2011-07-05 16:08:55 -04:00
Benjamin Otte
9cf9abd5b0 a11y: Redo notebok page lifetime management
It is now done by the GailNotebook. Previously it tried to do it itself.
Also, we now use GtkNotebook::page-removed to track the removal, as
opposed to child::parent-set.
2011-07-05 16:08:55 -04:00
Benjamin Otte
fdc40111f8 a11y: Remove idle handler from menuitem action 2011-07-05 16:08:55 -04:00
Benjamin Otte
3e49e2387c a11y: Remove idle handler for expander actions 2011-07-05 16:08:55 -04:00
Benjamin Otte
55dec3a798 a11y: Remove idle handler for combo box action 2011-07-05 16:08:55 -04:00
Benjamin Otte
05d7260e19 a11y: Remove idle handler from GailButton 2011-07-05 16:08:55 -04:00
Benjamin Otte
7c00940470 a11y: Use gtk_button_clicked() to click a button.
Don't fiddle with events.
2011-07-05 16:08:55 -04:00
Benjamin Otte
6b02119bb1 a11y: Remove "press" and "release" actions from buttons
http://mail.gnome.org/archives/gnome-accessibility-devel/2011-June/msg00020.html
has some details about this.
The main problem is that the internal button states get fiddled with and
that is not a good idea to do from an AT.

Also update tests to reflect that.
2011-07-05 16:08:55 -04:00
Benjamin Otte
8e28e22bcf a11y: Do actions on cells immediately
No idle handlers, please.
2011-07-05 16:08:55 -04:00
Benjamin Otte
52c0933bc0 a11y: Use simple code for window name change tracking
Remove idle handler and omit checking if the name really was changed.
ATs will either have to live with the name not really changoing or we
should check in GtkWindow.
2011-07-05 16:08:55 -04:00
Matthias Clasen
0b952dcc85 Emit the same changed_children details as everybody else
...if any of this was documented...
2011-07-05 16:08:55 -04:00
Matthias Clasen
48c3d8e1cf Drop gail-private-macros.h
Nothing like obfuscating an early return behind a macro.
2011-07-05 16:08:55 -04:00
Matthias Clasen
53c90cebb2 Convert GailScrolledWindow to GtkScrolledWindowAccessible 2011-07-05 16:08:54 -04:00
Matthias Clasen
fecefc6cdf Drop use of gail_return_if_fail 2011-07-05 16:08:54 -04:00
Matthias Clasen
3ab623e391 Fix a test crash 2011-07-05 16:08:54 -04:00
Matthias Clasen
f052710b85 Remove old files 2011-07-05 16:08:54 -04:00
Matthias Clasen
13e8bace97 Convert GailScaleButton to GtkScaleButtonAccessible 2011-07-05 16:08:54 -04:00
Matthias Clasen
583a5e4ea4 Drop another unused include 2011-07-05 16:08:54 -04:00
Matthias Clasen
a8b67d2064 Convert GailToggleButton to GtkToggleButtonAccessible 2011-07-05 16:08:54 -04:00