mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-10 12:40:10 +00:00
menubutton: Warn about deprecated buildable features
<child> is deprecated for setting child properties
This commit is contained in:
parent
458560505e
commit
98bed3561e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user