summaryrefslogtreecommitdiff
path: root/gtk/gtkcombobox.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-06-16 17:31:56 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-06-16 17:31:56 -0400
commitf0f9c2aa37893cf5d3f09ce9c8ac36a88d661e37 (patch)
tree0062ca04becddb65cdfd81252e069cee0c21254e /gtk/gtkcombobox.c
parentb57c04de5c8d2cd2305f6561309af335428685a4 (diff)
downloadgtk+-f0f9c2aa37893cf5d3f09ce9c8ac36a88d661e37.tar.gz
Revert "gtkbin: replace internal api"
This reverts commit 0f4751c08e22a4f45d58e2368e4ae82df407d330. This causes warnings from the notebook and combobox code.
Diffstat (limited to 'gtk/gtkcombobox.c')
-rw-r--r--gtk/gtkcombobox.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 7ab2708e75..baeb30de8d 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -1587,10 +1587,13 @@ gtk_combo_box_add (GtkContainer *container,
if (priv->cell_view &&
gtk_widget_get_parent (priv->cell_view))
{
- GTK_CONTAINER_CLASS (gtk_combo_box_parent_class)->remove (container, priv->cell_view);
+ gtk_widget_unparent (priv->cell_view);
+ _gtk_bin_set_child (GTK_BIN (container), NULL);
+ gtk_widget_queue_resize (GTK_WIDGET (container));
}
- GTK_CONTAINER_CLASS (gtk_combo_box_parent_class)->add (container, widget);
+ gtk_widget_set_parent (widget, GTK_WIDGET (container));
+ _gtk_bin_set_child (GTK_BIN (container), widget);
if (priv->cell_view &&
widget != priv->cell_view)
@@ -1654,11 +1657,14 @@ gtk_combo_box_remove (GtkContainer *container,
if (widget == priv->cell_view)
priv->cell_view = NULL;
- GTK_CONTAINER_CLASS (gtk_combo_box_parent_class)->remove (container, widget);
+ gtk_widget_unparent (widget);
+ _gtk_bin_set_child (GTK_BIN (container), NULL);
if (gtk_widget_in_destruction (GTK_WIDGET (combo_box)))
return;
+ gtk_widget_queue_resize (GTK_WIDGET (container));
+
if (!priv->tree_view)
appears_as_list = FALSE;
else
@@ -1676,7 +1682,8 @@ gtk_combo_box_remove (GtkContainer *container,
if (!priv->cell_view)
{
priv->cell_view = gtk_cell_view_new ();
- GTK_CONTAINER_CLASS (gtk_combo_box_parent_class)->add (container, priv->cell_view);
+ gtk_widget_set_parent (priv->cell_view, GTK_WIDGET (container));
+ _gtk_bin_set_child (GTK_BIN (container), priv->cell_view);
gtk_widget_show (priv->cell_view);
gtk_cell_view_set_model (GTK_CELL_VIEW (priv->cell_view),
@@ -4810,7 +4817,8 @@ gtk_combo_box_constructor (GType type,
priv->cell_view = gtk_cell_view_new_with_context (priv->area, NULL);
gtk_cell_view_set_fit_model (GTK_CELL_VIEW (priv->cell_view), TRUE);
gtk_cell_view_set_model (GTK_CELL_VIEW (priv->cell_view), priv->model);
- GTK_CONTAINER_CLASS (gtk_combo_box_parent_class)->add (GTK_CONTAINER (combo_box),priv->cell_view);
+ gtk_widget_set_parent (priv->cell_view, GTK_WIDGET (combo_box));
+ _gtk_bin_set_child (GTK_BIN (combo_box), priv->cell_view);
gtk_widget_show (priv->cell_view);
gtk_combo_box_check_appearance (combo_box);