Re: [g-a-devel] Adding an AtkObject attribute?



Alejandro Piñeiro, le mar. 05 juin 2018 15:19:28 +0200, a ecrit:
On 04/06/18 14:40, Samuel Thibault wrote:
I'm wondering: can I perhaps just make caja_desktop_window_init replace
the accessible's get_attributes method with its own method, which
would call gtk_widget_accessible_get_attributes and append the desired
attribute to the attribute set before returning it?

I guess that instead of caja_desktop_window_init you mean something ilke
caja_desktop_window_class_init. If that is the case, yes, that is the
usual way to go. In general we can see AtkObject attributes as class
attributes. You can find an example of the get_attributes override at
GtkEntryAccessible.

Ok, thanks for confirming!

Note that the custom get_attributes calls first the parent
get_atributes, and then it adds their own ones (in this case
"placeholder-text").

Yep, sure!

Samuel


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]