summaryrefslogtreecommitdiff
path: root/gtk/gtkruler.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@nuclecu.unam.mx>1998-02-12 03:02:14 +0000
committerArturo Espinosa <unammx@src.gnome.org>1998-02-12 03:02:14 +0000
commit9dee8ee4e4fca545ae4b2a2d41aa748cdc8cac1a (patch)
tree39139a8cfbfcc7907bc0a6a5a7068ff53f457b59 /gtk/gtkruler.c
parent31a238b6b67f5d45ecb0c82d950da47a85052108 (diff)
downloadgdk-pixbuf-9dee8ee4e4fca545ae4b2a2d41aa748cdc8cac1a.tar.gz
Fixed unrealize handler to comply with the documentation (which mentions
2018-02-11 Federico Mena Quintero <federico@nuclecu.unam.mx> * gtk/gtkclist.c: * gtk/gtkentry.c: * gtk/gtkfixed.c: * gtk/gtkhandlebox.c: * gtk/gtknotebook.c: * gtk/gtkpaned.c: * gtk/gtkpreview.c: * gtk/gtkrange.c: * gtk/gtkruler.c: * gtk/gtktext.c: * gtk/gtkviewport.c: Fixed unrealize handler to comply with the documentation (which mentions the right thing to do).
Diffstat (limited to 'gtk/gtkruler.c')
-rw-r--r--gtk/gtkruler.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gtk/gtkruler.c b/gtk/gtkruler.c
index 5876ba9fa..009d1e641 100644
--- a/gtk/gtkruler.c
+++ b/gtk/gtkruler.c
@@ -29,6 +29,8 @@ static gint gtk_ruler_expose (GtkWidget *widget,
static void gtk_ruler_make_pixmap (GtkRuler *ruler);
+static GtkWidgetClass *parent_class;
+
static GtkRulerMetric ruler_metrics[] =
{
{"Pixels", "Pi", 1.0, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }},
@@ -70,6 +72,8 @@ gtk_ruler_class_init (GtkRulerClass *class)
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
+ parent_class = gtk_type_class (gtk_widget_get_type ());
+
widget_class->realize = gtk_ruler_realize;
widget_class->unrealize = gtk_ruler_unrealize;
widget_class->size_allocate = gtk_ruler_size_allocate;
@@ -194,12 +198,6 @@ gtk_ruler_unrealize (GtkWidget *widget)
g_return_if_fail (GTK_IS_RULER (widget));
ruler = GTK_RULER (widget);
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED | GTK_MAPPED);
-
- gtk_style_detach (widget->style);
- gdk_window_set_user_data (widget->window, NULL);
- gdk_window_destroy (widget->window);
- widget->window = NULL;
if (ruler->backing_store)
gdk_pixmap_unref (ruler->backing_store);
@@ -208,6 +206,9 @@ gtk_ruler_unrealize (GtkWidget *widget)
ruler->backing_store = NULL;
ruler->non_gr_exp_gc = NULL;
+
+ if (GTK_WIDGET_CLASS (parent_class)->unrealize)
+ (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
}
static void