Commit Graph

14404 Commits

Author SHA1 Message Date
Matthias Clasen
2f758b9b50 GtkEntryAccessible: shorten some function names
Just cosmetics
2011-07-05 16:08:09 -04:00
Matthias Clasen
ca166c9a1e Remove a bit of dead code 2011-07-05 16:08:08 -04:00
Matthias Clasen
442ec1b624 GtkEntryAccessible: Clean up the AtkAction implementation a bit
No functional changes.
2011-07-05 16:08:08 -04:00
Matthias Clasen
99a54565a3 Purge traces of insert idle handler 2011-07-05 16:08:08 -04:00
Matthias Clasen
212241ffda GtkEntryAccessible: Rework text_changed handling
No more signal emission from an idle.
2011-07-05 16:08:08 -04:00
Matthias Clasen
a1cf2315a0 Fix up signal ordering issues in GtkEntry
Ensure that text and selection boundaries are in a
consistent state when we emit notifications, that ::insert-text
and ::delete-text are emitted before any changes, and that
::changed is emitted after property notifications when inserting
or deleting text.
2011-07-05 16:08:08 -04:00
Matthias Clasen
5398a160ad Add a test for entry signals
These tests check that text and selection boundaries are in a
consistent state when we emit notifications, that ::insert-text
and ::delete-text are emitted before any changes, and that
::changed is emitted after property notifications when inserting
or deleting text.
2011-07-05 16:08:08 -04:00
Matthias Clasen
7872c2c19e GtkEntryAccessible: port from GailTextUtil to GtkPango
Also clean up and rearrange the code.
As a side-effect, the no-longer-existing stipple attributes
are dropped.  Update test results to match.
2011-07-05 16:08:08 -04:00
Matthias Clasen
b83ee1e5f9 Allow use of private api in a11y/ 2011-07-05 16:08:08 -04:00
Matthias Clasen
52a2e1e628 Trivial whitespace fix 2011-07-05 16:08:08 -04:00
Matthias Clasen
6c7e858286 GtkSpinButtonAccessible: Coding style cleanups
And some code rearrangement.
2011-07-05 16:08:08 -04:00
Matthias Clasen
918514d51d First cut at GailEntry -> GtkEntryAccessible
Replace the factory for entry and spin button with
gtk_widget_class_set_accessible_type() calls, and move then
to the GtkAccessible namespace.
2011-07-05 16:08:08 -04:00
Matthias Clasen
c2d1e3eeb0 Avoid warnings in clipboard code
The a11y selection tests poke the selection on unrealized
labels. Don't spew warnings in this case.
2011-07-05 16:08:08 -04:00
Matthias Clasen
c74ccbb86e Port GtkLabelAccessible from GailTextUtil to GtkPango api
Unfortunately, we still keep a copy of the text around, for
::insert/::delete signals; those emissions need to be moved to
GtkLabel itself.
2011-07-05 16:08:07 -04:00
Matthias Clasen
1164ceb4fc GtkStyleContext: add some aux. a11y api
This function translates the fg/bg color into atk attributes.
2011-07-05 16:08:07 -04:00
Matthias Clasen
1f2b8a6545 Add some aux. pango api to help AtkText implementations
These functions are implementations of the AtkText api on top
of a PangoLayout, and are intended to replace GailTextUtil.

Since gtkpango.h is a private header, also remove the individual
inclusion prohibition.
2011-07-05 16:08:07 -04:00
Matthias Clasen
889b2714d5 GtkLabel: factor out two getters
Make the get_property switch look a little nicer.
We export these functions privately for use in the label
accessible implementation later on.
2011-07-05 16:08:07 -04:00
Benjamin Otte
504c0fdc27 messagedialog: Initialize style values in init()
Fixes underallocation warnings
2011-07-05 16:08:07 -04:00
Benjamin Otte
5ec01aac61 a11y: Remove setters for column description/header 2011-07-05 16:08:07 -04:00
Benjamin Otte
44e4b94acb a11y: Make treeview header and caption no longer settable
It's not exposed in AT-SPI so we don't need it.
2011-07-05 16:08:07 -04:00
Benjamin Otte
56ebb3dd0e a11y: Remove setters for row description/header
AT-SPI doesn't expose them, so there's no need to keep them.
2011-07-05 16:08:07 -04:00
Matthias Clasen
1b8c38f6e1 GtkHSV: set a suitable role for the accessible
The consensus of the accessibility team was that 'color chooser'
fits best for this. Update tests to match.
2011-07-05 16:08:07 -04:00
Matthias Clasen
3edebfb81c GtkSpinner: set a suitable role for the accessible
The consensus of the accessibility team was that this is
an animation. Update tests to match.
2011-07-05 16:08:07 -04:00
Matthias Clasen
828d70c6d7 GtkLabelAccessible: remove redundant check
We always have the textutil now, so remove some NULL checks.
Also, never say 'State is defunct' again...
2011-07-05 16:08:06 -04:00
Matthias Clasen
dddf587aec GtkLabel: freeze property notification where appropriate
When setting properties that require recalculating the label
text, freeze notification until the label is properly updated.
This fixes bug 126797.
2011-07-05 16:08:06 -04:00
Matthias Clasen
441bf26a2e GtkLabelAccessible: remove broken workarounds
This removes a horrible workaround for bug 126797. To prevent
picking up accidental markup in label texts, the label accessible
is listening for window creation and mapping and defers initializing
its text until then.
2011-07-05 16:08:06 -04:00
Matthias Clasen
a381fd288c GailLabel -> GtkLabelAccessible
A first experimental conversion from the gail namespace to gtkaccessible.
At the same time, use gtk_widget_class_set_accessible_type() to register
the accessible type for GtkLabel.
2011-07-05 16:08:06 -04:00
Matthias Clasen
a0790f1000 Remove gail_widget_new()
The function was unused and unnecessary.
2011-07-05 16:08:06 -04:00
Matthias Clasen
e80e585639 Forgotten file 2011-07-05 16:08:06 -04:00
Matthias Clasen
2deeab4c4f GailTreeView: optimize a bit
Avoid many unnecessary list iterations by using a hash table
to store cell infos, and caching row and column counts. Based
on patches by William Jon McCann, bug 554171.

