summaryrefslogtreecommitdiff
path: root/tests/gtkoffscreenbox.c
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2010-03-01 07:47:38 +0100
committerJavier Jardón <jjardon@gnome.org>2010-03-01 07:52:07 +0100
commit214a023e9160fa008db069f5ec10ce3a4999a4dc (patch)
treead2e3c48e95a3264903ef29b9e12e88ffdfed0bc /tests/gtkoffscreenbox.c
parent4232115e22c8ea41d6a3faf89bcaadfc9933d5e3 (diff)
downloadgtk+-214a023e9160fa008db069f5ec10ce3a4999a4dc.tar.gz
Deprecate widget flag: GTK_WIDGET_VISIBLE
Use gtk_widget_get_visible() instead https://bugzilla.gnome.org/show_bug.cgi?id=69872
Diffstat (limited to 'tests/gtkoffscreenbox.c')
-rw-r--r--tests/gtkoffscreenbox.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/gtkoffscreenbox.c b/tests/gtkoffscreenbox.c
index e7fa941d92..83968ca75d 100644
--- a/tests/gtkoffscreenbox.c
+++ b/tests/gtkoffscreenbox.c
@@ -47,7 +47,7 @@ to_child_2 (GtkOffscreenBox *offscreen_box,
x = widget_x;
y = widget_y;
- if (offscreen_box->child1 && GTK_WIDGET_VISIBLE (offscreen_box->child1))
+ if (offscreen_box->child1 && gtk_widget_get_visible (offscreen_box->child1))
y -= offscreen_box->child1->allocation.height;
child_area = offscreen_box->child2->allocation;
@@ -98,7 +98,7 @@ to_parent_2 (GtkOffscreenBox *offscreen_box,
x += child_area.width / 2;
y += child_area.height / 2;
- if (offscreen_box->child1 && GTK_WIDGET_VISIBLE (offscreen_box->child1))
+ if (offscreen_box->child1 && gtk_widget_get_visible (offscreen_box->child1))
y += offscreen_box->child1->allocation.height;
*x_out = x;
@@ -150,7 +150,7 @@ pick_offscreen_child (GdkWindow *offscreen_window,
/* First check for child 2 */
if (offscreen_box->child2 &&
- GTK_WIDGET_VISIBLE (offscreen_box->child2))
+ gtk_widget_get_visible (offscreen_box->child2))
{
to_child_2 (offscreen_box,
widget_x, widget_y,
@@ -163,7 +163,7 @@ pick_offscreen_child (GdkWindow *offscreen_window,
return offscreen_box->offscreen_window2;
}
- if (offscreen_box->child1 && GTK_WIDGET_VISIBLE (offscreen_box->child1))
+ if (offscreen_box->child1 && gtk_widget_get_visible (offscreen_box->child1))
{
x = widget_x;
y = widget_y;
@@ -273,7 +273,7 @@ gtk_offscreen_box_realize (GtkWidget *widget)
/* Child 1 */
attributes.x = attributes.y = 0;
- if (offscreen_box->child1 && GTK_WIDGET_VISIBLE (offscreen_box->child1))
+ if (offscreen_box->child1 && gtk_widget_get_visible (offscreen_box->child1))
{
attributes.width = offscreen_box->child1->allocation.width;
attributes.height = offscreen_box->child1->allocation.height;
@@ -296,7 +296,7 @@ gtk_offscreen_box_realize (GtkWidget *widget)
/* Child 2 */
attributes.y = start_y;
child_requisition.width = child_requisition.height = 0;
- if (offscreen_box->child2 && GTK_WIDGET_VISIBLE (offscreen_box->child2))
+ if (offscreen_box->child2 && gtk_widget_get_visible (offscreen_box->child2))
{
attributes.width = offscreen_box->child2->allocation.width;
attributes.height = offscreen_box->child2->allocation.height;
@@ -401,7 +401,7 @@ gtk_offscreen_box_remove (GtkContainer *container,
GtkOffscreenBox *offscreen_box = GTK_OFFSCREEN_BOX (container);
gboolean was_visible;
- was_visible = GTK_WIDGET_VISIBLE (widget);
+ was_visible = gtk_widget_get_visible (widget);
if (offscreen_box->child1 == widget)
{
@@ -409,7 +409,7 @@ gtk_offscreen_box_remove (GtkContainer *container,
offscreen_box->child1 = NULL;
- if (was_visible && GTK_WIDGET_VISIBLE (container))
+ if (was_visible && gtk_widget_get_visible (GTK_WIDGET (container)))
gtk_widget_queue_resize (GTK_WIDGET (container));
}
else if (offscreen_box->child2 == widget)
@@ -418,7 +418,7 @@ gtk_offscreen_box_remove (GtkContainer *container,
offscreen_box->child2 = NULL;
- if (was_visible && GTK_WIDGET_VISIBLE (container))
+ if (was_visible && gtk_widget_get_visible (GTK_WIDGET (container)))
gtk_widget_queue_resize (GTK_WIDGET (container));
}
}
@@ -462,7 +462,7 @@ gtk_offscreen_box_size_request (GtkWidget *widget,
w = 0;
h = 0;
- if (offscreen_box->child1 && GTK_WIDGET_VISIBLE (offscreen_box->child1))
+ if (offscreen_box->child1 && gtk_widget_get_visible (offscreen_box->child1))
{
GtkRequisition child_requisition;
@@ -472,7 +472,7 @@ gtk_offscreen_box_size_request (GtkWidget *widget,
h += CHILD1_SIZE_SCALE * child_requisition.height;
}
- if (offscreen_box->child2 && GTK_WIDGET_VISIBLE (offscreen_box->child2))
+ if (offscreen_box->child2 && gtk_widget_get_visible (offscreen_box->child2))
{
GtkRequisition child_requisition;
@@ -508,7 +508,7 @@ gtk_offscreen_box_size_allocate (GtkWidget *widget,
start_y = 0;
- if (offscreen_box->child1 && GTK_WIDGET_VISIBLE (offscreen_box->child1))
+ if (offscreen_box->child1 && gtk_widget_get_visible (offscreen_box->child1))
{
GtkRequisition child_requisition;
GtkAllocation child_allocation;
@@ -532,7 +532,7 @@ gtk_offscreen_box_size_allocate (GtkWidget *widget,
gtk_widget_size_allocate (offscreen_box->child1, &child_allocation);
}
- if (offscreen_box->child2 && GTK_WIDGET_VISIBLE (offscreen_box->child2))
+ if (offscreen_box->child2 && gtk_widget_get_visible (offscreen_box->child2))
{
GtkRequisition child_requisition;
GtkAllocation child_allocation;
@@ -581,7 +581,7 @@ gtk_offscreen_box_expose (GtkWidget *widget,
cairo_t *cr;
int start_y = 0;
- if (offscreen_box->child1 && GTK_WIDGET_VISIBLE (offscreen_box->child1))
+ if (offscreen_box->child1 && gtk_widget_get_visible (offscreen_box->child1))
{
pixmap = gdk_offscreen_window_get_pixmap (offscreen_box->offscreen_window1);
child_area = offscreen_box->child1->allocation;
@@ -596,7 +596,7 @@ gtk_offscreen_box_expose (GtkWidget *widget,
start_y += child_area.height;
}
- if (offscreen_box->child2 && GTK_WIDGET_VISIBLE (offscreen_box->child2))
+ if (offscreen_box->child2 && gtk_widget_get_visible (offscreen_box->child2))
{
gint w, h;