[gtk/wip/baedert/for-master: 13/32] text: Stop implementing destroy()
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 13/32] text: Stop implementing destroy()
- Date: Sun, 6 Oct 2019 07:08:09 +0000 (UTC)
commit c9873a4e90548443295f062af1c7196418e097c6
Author: Timm Bäder <mail baedert org>
Date: Wed Oct 2 13:06:31 2019 +0200
text: Stop implementing destroy()
gtk/gtktext.c | 38 +++++++++++++-------------------------
1 file changed, 13 insertions(+), 25 deletions(-)
---
diff --git a/gtk/gtktext.c b/gtk/gtktext.c
index ffe683fed7..6070cc741c 100644
--- a/gtk/gtktext.c
+++ b/gtk/gtktext.c
@@ -302,7 +302,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);
@@ -688,7 +687,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;
@@ -1753,28 +1751,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)
{
@@ -1783,7 +1759,7 @@ gtk_text_dispose (GObject *object)
GdkKeymap *keymap;
GtkWidget *chooser;
- priv->current_pos = 0;
+ priv->current_pos = priv->selection_bound = 0;
if (priv->buffer)
{
@@ -1804,6 +1780,18 @@ gtk_text_dispose (GObject *object)
g_clear_pointer (&priv->popup_menu, gtk_widget_unparent);
g_clear_object (&priv->extra_menu);
+ gtk_text_reset_im_context (self);
+ gtk_text_reset_layout (self);
+
+ if (priv->blink_tick)
+ {
+ gtk_widget_remove_tick_callback (GTK_WIDGET (self), priv->blink_tick);
+ priv->blink_tick = 0;
+ }
+
+ if (priv->magnifier)
+ _gtk_magnifier_set_inspected (GTK_MAGNIFIER (priv->magnifier), NULL);
+
G_OBJECT_CLASS (gtk_text_parent_class)->dispose (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]