diff --git a/gtk/gtktext.c b/gtk/gtktext.c index cad6044f42..377be4a192 100644 --- a/gtk/gtktext.c +++ b/gtk/gtktext.c @@ -2003,8 +2003,7 @@ gtk_text_ensure_magnifier (GtkText *self) gtk_widget_set_parent (priv->magnifier_popover, GTK_WIDGET (self)); gtk_widget_add_css_class (priv->magnifier_popover, "magnifier"); gtk_popover_set_autohide (GTK_POPOVER (priv->magnifier_popover), FALSE); - gtk_container_add (GTK_CONTAINER (priv->magnifier_popover), - priv->magnifier); + gtk_popover_set_child (GTK_POPOVER (priv->magnifier_popover), priv->magnifier); gtk_widget_show (priv->magnifier); } @@ -6003,7 +6002,7 @@ append_bubble_item (GtkText *self, gtk_widget_set_focus_on_click (item, FALSE); image = gtk_image_new_from_icon_name (icon_name); gtk_widget_show (image); - gtk_container_add (GTK_CONTAINER (item), image); + gtk_button_set_child (GTK_BUTTON (item), image); gtk_widget_add_css_class (item, "image-button"); gtk_actionable_set_action_name (GTK_ACTIONABLE (item), action_name); gtk_widget_show (GTK_WIDGET (item)); @@ -6054,7 +6053,7 @@ gtk_text_selection_bubble_popup_show (gpointer user_data) gtk_widget_show (box); toolbar = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_widget_add_css_class (toolbar, "linked"); - gtk_container_add (GTK_CONTAINER (priv->selection_bubble), box); + gtk_popover_set_child (GTK_POPOVER (priv->selection_bubble), box); gtk_container_add (GTK_CONTAINER (box), toolbar); model = gtk_text_get_menu_model (self);