tree-performance results:

before:  (MINPERF:large tree test with a11y: 9.18531sec)
after:   (MINPERF:large tree test with a11y: 0.923463sec)

for comparison, without accessibility:
(MINPERF:large tree test: 0.016179sec)
2011-07-05 16:08:05 -04:00
Matthias Clasen
4573659deb Don't pass NULL to functions expecing a real string
...and when you do pass them a real string, don't leak it.
2011-07-05 16:08:04 -04:00
Benjamin Otte
521f9e2f15 gail: Add support for action_set_description
As set_description is never called and unsupported by the at-spi, we can
omit implementing it.
This means we can also omit get_description calls in various places, as
they'd just return the default value: NULL.
2011-07-05 16:08:04 -04:00
Benjamin Otte
9ddea3f4e1 a11y: Remove hack for old code
This code was supposed to work around a bad interaction between GOK and
Nautilus from 7 years ago.
If it still exists, the GOK developers may complain to the Nautilus
developers.

https://bugzilla.gnome.org/show_bug.cgi?id=137401
2011-07-05 16:08:04 -04:00
Benjamin Otte
a65cb51d49 gail: Remove useless code
The ATK default code does the same thing as these two functions.
2011-07-05 16:08:04 -04:00
Matthias Clasen
ffb6df5f42 GailTreeView: deal with absence of model 2011-07-05 16:08:02 -04:00
Matthias Clasen
7f44184f61 GailImageCell: Deal with absence of pixbufs
...and when there are pixbufs, don't leak them.
2011-07-05 16:08:02 -04:00
Matthias Clasen
0f8823b4a4 Fix dependencies between directories
This ensures that libgtk gets relinked when I touch sources
in gtk/a11y.
2011-07-05 16:08:02 -04:00
Benjamin Otte
4227a63f48 widget: Use g_type_add_class_private()
It turns out that that funciton does indeed exist and my rant was just
outdated. Shame on me.
2011-07-05 16:08:01 -04:00
Benjamin Otte
5449ec0a30 gail: Fix compile warning 2011-07-05 16:08:01 -04:00
Benjamin Otte
fd5ceee925 tests: undefine GTK_DISABLE_DEPRECATED as we include deprecated types 2011-07-05 16:08:01 -04:00
Matthias Clasen
17e219fbce Remove debug spew 2011-07-05 16:08:01 -04:00
Matthias Clasen
054057a640 Fix GtkSwitchAccessible type definition
It turns out that ATK_DEFINE_TYPE_WITH_CODE() is broken; it
tells GType that the class and instance size for the accessible
type are the same as for its parent type. Which is not true
if your instance struct has members such as 'description' here.
This was causing hard-to-track-down memory corruption, since
description and the GtkAccessible private pointer were sharing
the same memory location.
2011-07-05 16:08:00 -04:00
Matthias Clasen
0311ffe023 Fix some problems with the GailLinkButton implementation 2011-07-05 16:07:59 -04:00
Matthias Clasen
9860acfcbe Remove remnants of GnomeCanvas
There were some random places where gail was poking at types
to see if they were a GnomeCanvas. Just remove this.
2011-07-05 16:07:58 -04:00
Benjamin Otte
ebf8bf0000 API: Add gtk_widget_class_set_accessible_type()
The function is supposed to bypass the ATK registry. For 2 reasons:
1) We get rid of a lot of boilerplate madness.
2) The registry allows creating multiple accessibles per widget and we
   don't.

The old code for registries is still there.
2011-07-05 16:07:57 -04:00
Benjamin Otte
9ebcd66d43 widget: Add a GtkWidgetClassPrivate
As long as glib doesn't provide class privates, we'll have to ship our
own...
2011-07-05 16:07:57 -04:00
Benjamin Otte
dfe5459437 a11y: Remove unused HTML objects
Seems they were for GtkHTML and never used since GAIL got imported into
GTK.
2011-07-05 16:07:57 -04:00
Matthias Clasen
d4a1a03614 No need for gail.h 2011-07-05 16:07:57 -04:00
Matthias Clasen
9453332cce NO_GAIL not used anymore 2011-07-05 16:07:57 -04:00
Matthias Clasen
f1bf642c98 We're not a module anymore
So no need to implement module entry points; and libgnome is
dead too, so no need to export functions for it either.
2011-07-05 16:07:57 -04:00