diff --git a/gtk/gtkmenubutton.c b/gtk/gtkmenubutton.c index 99b9b4207f..b29fb3317f 100644 --- a/gtk/gtkmenubutton.c +++ b/gtk/gtkmenubutton.c @@ -106,6 +106,7 @@ #include "gtkbuttonprivate.h" #include "gtknative.h" #include "gtkwindow.h" +#include "gtkbuilderprivate.h" typedef struct _GtkMenuButtonClass GtkMenuButtonClass; typedef struct _GtkMenuButtonPrivate GtkMenuButtonPrivate; @@ -700,9 +701,14 @@ gtk_menu_button_buildable_add_child (GtkBuildable *buildable, const char *type) { if (GTK_IS_WIDGET (child)) - gtk_menu_button_set_child (GTK_MENU_BUTTON (buildable), GTK_WIDGET (child)); + { + gtk_buildable_child_deprecation_warning (buildable, builder, NULL, "child"); + gtk_menu_button_set_child (GTK_MENU_BUTTON (buildable), GTK_WIDGET (child)); + } else - parent_buildable_iface->add_child (buildable, builder, child, type); + { + parent_buildable_iface->add_child (buildable, builder, child, type); + } } static void