a11y: Rename some methods

Our EditableText implementation works fine for any
editable, so don't name the functions in a way that
looks like they are only for entries.
This commit is contained in:
Matthias Clasen 2020-10-19 12:58:29 -04:00
parent 80e0e3fe4f
commit 63421b1876

View File

@ -59,14 +59,14 @@ text_received (GObject *source,
}
static void
entry_handle_method (GDBusConnection *connection,
const gchar *sender,
const gchar *object_path,
const gchar *interface_name,
const gchar *method_name,
GVariant *parameters,
GDBusMethodInvocation *invocation,
gpointer user_data)
editable_handle_method (GDBusConnection *connection,
const gchar *sender,
const gchar *object_path,
const gchar *interface_name,
const gchar *method_name,
GVariant *parameters,
GDBusMethodInvocation *invocation,
gpointer user_data)
{
GtkATContext *self = user_data;
GtkAccessible *accessible = gtk_at_context_get_accessible (self);
@ -175,8 +175,8 @@ entry_handle_method (GDBusConnection *connection,
}
}
static const GDBusInterfaceVTable entry_vtable = {
entry_handle_method,
static const GDBusInterfaceVTable editable_vtable = {
editable_handle_method,
NULL,
};
@ -348,11 +348,8 @@ static const GDBusInterfaceVTable text_view_vtable = {
const GDBusInterfaceVTable *
gtk_atspi_get_editable_text_vtable (GtkAccessible *accessible)
{
if (GTK_IS_ENTRY (accessible) ||
GTK_IS_SEARCH_ENTRY (accessible) ||
GTK_IS_PASSWORD_ENTRY (accessible) ||
GTK_IS_SPIN_BUTTON (accessible))
return &entry_vtable;
if (GTK_IS_EDITABLE (accessible))
return &editable_vtable;
else if (GTK_IS_TEXT_VIEW (accessible))
return &text_view_vtable;