diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-06-13 19:31:48 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-06-13 19:39:45 +0000 |
commit | f1fe54f337453fa58b081690368d5931b5b777a0 (patch) | |
tree | 5116bfdf93359f9c378b813e7a910ace8e624460 /gtk/gtkmenubutton.c | |
parent | 0740445d199b1f08e4f5786845557b25eac84445 (diff) | |
download | gtk+-f1fe54f337453fa58b081690368d5931b5b777a0.tar.gz |
headerbar: Fix fallback appmenu
We were using menubuttons here in a way that
does not work anymore. Make it work again.
Diffstat (limited to 'gtk/gtkmenubutton.c')
-rw-r--r-- | gtk/gtkmenubutton.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gtk/gtkmenubutton.c b/gtk/gtkmenubutton.c index c4813ebbc7..f3a6742ae3 100644 --- a/gtk/gtkmenubutton.c +++ b/gtk/gtkmenubutton.c @@ -1434,3 +1434,17 @@ gtk_menu_button_popdown (GtkMenuButton *menu_button) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->button), FALSE); } + +void +gtk_menu_button_add_child (GtkMenuButton *menu_button, + GtkWidget *new_child) +{ + GtkMenuButtonPrivate *priv = gtk_menu_button_get_instance_private (menu_button); + GtkWidget *child; + + child = gtk_bin_get_child (GTK_BIN (priv->button)); + if (child) + gtk_container_remove (GTK_CONTAINER (priv->button), child); + + gtk_container_add (GTK_CONTAINER (priv->button), new_child); +} |