[gtk/kill-containers: 16/43] textview: Fix popover use
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/kill-containers: 16/43] textview: Fix popover use
- Date: Sun, 10 May 2020 03:19:27 +0000 (UTC)
commit 77f1c1abdf634baa864915490fa2ab888088d287
Author: Matthias Clasen <mclasen redhat com>
Date: Fri May 8 00:23:44 2020 -0400
textview: Fix popover use
There were some leftover gtk_container_add calls here
on popovers on buttons, but these are no longer containers.
gtk/gtktextview.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 96fa6bb1e4..b4b5d04ff2 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -1977,8 +1977,7 @@ _gtk_text_view_ensure_magnifier (GtkTextView *text_view)
gtk_widget_set_parent (priv->magnifier_popover, GTK_WIDGET (text_view));
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);
}
@@ -8750,7 +8749,7 @@ append_bubble_item (GtkTextView *text_view,
item = gtk_button_new ();
gtk_widget_set_focus_on_click (item, FALSE);
image = gtk_image_new_from_icon_name (icon_name);
- 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);
@@ -8789,7 +8788,7 @@ gtk_text_view_selection_bubble_popup_show (gpointer user_data)
gtk_widget_set_margin_bottom (box, 10);
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_view_get_menu_model (text_view);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]