text: Use dispose instead of destroy

The destroy vfunc is going away.
This commit is contained in:
Matthias Clasen 2020-05-05 16:48:59 -04:00
parent 8683925fe0
commit 7639d3daa0

View File

@ -313,7 +313,6 @@ static void gtk_text_dispose (GObject *object);
/* GtkWidget methods
*/
static void gtk_text_destroy (GtkWidget *widget);
static void gtk_text_realize (GtkWidget *widget);
static void gtk_text_unrealize (GtkWidget *widget);
static void gtk_text_unmap (GtkWidget *widget);
@ -717,7 +716,6 @@ gtk_text_class_init (GtkTextClass *class)
gobject_class->set_property = gtk_text_set_property;
gobject_class->get_property = gtk_text_get_property;
widget_class->destroy = gtk_text_destroy;
widget_class->unmap = gtk_text_unmap;
widget_class->realize = gtk_text_realize;
widget_class->unrealize = gtk_text_unrealize;
@ -1916,28 +1914,6 @@ gtk_text_init (GtkText *self)
set_text_cursor (GTK_WIDGET (self));
}
static void
gtk_text_destroy (GtkWidget *widget)
{
GtkText *self = GTK_TEXT (widget);
GtkTextPrivate *priv = gtk_text_get_instance_private (self);
priv->current_pos = priv->selection_bound = 0;
gtk_text_reset_im_context (self);
gtk_text_reset_layout (self);
if (priv->blink_tick)
{
gtk_widget_remove_tick_callback (widget, priv->blink_tick);
priv->blink_tick = 0;
}
if (priv->magnifier)
_gtk_magnifier_set_inspected (GTK_MAGNIFIER (priv->magnifier), NULL);
GTK_WIDGET_CLASS (gtk_text_parent_class)->destroy (widget);
}
static void
gtk_text_dispose (GObject *object)
{
@ -1947,7 +1923,18 @@ gtk_text_dispose (GObject *object)
GdkDevice *keyboard;
GtkWidget *chooser;
priv->current_pos = 0;
priv->current_pos = priv->selection_bound = 0;
gtk_text_reset_im_context (self);
gtk_text_reset_layout (self);
if (priv->blink_tick)
{
gtk_widget_remove_tick_callback (GTK_WIDGET (object), priv->blink_tick);
priv->blink_tick = 0;
}
if (priv->magnifier)
_gtk_magnifier_set_inspected (GTK_MAGNIFIER (priv->magnifier), NULL);
if (priv->buffer)
{