[gtk+/wip/baedert/box: 9/14] widget: Remove in_reparent flag
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/box: 9/14] widget: Remove in_reparent flag
- Date: Thu, 20 Oct 2016 15:55:14 +0000 (UTC)
commit eb8aee6ce792e45e41b039a64a09394e977b5cbf
Author: Timm Bäder <mail baedert org>
Date: Wed Oct 19 20:17:45 2016 +0200
widget: Remove in_reparent flag
gtk_widget_reparent is gone so we don't need this anymore.
gtk/gtkwidget.c | 24 +++---------------------
gtk/gtkwidgetprivate.h | 4 ----
2 files changed, 3 insertions(+), 25 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index ad54378..4a27e36 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -4131,12 +4131,7 @@ gtk_widget_unparent (GtkWidget *widget)
priv->allocation.height = 1;
if (_gtk_widget_get_realized (widget))
- {
- if (priv->in_reparent)
- gtk_widget_unmap (widget);
- else
- gtk_widget_unrealize (widget);
- }
+ gtk_widget_unrealize (widget);
/* If we are unanchoring the child, we save around the toplevel
* to emit hierarchy changed
@@ -9043,7 +9038,7 @@ gtk_widget_verify_invariants (GtkWidget *widget)
{
/* No parent or parent not realized on non-toplevel implies... */
- if (widget->priv->realized && !widget->priv->in_reparent)
+ if (widget->priv->realized)
g_warning ("%s %p is not realized but child %s %p is realized",
parent ? G_OBJECT_TYPE_NAME (parent) : "no parent", parent,
G_OBJECT_TYPE_NAME (widget), widget);
@@ -9065,7 +9060,7 @@ gtk_widget_verify_invariants (GtkWidget *widget)
{
/* No parent or parent not mapped on non-toplevel implies... */
- if (widget->priv->mapped && !widget->priv->in_reparent)
+ if (widget->priv->mapped)
g_warning ("%s %p is mapped but visible=%d child_visible=%d parent %s %p mapped=%d",
G_OBJECT_TYPE_NAME (widget), widget,
widget->priv->visible,
@@ -14591,19 +14586,6 @@ gtk_widget_in_destruction (GtkWidget *widget)
}
gboolean
-_gtk_widget_get_in_reparent (GtkWidget *widget)
-{
- return widget->priv->in_reparent;
-}
-
-void
-_gtk_widget_set_in_reparent (GtkWidget *widget,
- gboolean in_reparent)
-{
- widget->priv->in_reparent = in_reparent;
-}
-
-gboolean
_gtk_widget_get_anchored (GtkWidget *widget)
{
return widget->priv->anchored;
diff --git a/gtk/gtkwidgetprivate.h b/gtk/gtkwidgetprivate.h
index 2efd922..4403ae3 100644
--- a/gtk/gtkwidgetprivate.h
+++ b/gtk/gtkwidgetprivate.h
@@ -71,7 +71,6 @@ struct _GtkWidgetPrivate
guint child_visible : 1;
guint multidevice : 1;
guint has_shape_mask : 1;
- guint in_reparent : 1;
/* Queue-resize related flags */
guint resize_needed : 1; /* queue_resize() has been called but no get_preferred_size() yet */
@@ -161,9 +160,6 @@ struct _GtkWidgetPrivate
GtkCssNode * gtk_widget_get_css_node (GtkWidget *widget);
void _gtk_widget_set_visible_flag (GtkWidget *widget,
gboolean visible);
-gboolean _gtk_widget_get_in_reparent (GtkWidget *widget);
-void _gtk_widget_set_in_reparent (GtkWidget *widget,
- gboolean in_reparent);
gboolean _gtk_widget_get_anchored (GtkWidget *widget);
void _gtk_widget_set_anchored (GtkWidget *widget,
gboolean anchored);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]