forked from AuroraMiddleware/gtk
treeview: update to gesture widget-level API changes
This commit is contained in:
parent
c4a39f5abf
commit
6350f58c1c
@ -1842,9 +1842,8 @@ gtk_tree_view_init (GtkTreeView *tree_view)
|
||||
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (tree_view->priv->multipress_gesture), FALSE);
|
||||
g_signal_connect (tree_view->priv->multipress_gesture, "pressed",
|
||||
G_CALLBACK (_tree_view_multipress_pressed), tree_view);
|
||||
gtk_widget_add_gesture (GTK_WIDGET (tree_view),
|
||||
tree_view->priv->multipress_gesture,
|
||||
GTK_PHASE_BUBBLE);
|
||||
gtk_widget_add_controller (GTK_WIDGET (tree_view),
|
||||
GTK_EVENT_CONTROLLER (tree_view->priv->multipress_gesture));
|
||||
}
|
||||
|
||||
|
||||
@ -2209,6 +2208,13 @@ gtk_tree_view_destroy (GtkWidget *widget)
|
||||
_gtk_pixel_cache_free (tree_view->priv->pixel_cache);
|
||||
tree_view->priv->pixel_cache = NULL;
|
||||
|
||||
if (tree_view->priv->multipress_gesture)
|
||||
{
|
||||
gtk_widget_remove_controller (GTK_WIDGET (tree_view),
|
||||
GTK_EVENT_CONTROLLER (tree_view->priv->multipress_gesture));
|
||||
g_clear_object (&tree_view->priv->multipress_gesture);
|
||||
}
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_tree_view_parent_class)->destroy (widget);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user