[gtk+/refactor: 34/106] gtkcontainer: Add _gtk_container_*_need_resize internal accessors
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/refactor: 34/106] gtkcontainer: Add _gtk_container_*_need_resize internal accessors
- Date: Tue, 13 Jul 2010 17:32:52 +0000 (UTC)
commit 17bcf65dc383132367d9f4762d4f0cd7542c4045
Author: Javier Jardón <jjardon gnome org>
Date: Thu Jun 3 00:28:58 2010 +0200
gtkcontainer: Add _gtk_container_*_need_resize internal accessors
gtkoffscreenwindow and gtkwindow need access to need_resize var
gtk/gtkcontainer.c | 13 +++++++++++++
gtk/gtkcontainer.h | 4 +++-
gtk/gtkoffscreenwindow.c | 4 ++--
gtk/gtkwindow.c | 4 ++--
4 files changed, 20 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index afd2315..2ce2b4f 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -2683,3 +2683,16 @@ gtk_container_propagate_expose (GtkContainer *container,
gdk_event_free (child_event);
}
}
+
+gboolean
+_gtk_container_get_need_resize (GtkContainer *container)
+{
+ return container->priv->need_resize;
+}
+
+void
+_gtk_container_set_need_resize (GtkContainer *container,
+ gboolean need_resize)
+{
+ container->priv->need_resize = need_resize;
+}
diff --git a/gtk/gtkcontainer.h b/gtk/gtkcontainer.h
index a1c3a52..bb4f546 100644
--- a/gtk/gtkcontainer.h
+++ b/gtk/gtkcontainer.h
@@ -208,7 +208,9 @@ GList *_gtk_container_focus_sort (GtkContainer *container,
GList *children,
GtkDirectionType direction,
GtkWidget *old_focus);
-
+gboolean _gtk_container_get_need_resize (GtkContainer *container);
+void _gtk_container_set_need_resize (GtkContainer *container,
+ gboolean need_resize);
G_END_DECLS
diff --git a/gtk/gtkoffscreenwindow.c b/gtk/gtkoffscreenwindow.c
index 7e05fcb..417003b 100644
--- a/gtk/gtkoffscreenwindow.c
+++ b/gtk/gtkoffscreenwindow.c
@@ -184,8 +184,8 @@ gtk_offscreen_window_show (GtkWidget *widget)
GTK_WIDGET_SET_FLAGS (widget, GTK_VISIBLE);
container = GTK_CONTAINER (widget);
- need_resize = container->need_resize || !gtk_widget_get_realized (widget);
- container->need_resize = FALSE;
+ need_resize = _gtk_container_get_need_resize (container) || !gtk_widget_get_realized (widget);
+ _gtk_container_set_need_resize (container, FALSE);
if (need_resize)
gtk_offscreen_window_resize (widget);
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 1ef066c..e5ee01c 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -4464,8 +4464,8 @@ gtk_window_show (GtkWidget *widget)
GTK_WIDGET_SET_FLAGS (widget, GTK_VISIBLE);
- need_resize = container->need_resize || !gtk_widget_get_realized (widget);
- container->need_resize = FALSE;
+ need_resize = _gtk_container_get_need_resize (container) || !gtk_widget_get_realized (widget);
+ _gtk_container_set_need_resize (container, FALSE);
if (need_resize)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]