[gtk/kill-containers: 41/51] text: Fix popover use



commit 4c10f7fb6f331dc53ccac344c56cf431455d9640
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri May 8 00:25:47 2020 -0400

    text: Fix popover use
    
    There were some leftover gtk_container_add calls here
    on popovers on buttons, but these are no longer containers.

 gtk/gtktext.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtktext.c b/gtk/gtktext.c
index 7ff5855f89..13078d985e 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]