[gtk/wip/otte/listview: 39/44] widget: Do parent_class handling properly
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/listview: 39/44] widget: Do parent_class handling properly
- Date: Sun, 15 Dec 2019 19:02:52 +0000 (UTC)
commit a26a343cf01698592888a7c21ff9806a8e816d3e
Author: Benjamin Otte <otte redhat com>
Date: Tue Nov 26 19:40:29 2019 +0100
widget: Do parent_class handling properly
The previous cosde did not actually query the parent class, it just did
a very complicated C cast.
gtk/gtkwidget.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 39d2e60e50..2b4e68f423 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -13524,9 +13524,9 @@ gtk_widget_class_add_action (GtkWidgetClass *widget_class,
if (priv->actions == NULL)
priv->actions = g_ptr_array_new ();
- else if (GTK_IS_WIDGET_CLASS (&widget_class->parent_class))
+ else if (G_TYPE_FROM_CLASS (widget_class) != GTK_TYPE_WIDGET)
{
- GtkWidgetClass *parent_class = GTK_WIDGET_CLASS (&widget_class->parent_class);
+ GtkWidgetClass *parent_class = GTK_WIDGET_CLASS (g_type_class_peek_parent (widget_class));
GtkWidgetClassPrivate *parent_priv = parent_class->priv;
GPtrArray *parent_actions = parent_priv->actions;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]