forked from AuroraMiddleware/gtk
Drop nonworking code to set a11y roles of tooltips
This code relied on widget names, and we don't set those anymore.
This commit is contained in:
parent
e1100813e6
commit
7624418ddf
@ -90,25 +90,16 @@ gtk_window_accessible_initialize (AtkObject *obj,
|
|||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GtkWidget *widget = GTK_WIDGET (data);
|
GtkWidget *widget = GTK_WIDGET (data);
|
||||||
const gchar *name;
|
|
||||||
|
|
||||||
ATK_OBJECT_CLASS (gtk_window_accessible_parent_class)->initialize (obj, data);
|
ATK_OBJECT_CLASS (gtk_window_accessible_parent_class)->initialize (obj, data);
|
||||||
|
|
||||||
g_signal_connect (data, "window-state-event", G_CALLBACK (window_state_event_cb), NULL);
|
g_signal_connect (data, "window-state-event", G_CALLBACK (window_state_event_cb), NULL);
|
||||||
_gtk_widget_accessible_set_layer (GTK_WIDGET_ACCESSIBLE (obj), ATK_LAYER_WINDOW);
|
_gtk_widget_accessible_set_layer (GTK_WIDGET_ACCESSIBLE (obj), ATK_LAYER_WINDOW);
|
||||||
|
|
||||||
name = gtk_widget_get_name (widget);
|
if (gtk_window_get_window_type (GTK_WINDOW (widget)) == GTK_WINDOW_POPUP)
|
||||||
|
|
||||||
if (!g_strcmp0 (name, "gtk-tooltip"))
|
|
||||||
obj->role = ATK_ROLE_TOOL_TIP;
|
|
||||||
else if (gtk_window_get_window_type (GTK_WINDOW (widget)) == GTK_WINDOW_POPUP)
|
|
||||||
obj->role = ATK_ROLE_WINDOW;
|
obj->role = ATK_ROLE_WINDOW;
|
||||||
else
|
else
|
||||||
obj->role = ATK_ROLE_FRAME;
|
obj->role = ATK_ROLE_FRAME;
|
||||||
|
|
||||||
/* Notify that tooltip is showing */
|
|
||||||
if (obj->role == ATK_ROLE_TOOL_TIP && gtk_widget_get_mapped (widget))
|
|
||||||
atk_object_notify_state_change (obj, ATK_STATE_SHOWING, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
|
Loading…
Reference in New Issue
Block a user