Add cast to GtkWidget* to match previous behaviour

This fixes minor problem which affected C++ plugins since
3e649dddef93723ebc2487d30023fc5f62d894ca where they would have to add
a the cast themselves.
This commit is contained in:
Matthew Brush 2017-09-21 17:35:39 -07:00 committed by Thomas Martitz
parent c3c1921c16
commit 16020ddc6c

View File

@ -74,11 +74,11 @@ G_BEGIN_DECLS
#if GTK_CHECK_VERSION(3, 0, 0) #if GTK_CHECK_VERSION(3, 0, 0)
/* Gtk[VH]Box */ /* Gtk[VH]Box */
# define compat_gtk_box_new(orientation, homogeneous, spacing) \ # define compat_gtk_box_new(orientation, homogeneous, spacing) \
g_object_new(GTK_TYPE_BOX, \ ((GtkWidget *)g_object_new(GTK_TYPE_BOX, \
"orientation", (orientation), \ "orientation", (orientation), \
"homogeneous", (homogeneous), \ "homogeneous", (homogeneous), \
"spacing", (spacing), \ "spacing", (spacing), \
NULL) NULL))
# define gtk_vbox_new(homogeneous, spacing) \ # define gtk_vbox_new(homogeneous, spacing) \
compat_gtk_box_new(GTK_ORIENTATION_VERTICAL, (homogeneous), (spacing)) compat_gtk_box_new(GTK_ORIENTATION_VERTICAL, (homogeneous), (spacing))
# define gtk_hbox_new(homogeneous, spacing) \ # define gtk_hbox_new(homogeneous, spacing) \