a11y: Use widget_unset vfunc in treeview
This commit is contained in:
parent
dbc1581376
commit
80a0413d40
@ -244,34 +244,17 @@ gtk_tree_view_accessible_notify_gtk (GObject *obj,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_tree_view_accessible_destroyed (GtkWidget *widget,
|
gtk_tree_view_accessible_widget_unset (GtkAccessible *gtkaccessible)
|
||||||
GtkAccessible *gtk_accessible)
|
|
||||||
{
|
{
|
||||||
GtkTreeViewAccessible *accessible;
|
GtkTreeViewAccessible *accessible = GTK_TREE_VIEW_ACCESSIBLE (gtkaccessible);
|
||||||
|
|
||||||
if (!GTK_IS_TREE_VIEW (widget))
|
|
||||||
return;
|
|
||||||
|
|
||||||
accessible = GTK_TREE_VIEW_ACCESSIBLE (gtk_accessible);
|
|
||||||
|
|
||||||
if (accessible->focus_cell)
|
if (accessible->focus_cell)
|
||||||
{
|
{
|
||||||
g_object_unref (accessible->focus_cell);
|
g_object_unref (accessible->focus_cell);
|
||||||
accessible->focus_cell = NULL;
|
accessible->focus_cell = NULL;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
GTK_ACCESSIBLE_CLASS (_gtk_tree_view_accessible_parent_class)->widget_unset (gtkaccessible);
|
||||||
gtk_tree_view_accessible_connect_widget_destroyed (GtkAccessible *accessible)
|
|
||||||
{
|
|
||||||
GtkWidget *widget;
|
|
||||||
|
|
||||||
widget = gtk_accessible_get_widget (accessible);
|
|
||||||
if (widget)
|
|
||||||
g_signal_connect_after (widget, "destroy",
|
|
||||||
G_CALLBACK (gtk_tree_view_accessible_destroyed), accessible);
|
|
||||||
|
|
||||||
GTK_ACCESSIBLE_CLASS (_gtk_tree_view_accessible_parent_class)->connect_widget_destroyed (accessible);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
@ -584,7 +567,7 @@ _gtk_tree_view_accessible_class_init (GtkTreeViewAccessibleClass *klass)
|
|||||||
|
|
||||||
widget_class->notify_gtk = gtk_tree_view_accessible_notify_gtk;
|
widget_class->notify_gtk = gtk_tree_view_accessible_notify_gtk;
|
||||||
|
|
||||||
accessible_class->connect_widget_destroyed = gtk_tree_view_accessible_connect_widget_destroyed;
|
accessible_class->widget_unset = gtk_tree_view_accessible_widget_unset;
|
||||||
|
|
||||||
/* The children of a GtkTreeView are the buttons at the top of the columns
|
/* The children of a GtkTreeView are the buttons at the top of the columns
|
||||||
* we do not represent these as children so we do not want to report
|
* we do not represent these as children so we do not want to report
|
||||||
|
Loading…
Reference in New Issue
Block a user