[gtk+] Deprecate widget flag: GTK_WIDGET_VISIBLE
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Deprecate widget flag: GTK_WIDGET_VISIBLE
- Date: Mon, 1 Mar 2010 06:53:26 +0000 (UTC)
commit 214a023e9160fa008db069f5ec10ce3a4999a4dc
Author: Javier Jardón <jjardon gnome org>
Date: Mon Mar 1 07:47:38 2010 +0100
Deprecate widget flag: GTK_WIDGET_VISIBLE
Use gtk_widget_get_visible() instead
https://bugzilla.gnome.org/show_bug.cgi?id=69872
demos/gtk-demo/appwindow.c | 2 +-
demos/gtk-demo/assistant.c | 2 +-
demos/gtk-demo/builder.c | 2 +-
demos/gtk-demo/button_box.c | 2 +-
demos/gtk-demo/clipboard.c | 2 +-
demos/gtk-demo/colorsel.c | 2 +-
demos/gtk-demo/combobox.c | 2 +-
demos/gtk-demo/dialog.c | 2 +-
demos/gtk-demo/drawingarea.c | 2 +-
demos/gtk-demo/editable_cells.c | 2 +-
demos/gtk-demo/entry_buffer.c | 2 +-
demos/gtk-demo/entry_completion.c | 2 +-
demos/gtk-demo/expander.c | 2 +-
demos/gtk-demo/hypertext.c | 2 +-
demos/gtk-demo/iconview.c | 2 +-
demos/gtk-demo/iconview_edit.c | 2 +-
demos/gtk-demo/images.c | 2 +-
demos/gtk-demo/infobar.c | 2 +-
demos/gtk-demo/links.c | 2 +-
demos/gtk-demo/list_store.c | 2 +-
demos/gtk-demo/menus.c | 2 +-
demos/gtk-demo/offscreen_window.c | 16 ++--
demos/gtk-demo/offscreen_window2.c | 16 ++--
demos/gtk-demo/panes.c | 2 +-
demos/gtk-demo/pickers.c | 2 +-
demos/gtk-demo/pixbufs.c | 2 +-
demos/gtk-demo/rotated_text.c | 2 +-
demos/gtk-demo/search_entry.c | 2 +-
demos/gtk-demo/sizegroup.c | 2 +-
demos/gtk-demo/spinner.c | 2 +-
demos/gtk-demo/stock_browser.c | 2 +-
demos/gtk-demo/textscroll.c | 2 +-
demos/gtk-demo/textview.c | 2 +-
demos/gtk-demo/toolpalette.c | 2 +-
demos/gtk-demo/tree_store.c | 2 +-
examples/calendar/calendar.c | 2 +-
gtk/gtkalignment.c | 4 +-
gtk/gtkaspectframe.c | 2 +-
gtk/gtkassistant.c | 20 +++---
gtk/gtkbbox.c | 7 +-
gtk/gtkbin.c | 4 +-
gtk/gtkbox.c | 18 +++--
gtk/gtkbutton.c | 4 +-
gtk/gtkcheckbutton.c | 8 +-
gtk/gtkclist.c | 22 +++---
gtk/gtkcombo.c | 2 +-
gtk/gtkcombobox.c | 8 +-
gtk/gtkcontainer.c | 4 +-
gtk/gtkdialog.c | 2 +-
gtk/gtkdnd.c | 2 +-
gtk/gtkentry.c | 14 ++--
gtk/gtkentrycompletion.c | 4 +-
gtk/gtkeventbox.c | 10 +-
gtk/gtkexpander.c | 20 +++--
gtk/gtkfilechooserbutton.c | 2 +-
gtk/gtkfilechooserdefault.c | 4 +-
gtk/gtkfixed.c | 15 ++--
gtk/gtkfontbutton.c | 2 +-
gtk/gtkframe.c | 14 ++--
gtk/gtkhandlebox.c | 6 +-
gtk/gtkiconview.c | 2 +-
gtk/gtkimage.c | 10 ++-
gtk/gtkimagemenuitem.c | 11 ++-
gtk/gtklabel.c | 2 +-
gtk/gtklayout.c | 7 +-
gtk/gtklist.c | 8 +-
gtk/gtklistitem.c | 2 +-
gtk/gtkmain.c | 2 +-
gtk/gtkmenu.c | 18 ++--
gtk/gtkmenubar.c | 8 +-
gtk/gtkmenuitem.c | 8 +-
gtk/gtkmenushell.c | 16 ++--
gtk/gtkmenutoolbutton.c | 4 +-
gtk/gtknotebook.c | 104 ++++++++++++++-------------
gtk/gtkoffscreenwindow.c | 6 +-
gtk/gtkoptionmenu.c | 11 ++-
gtk/gtkpaned.c | 32 ++++----
gtk/gtkpathbar.c | 2 +-
gtk/gtkpixmap.c | 4 +-
gtk/gtkplug.c | 8 +-
gtk/gtkradiobutton.c | 2 +-
gtk/gtkscale.c | 7 +-
gtk/gtkscrolledwindow.c | 14 ++--
gtk/gtkstatusbar.c | 2 +-
gtk/gtktable.c | 32 ++++----
gtk/gtktextview.c | 7 +-
gtk/gtktogglebutton.c | 2 +-
gtk/gtktoolbar.c | 8 +-
gtk/gtktoolitem.c | 4 +-
gtk/gtktoolitemgroup.c | 19 +++--
gtk/gtktooltip.c | 2 +-
gtk/gtktree.c | 14 ++--
gtk/gtktreeitem.c | 14 ++--
gtk/gtktreeview.c | 14 ++--
gtk/gtkuimanager.c | 4 +-
gtk/gtkviewport.c | 12 ++--
gtk/gtkwidget.c | 38 +++++-----
gtk/gtkwidget.h | 4 +
gtk/gtkwin32embedwidget.c | 4 +-
gtk/gtkwindow.c | 33 ++++-----
gtk/tests/filechooser.c | 4 +-
modules/other/gail/gailbutton.c | 4 +-
modules/other/gail/gailcombo.c | 4 +-
modules/other/gail/gailcombobox.c | 4 +-
modules/other/gail/gailentry.c | 4 +-
modules/other/gail/gailexpander.c | 4 +-
modules/other/gail/gailmenuitem.c | 6 +-
modules/other/gail/gailoptionmenu.c | 4 +-
modules/other/gail/gailrange.c | 4 +-
modules/other/gail/gailscalebutton.c | 2 +-
modules/other/gail/gailtoplevel.c | 2 +-
modules/other/gail/gailwidget.c | 6 +-
modules/other/gail/gailwindow.c | 2 +-
modules/other/gail/tests/ferret.c | 2 +-
perf/gtkwidgetprofiler.c | 2 +-
tests/gtkoffscreenbox.c | 30 ++++----
tests/testassistant.c | 10 +-
tests/testgtk.c | 134 +++++++++++++++++-----------------
tests/testmenubars.c | 2 +-
tests/testmenus.c | 2 +-
120 files changed, 529 insertions(+), 502 deletions(-)
---
diff --git a/demos/gtk-demo/appwindow.c b/demos/gtk-demo/appwindow.c
index 8ff9065..b934be8 100644
--- a/demos/gtk-demo/appwindow.c
+++ b/demos/gtk-demo/appwindow.c
@@ -595,7 +595,7 @@ do_appwindow (GtkWidget *do_widget)
update_statusbar (buffer, GTK_STATUSBAR (statusbar));
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show_all (window);
}
diff --git a/demos/gtk-demo/assistant.c b/demos/gtk-demo/assistant.c
index f5c69dd..6cb5399 100644
--- a/demos/gtk-demo/assistant.c
+++ b/demos/gtk-demo/assistant.c
@@ -153,7 +153,7 @@ do_assistant (GtkWidget *do_widget)
G_CALLBACK (on_assistant_prepare), NULL);
}
- if (!GTK_WIDGET_VISIBLE (assistant))
+ if (!gtk_widget_get_visible (assistant))
gtk_widget_show (assistant);
else
{
diff --git a/demos/gtk-demo/builder.c b/demos/gtk-demo/builder.c
index 317fcf0..9e795de 100644
--- a/demos/gtk-demo/builder.c
+++ b/demos/gtk-demo/builder.c
@@ -53,7 +53,7 @@ do_builder (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show_all (window);
}
diff --git a/demos/gtk-demo/button_box.c b/demos/gtk-demo/button_box.c
index 35c5ab4..a535bf9 100644
--- a/demos/gtk-demo/button_box.c
+++ b/demos/gtk-demo/button_box.c
@@ -113,7 +113,7 @@ do_button_box (GtkWidget *do_widget)
TRUE, TRUE, 5);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show_all (window);
}
diff --git a/demos/gtk-demo/clipboard.c b/demos/gtk-demo/clipboard.c
index 5559c5e..6ec1517 100644
--- a/demos/gtk-demo/clipboard.c
+++ b/demos/gtk-demo/clipboard.c
@@ -314,7 +314,7 @@ do_clipboard (GtkWidget *do_widget)
gtk_clipboard_set_can_store (clipboard, NULL, 0);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
{
diff --git a/demos/gtk-demo/colorsel.c b/demos/gtk-demo/colorsel.c
index 5b4bdd2..db5d542 100644
--- a/demos/gtk-demo/colorsel.c
+++ b/demos/gtk-demo/colorsel.c
@@ -125,7 +125,7 @@ do_colorsel (GtkWidget *do_widget)
G_CALLBACK (change_color_callback), NULL);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show_all (window);
}
diff --git a/demos/gtk-demo/combobox.c b/demos/gtk-demo/combobox.c
index 7b47032..f33d770 100644
--- a/demos/gtk-demo/combobox.c
+++ b/demos/gtk-demo/combobox.c
@@ -440,7 +440,7 @@ do_combobox (GtkWidget *do_widget)
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show_all (window);
}
diff --git a/demos/gtk-demo/dialog.c b/demos/gtk-demo/dialog.c
index 7b68251..301ee2f 100644
--- a/demos/gtk-demo/dialog.c
+++ b/demos/gtk-demo/dialog.c
@@ -167,7 +167,7 @@ do_dialog (GtkWidget *do_widget)
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry2);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show_all (window);
}
diff --git a/demos/gtk-demo/drawingarea.c b/demos/gtk-demo/drawingarea.c
index 6e3b877..7c3101a 100644
--- a/demos/gtk-demo/drawingarea.c
+++ b/demos/gtk-demo/drawingarea.c
@@ -318,7 +318,7 @@ do_drawingarea (GtkWidget *do_widget)
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
diff --git a/demos/gtk-demo/editable_cells.c b/demos/gtk-demo/editable_cells.c
index 1bf3f9d..638d13f 100644
--- a/demos/gtk-demo/editable_cells.c
+++ b/demos/gtk-demo/editable_cells.c
@@ -381,7 +381,7 @@ do_editable_cells (GtkWidget *do_widget)
gtk_window_set_default_size (GTK_WINDOW (window), 320, 200);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
{
diff --git a/demos/gtk-demo/entry_buffer.c b/demos/gtk-demo/entry_buffer.c
index 2be770e..82f07c9 100644
--- a/demos/gtk-demo/entry_buffer.c
+++ b/demos/gtk-demo/entry_buffer.c
@@ -54,7 +54,7 @@ do_entry_buffer (GtkWidget *do_widget)
g_object_unref (buffer);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
diff --git a/demos/gtk-demo/entry_completion.c b/demos/gtk-demo/entry_completion.c
index 5f1e327..f7e61e9 100644
--- a/demos/gtk-demo/entry_completion.c
+++ b/demos/gtk-demo/entry_completion.c
@@ -86,7 +86,7 @@ do_entry_completion (GtkWidget *do_widget)
gtk_entry_completion_set_text_column (completion, 0);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
diff --git a/demos/gtk-demo/expander.c b/demos/gtk-demo/expander.c
index 9728fa5..acd51ba 100644
--- a/demos/gtk-demo/expander.c
+++ b/demos/gtk-demo/expander.c
@@ -47,7 +47,7 @@ do_expander (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (expander), label);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
diff --git a/demos/gtk-demo/hypertext.c b/demos/gtk-demo/hypertext.c
index 17c8ee3..8b67c05 100644
--- a/demos/gtk-demo/hypertext.c
+++ b/demos/gtk-demo/hypertext.c
@@ -300,7 +300,7 @@ do_hypertext (GtkWidget *do_widget)
gtk_widget_show_all (sw);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show (window);
}
diff --git a/demos/gtk-demo/iconview.c b/demos/gtk-demo/iconview.c
index a075a35..1cfac12 100644
--- a/demos/gtk-demo/iconview.c
+++ b/demos/gtk-demo/iconview.c
@@ -358,7 +358,7 @@ do_iconview (GtkWidget *do_widget)
}
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
{
diff --git a/demos/gtk-demo/iconview_edit.c b/demos/gtk-demo/iconview_edit.c
index a58f84c..10ad225 100644
--- a/demos/gtk-demo/iconview_edit.c
+++ b/demos/gtk-demo/iconview_edit.c
@@ -146,7 +146,7 @@ do_iconview_edit (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (window), icon_view);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
{
diff --git a/demos/gtk-demo/images.c b/demos/gtk-demo/images.c
index e7866ae..9eaac39 100644
--- a/demos/gtk-demo/images.c
+++ b/demos/gtk-demo/images.c
@@ -450,7 +450,7 @@ do_images (GtkWidget *do_widget)
vbox);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show_all (window);
}
diff --git a/demos/gtk-demo/infobar.c b/demos/gtk-demo/infobar.c
index 7743c5f..e5d4602 100644
--- a/demos/gtk-demo/infobar.c
+++ b/demos/gtk-demo/infobar.c
@@ -90,7 +90,7 @@ do_infobar (GtkWidget *do_widget)
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, FALSE, 0);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show_all (window);
}
diff --git a/demos/gtk-demo/links.c b/demos/gtk-demo/links.c
index 569cd91..0889561 100644
--- a/demos/gtk-demo/links.c
+++ b/demos/gtk-demo/links.c
@@ -70,7 +70,7 @@ do_links (GtkWidget *do_widget)
gtk_widget_show (label);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show (window);
}
diff --git a/demos/gtk-demo/list_store.c b/demos/gtk-demo/list_store.c
index 94335af..009cd97 100644
--- a/demos/gtk-demo/list_store.c
+++ b/demos/gtk-demo/list_store.c
@@ -272,7 +272,7 @@ do_list_store (GtkWidget *do_widget)
G_CALLBACK (window_closed), NULL);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show_all (window);
if (timeout == 0) {
diff --git a/demos/gtk-demo/menus.c b/demos/gtk-demo/menus.c
index 2e6fe29..6e546f3 100644
--- a/demos/gtk-demo/menus.c
+++ b/demos/gtk-demo/menus.c
@@ -196,7 +196,7 @@ do_menus (GtkWidget *do_widget)
gtk_widget_show (button);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show (window);
}
diff --git a/demos/gtk-demo/offscreen_window.c b/demos/gtk-demo/offscreen_window.c
index 08654c1..72a5149 100644
--- a/demos/gtk-demo/offscreen_window.c
+++ b/demos/gtk-demo/offscreen_window.c
@@ -184,7 +184,7 @@ pick_offscreen_child (GdkWindow *offscreen_window,
GtkAllocation child_area;
double x, y;
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
to_child (bin, widget_x, widget_y, &x, &y);
@@ -262,7 +262,7 @@ gtk_rotated_bin_realize (GtkWidget *widget)
attributes.window_type = GDK_WINDOW_OFFSCREEN;
child_requisition.width = child_requisition.height = 0;
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
attributes.width = bin->child->allocation.width;
attributes.height = bin->child->allocation.height;
@@ -331,7 +331,7 @@ gtk_rotated_bin_remove (GtkContainer *container,
GtkRotatedBin *bin = GTK_ROTATED_BIN (container);
gboolean was_visible;
- was_visible = GTK_WIDGET_VISIBLE (widget);
+ was_visible = gtk_widget_get_visible (widget);
if (bin->child == widget)
{
@@ -339,7 +339,7 @@ gtk_rotated_bin_remove (GtkContainer *container,
bin->child = 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));
}
}
@@ -382,7 +382,7 @@ gtk_rotated_bin_size_request (GtkWidget *widget,
child_requisition.width = 0;
child_requisition.height = 0;
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
gtk_widget_size_request (bin->child, &child_requisition);
s = sin (bin->angle);
@@ -416,7 +416,7 @@ gtk_rotated_bin_size_allocate (GtkWidget *widget,
allocation->y + border_width,
w, h);
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
GtkRequisition child_requisition;
GtkAllocation child_allocation;
@@ -474,7 +474,7 @@ gtk_rotated_bin_expose (GtkWidget *widget,
GtkAllocation child_area;
cairo_t *cr;
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
pixmap = gdk_offscreen_window_get_pixmap (bin->offscreen_window);
child_area = bin->child->allocation;
@@ -566,7 +566,7 @@ do_offscreen_window (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (bin), button);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
{
diff --git a/demos/gtk-demo/offscreen_window2.c b/demos/gtk-demo/offscreen_window2.c
index c1f8146..aa34824 100644
--- a/demos/gtk-demo/offscreen_window2.c
+++ b/demos/gtk-demo/offscreen_window2.c
@@ -122,7 +122,7 @@ pick_offscreen_child (GdkWindow *offscreen_window,
GtkAllocation child_area;
double x, y;
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
to_child (bin, widget_x, widget_y, &x, &y);
@@ -200,7 +200,7 @@ gtk_mirror_bin_realize (GtkWidget *widget)
attributes.window_type = GDK_WINDOW_OFFSCREEN;
child_requisition.width = child_requisition.height = 0;
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
attributes.width = bin->child->allocation.width;
attributes.height = bin->child->allocation.height;
@@ -269,7 +269,7 @@ gtk_mirror_bin_remove (GtkContainer *container,
GtkMirrorBin *bin = GTK_MIRROR_BIN (container);
gboolean was_visible;
- was_visible = GTK_WIDGET_VISIBLE (widget);
+ was_visible = gtk_widget_get_visible (widget);
if (bin->child == widget)
{
@@ -277,7 +277,7 @@ gtk_mirror_bin_remove (GtkContainer *container,
bin->child = 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));
}
}
@@ -306,7 +306,7 @@ gtk_mirror_bin_size_request (GtkWidget *widget,
child_requisition.width = 0;
child_requisition.height = 0;
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
gtk_widget_size_request (bin->child, &child_requisition);
requisition->width = GTK_CONTAINER (widget)->border_width * 2 + child_requisition.width + 10;
@@ -333,7 +333,7 @@ gtk_mirror_bin_size_allocate (GtkWidget *widget,
allocation->y + border_width,
w, h);
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
GtkRequisition child_requisition;
GtkAllocation child_allocation;
@@ -378,7 +378,7 @@ gtk_mirror_bin_expose (GtkWidget *widget,
cairo_matrix_t matrix;
cairo_pattern_t *mask;
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
pixmap = gdk_offscreen_window_get_pixmap (bin->offscreen_window);
gdk_drawable_get_size (pixmap, &width, &height);
@@ -487,7 +487,7 @@ do_offscreen_window2 (GtkWidget *do_widget)
gtk_box_pack_start (GTK_BOX (hbox), applybutton, FALSE, FALSE, 0);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
{
diff --git a/demos/gtk-demo/panes.c b/demos/gtk-demo/panes.c
index efd88f2..93f1aa1 100644
--- a/demos/gtk-demo/panes.c
+++ b/demos/gtk-demo/panes.c
@@ -180,7 +180,7 @@ do_panes (GtkWidget *do_widget)
gtk_widget_show_all (vbox);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show (window);
}
diff --git a/demos/gtk-demo/pickers.c b/demos/gtk-demo/pickers.c
index 511e2eb..838c718 100644
--- a/demos/gtk-demo/pickers.c
+++ b/demos/gtk-demo/pickers.c
@@ -59,7 +59,7 @@ do_pickers (GtkWidget *do_widget)
gtk_table_attach_defaults (GTK_TABLE (table), picker, 1, 2, 3, 4);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show_all (window);
}
diff --git a/demos/gtk-demo/pixbufs.c b/demos/gtk-demo/pixbufs.c
index 4e11781..d7b7eef 100644
--- a/demos/gtk-demo/pixbufs.c
+++ b/demos/gtk-demo/pixbufs.c
@@ -260,7 +260,7 @@ do_pixbufs (GtkWidget *do_widget)
}
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show_all (window);
}
diff --git a/demos/gtk-demo/rotated_text.c b/demos/gtk-demo/rotated_text.c
index 8aa786a..b83b2c3 100644
--- a/demos/gtk-demo/rotated_text.c
+++ b/demos/gtk-demo/rotated_text.c
@@ -223,7 +223,7 @@ do_rotated_text (GtkWidget *do_widget)
pango_attr_list_unref (attrs);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show_all (window);
}
diff --git a/demos/gtk-demo/search_entry.c b/demos/gtk-demo/search_entry.c
index 6269df2..e0236b1 100644
--- a/demos/gtk-demo/search_entry.c
+++ b/demos/gtk-demo/search_entry.c
@@ -268,7 +268,7 @@ do_search_entry (GtkWidget *do_widget)
gtk_widget_show_all (menu);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
{
diff --git a/demos/gtk-demo/sizegroup.c b/demos/gtk-demo/sizegroup.c
index 9731962..e238b95 100644
--- a/demos/gtk-demo/sizegroup.c
+++ b/demos/gtk-demo/sizegroup.c
@@ -158,7 +158,7 @@ do_sizegroup (GtkWidget *do_widget)
G_CALLBACK (toggle_grouping), size_group);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
diff --git a/demos/gtk-demo/spinner.c b/demos/gtk-demo/spinner.c
index 314c922..cf82440 100644
--- a/demos/gtk-demo/spinner.c
+++ b/demos/gtk-demo/spinner.c
@@ -83,7 +83,7 @@ do_spinner (GtkWidget *do_widget)
on_play_clicked (NULL, NULL);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
diff --git a/demos/gtk-demo/stock_browser.c b/demos/gtk-demo/stock_browser.c
index 54470dd..73a0003 100644
--- a/demos/gtk-demo/stock_browser.c
+++ b/demos/gtk-demo/stock_browser.c
@@ -532,7 +532,7 @@ do_stock_browser (GtkWidget *do_widget)
NULL);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show_all (window);
}
diff --git a/demos/gtk-demo/textscroll.c b/demos/gtk-demo/textscroll.c
index 5f1c360..2733032 100644
--- a/demos/gtk-demo/textscroll.c
+++ b/demos/gtk-demo/textscroll.c
@@ -191,7 +191,7 @@ do_textscroll (GtkWidget *do_widget)
create_text_view (hbox, FALSE);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
diff --git a/demos/gtk-demo/textview.c b/demos/gtk-demo/textview.c
index 4e98b17..f17f880 100644
--- a/demos/gtk-demo/textview.c
+++ b/demos/gtk-demo/textview.c
@@ -500,7 +500,7 @@ do_textview (GtkWidget *do_widget)
gtk_widget_show_all (vpaned);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show (window);
}
diff --git a/demos/gtk-demo/toolpalette.c b/demos/gtk-demo/toolpalette.c
index 1f779af..e9bc926 100644
--- a/demos/gtk-demo/toolpalette.c
+++ b/demos/gtk-demo/toolpalette.c
@@ -616,7 +616,7 @@ do_toolpalette (GtkWidget *do_widget)
gtk_label_new ("Interactive DnD Mode"));
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show_all (window);
}
diff --git a/demos/gtk-demo/tree_store.c b/demos/gtk-demo/tree_store.c
index a5c61b5..e0b208a 100644
--- a/demos/gtk-demo/tree_store.c
+++ b/demos/gtk-demo/tree_store.c
@@ -438,7 +438,7 @@ do_tree_store (GtkWidget *do_widget)
gtk_window_set_default_size (GTK_WINDOW (window), 650, 400);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
{
diff --git a/examples/calendar/calendar.c b/examples/calendar/calendar.c
index c0d85b0..2be27c3 100644
--- a/examples/calendar/calendar.c
+++ b/examples/calendar/calendar.c
@@ -224,7 +224,7 @@ static void calendar_select_font( GtkWidget *button,
calendar->font_dialog);
}
window = calendar->font_dialog;
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
gtk_widget_destroy (window);
diff --git a/gtk/gtkalignment.c b/gtk/gtkalignment.c
index 49c5271..51fad6f 100644
--- a/gtk/gtkalignment.c
+++ b/gtk/gtkalignment.c
@@ -421,7 +421,7 @@ gtk_alignment_size_request (GtkWidget *widget,
requisition->width = GTK_CONTAINER (widget)->border_width * 2;
requisition->height = GTK_CONTAINER (widget)->border_width * 2;
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
GtkRequisition child_requisition;
@@ -456,7 +456,7 @@ gtk_alignment_size_allocate (GtkWidget *widget,
alignment = GTK_ALIGNMENT (widget);
bin = GTK_BIN (widget);
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
gtk_widget_get_child_requisition (bin->child, &child_requisition);
diff --git a/gtk/gtkaspectframe.c b/gtk/gtkaspectframe.c
index 2661b29..db0a839 100644
--- a/gtk/gtkaspectframe.c
+++ b/gtk/gtkaspectframe.c
@@ -261,7 +261,7 @@ gtk_aspect_frame_compute_child_allocation (GtkFrame *frame,
GtkBin *bin = GTK_BIN (frame);
gdouble ratio;
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
GtkAllocation full_allocation;
diff --git a/gtk/gtkassistant.c b/gtk/gtkassistant.c
index 33c54a0..0f112e6 100644
--- a/gtk/gtkassistant.c
+++ b/gtk/gtkassistant.c
@@ -400,7 +400,7 @@ default_forward_function (gint current_page, gpointer data)
page_info = (GtkAssistantPage *) page_node->data;
- while (page_node && !GTK_WIDGET_VISIBLE (page_info->page))
+ while (page_node && !gtk_widget_get_visible (page_info->page))
{
page_node = page_node->next;
current_page++;
@@ -571,7 +571,7 @@ set_current_page (GtkAssistant *assistant,
g_signal_emit (assistant, signals [PREPARE], 0, priv->current_page->page);
- if (GTK_WIDGET_VISIBLE (priv->current_page->page) && GTK_WIDGET_MAPPED (assistant))
+ if (gtk_widget_get_visible (priv->current_page->page) && GTK_WIDGET_MAPPED (assistant))
{
gtk_widget_set_child_visible (priv->current_page->page, TRUE);
gtk_widget_map (priv->current_page->page);
@@ -599,7 +599,7 @@ set_current_page (GtkAssistant *assistant,
button[5] = assistant->last;
for (i = 0; i < 6; i++)
{
- if (GTK_WIDGET_VISIBLE (button[i]) && gtk_widget_get_sensitive (button[i]))
+ if (gtk_widget_get_visible (button[i]) && gtk_widget_get_sensitive (button[i]))
{
gtk_widget_grab_focus (button[i]);
break;
@@ -688,7 +688,7 @@ on_assistant_back (GtkWidget *widget,
g_slist_free_1 (page_node);
}
while (page_info->type == GTK_ASSISTANT_PAGE_PROGRESS ||
- !GTK_WIDGET_VISIBLE (page_info->page));
+ !gtk_widget_get_visible (page_info->page));
set_current_page (assistant, page_info);
}
@@ -923,7 +923,7 @@ remove_page (GtkAssistant *assistant,
*/
page_node = priv->pages;
- while (page_node && !GTK_WIDGET_VISIBLE (((GtkAssistantPage *) page_node->data)->page))
+ while (page_node && !gtk_widget_get_visible (((GtkAssistantPage *) page_node->data)->page))
page_node = page_node->next;
if (page_node == element)
@@ -1209,7 +1209,7 @@ gtk_assistant_size_allocate (GtkWidget *widget,
child_allocation.height = allocation->height - 2 * GTK_CONTAINER (widget)->border_width -
priv->header_image->allocation.height - 2 * header_padding - ACTION_AREA_SPACING - priv->action_area->allocation.height - 2 * content_padding;
- if (GTK_WIDGET_VISIBLE (priv->sidebar_image))
+ if (gtk_widget_get_visible (priv->sidebar_image))
{
if (!rtl)
child_allocation.x += priv->sidebar_image->allocation.width;
@@ -1240,7 +1240,7 @@ gtk_assistant_map (GtkWidget *widget)
gtk_widget_map (priv->header_image);
gtk_widget_map (priv->action_area);
- if (GTK_WIDGET_VISIBLE (priv->sidebar_image) &&
+ if (gtk_widget_get_visible (priv->sidebar_image) &&
!GTK_WIDGET_MAPPED (priv->sidebar_image))
gtk_widget_map (priv->sidebar_image);
@@ -1250,7 +1250,7 @@ gtk_assistant_map (GtkWidget *widget)
{
page_node = priv->pages;
- while (page_node && !GTK_WIDGET_VISIBLE (((GtkAssistantPage *) page_node->data)->page))
+ while (page_node && !gtk_widget_get_visible (((GtkAssistantPage *) page_node->data)->page))
page_node = page_node->next;
if (page_node)
@@ -1258,7 +1258,7 @@ gtk_assistant_map (GtkWidget *widget)
}
if (page &&
- GTK_WIDGET_VISIBLE (page->page) &&
+ gtk_widget_get_visible (page->page) &&
!GTK_WIDGET_MAPPED (page->page))
set_current_page (assistant, page);
@@ -1338,7 +1338,7 @@ assistant_paint_colored_box (GtkWidget *widget)
content_x = content_padding + border_width;
content_width = widget->allocation.width - 2 * content_padding - 2 * border_width;
- if (GTK_WIDGET_VISIBLE (priv->sidebar_image))
+ if (gtk_widget_get_visible (priv->sidebar_image))
{
if (!rtl)
content_x += priv->sidebar_image->allocation.width;
diff --git a/gtk/gtkbbox.c b/gtk/gtkbbox.c
index 3690a6b..5760509 100644
--- a/gtk/gtkbbox.c
+++ b/gtk/gtkbbox.c
@@ -390,7 +390,8 @@ gtk_button_box_set_child_secondary (GtkButtonBox *widget,
gtk_widget_child_notify (child, "secondary");
- if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (child))
+ if (gtk_widget_get_visible (GTK_WIDGET (widget))
+ && gtk_widget_get_visible (child))
gtk_widget_queue_resize (child);
}
@@ -457,7 +458,7 @@ _gtk_button_box_child_requisition (GtkWidget *widget,
child = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (child->widget))
+ if (gtk_widget_get_visible (child->widget))
{
nchildren += 1;
gtk_widget_size_request (child->widget, &child_requisition);
@@ -773,7 +774,7 @@ gtk_button_box_size_allocate (GtkWidget *widget,
child = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (child->widget))
+ if (gtk_widget_get_visible (child->widget))
{
child_allocation.width = child_width;
child_allocation.height = child_height;
diff --git a/gtk/gtkbin.c b/gtk/gtkbin.c
index e025994..bb45aac 100644
--- a/gtk/gtkbin.c
+++ b/gtk/gtkbin.c
@@ -104,12 +104,12 @@ gtk_bin_remove (GtkContainer *container,
g_return_if_fail (bin->child == child);
- widget_was_visible = GTK_WIDGET_VISIBLE (child);
+ widget_was_visible = gtk_widget_get_visible (child);
gtk_widget_unparent (child);
bin->child = NULL;
- /* queue resize regardless of GTK_WIDGET_VISIBLE (container),
+ /* queue resize regardless of gtk_widget_get_visible (container),
* since that's what is needed by toplevels, which derive from GtkBin.
*/
if (widget_was_visible)
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c
index 50c588b..1e1f9dc 100644
--- a/gtk/gtkbox.c
+++ b/gtk/gtkbox.c
@@ -273,7 +273,7 @@ gtk_box_size_request (GtkWidget *widget,
child = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (child->widget))
+ if (gtk_widget_get_visible (child->widget))
{
GtkRequisition child_requisition;
@@ -354,7 +354,7 @@ gtk_box_size_allocate (GtkWidget *widget,
{
child = children->data;
- if (GTK_WIDGET_VISIBLE (child->widget))
+ if (gtk_widget_get_visible (child->widget))
{
nvis_children += 1;
if (child->expand)
@@ -414,7 +414,7 @@ gtk_box_size_allocate (GtkWidget *widget,
child = children->data;
children = children->next;
- if ((child->pack == GTK_PACK_START) && GTK_WIDGET_VISIBLE (child->widget))
+ if ((child->pack == GTK_PACK_START) && gtk_widget_get_visible (child->widget))
{
if (box->homogeneous)
{
@@ -513,7 +513,7 @@ gtk_box_size_allocate (GtkWidget *widget,
child = children->data;
children = children->next;
- if ((child->pack == GTK_PACK_END) && GTK_WIDGET_VISIBLE (child->widget))
+ if ((child->pack == GTK_PACK_END) && gtk_widget_get_visible (child->widget))
{
GtkRequisition child_requisition;
@@ -1060,7 +1060,8 @@ gtk_box_reorder_child (GtkBox *box,
box->children = g_list_insert_before (box->children, new_link, child_info);
gtk_widget_child_notify (child, "position");
- if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (box))
+ if (gtk_widget_get_visible (child)
+ && gtk_widget_get_visible (GTK_WIDGET (box)))
gtk_widget_queue_resize (child);
}
@@ -1162,7 +1163,8 @@ gtk_box_set_child_packing (GtkBox *box,
child_info->pack = GTK_PACK_START;
gtk_widget_child_notify (child, "pack-type");
- if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (box))
+ if (gtk_widget_get_visible (child)
+ && gtk_widget_get_visible (GTK_WIDGET (box)))
gtk_widget_queue_resize (child);
}
gtk_widget_thaw_child_notify (child);
@@ -1209,14 +1211,14 @@ gtk_box_remove (GtkContainer *container,
{
gboolean was_visible;
- was_visible = GTK_WIDGET_VISIBLE (widget);
+ was_visible = gtk_widget_get_visible (widget);
gtk_widget_unparent (widget);
box->children = g_list_remove_link (box->children, children);
g_list_free (children);
g_free (child);
- /* queue resize regardless of GTK_WIDGET_VISIBLE (container),
+ /* queue resize regardless of gtk_widget_get_visible (container),
* since that's what is needed by toplevels.
*/
if (was_visible)
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 860d91a..8b44900 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -1360,7 +1360,7 @@ gtk_button_size_request (GtkWidget *widget,
requisition->height += default_border.top + default_border.bottom;
}
- if (GTK_BIN (button)->child && GTK_WIDGET_VISIBLE (GTK_BIN (button)->child))
+ if (GTK_BIN (button)->child && gtk_widget_get_visible (GTK_BIN (button)->child))
{
GtkRequisition child_requisition;
@@ -1405,7 +1405,7 @@ gtk_button_size_allocate (GtkWidget *widget,
widget->allocation.width - border_width * 2,
widget->allocation.height - border_width * 2);
- if (GTK_BIN (button)->child && GTK_WIDGET_VISIBLE (GTK_BIN (button)->child))
+ if (GTK_BIN (button)->child && gtk_widget_get_visible (GTK_BIN (button)->child))
{
child_allocation.x = widget->allocation.x + border_width + inner_border.left + xthickness;
child_allocation.y = widget->allocation.y + border_width + inner_border.top + ythickness;
diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c
index a9e34b2..4dd458b 100644
--- a/gtk/gtkcheckbutton.c
+++ b/gtk/gtkcheckbutton.c
@@ -153,7 +153,7 @@ gtk_check_button_paint (GtkWidget *widget,
{
GtkWidget *child = GTK_BIN (widget)->child;
- if (interior_focus && child && GTK_WIDGET_VISIBLE (child))
+ if (interior_focus && child && gtk_widget_get_visible (child))
gtk_paint_focus (widget->style, widget->window, GTK_WIDGET_STATE (widget),
area, widget, "checkbutton",
child->allocation.x - focus_width - focus_pad,
@@ -213,7 +213,7 @@ gtk_check_button_size_request (GtkWidget *widget,
&indicator_size, &indicator_spacing);
child = GTK_BIN (widget)->child;
- if (child && GTK_WIDGET_VISIBLE (child))
+ if (child && gtk_widget_get_visible (child))
{
GtkRequisition child_requisition;
@@ -264,7 +264,7 @@ gtk_check_button_size_allocate (GtkWidget *widget,
allocation->x, allocation->y,
allocation->width, allocation->height);
- if (GTK_BIN (button)->child && GTK_WIDGET_VISIBLE (GTK_BIN (button)->child))
+ if (GTK_BIN (button)->child && gtk_widget_get_visible (GTK_BIN (button)->child))
{
GtkRequisition child_requisition;
gint border_width = GTK_CONTAINER (widget)->border_width;
@@ -376,7 +376,7 @@ gtk_real_check_button_draw_indicator (GtkCheckButton *check_button,
y = widget->allocation.y + (widget->allocation.height - indicator_size) / 2;
child = GTK_BIN (check_button)->child;
- if (!interior_focus || !(child && GTK_WIDGET_VISIBLE (child)))
+ if (!interior_focus || !(child && gtk_widget_get_visible (child)))
x += focus_width + focus_pad;
if (toggle_button->inconsistent)
diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c
index d66bd7e..50a0216 100644
--- a/gtk/gtkclist.c
+++ b/gtk/gtkclist.c
@@ -1255,7 +1255,7 @@ gtk_clist_set_shadow_type (GtkCList *clist,
clist->shadow_type = type;
- if (GTK_WIDGET_VISIBLE (clist))
+ if (gtk_widget_get_visible (GTK_WIDGET (clist)))
gtk_widget_queue_resize (GTK_WIDGET (clist));
}
@@ -1379,7 +1379,7 @@ gtk_clist_column_title_active (GtkCList *clist,
NULL);
GTK_WIDGET_SET_FLAGS (clist->column[column].button, GTK_CAN_FOCUS);
- if (GTK_WIDGET_VISIBLE (clist))
+ if (gtk_widget_get_visible (GTK_WIDGET (clist)))
gtk_widget_queue_draw (clist->column[column].button);
}
@@ -1410,7 +1410,7 @@ gtk_clist_column_title_passive (GtkCList *clist,
NULL);
GTK_WIDGET_UNSET_FLAGS (clist->column[column].button, GTK_CAN_FOCUS);
- if (GTK_WIDGET_VISIBLE (clist))
+ if (gtk_widget_get_visible (GTK_WIDGET (clist)))
gtk_widget_queue_draw (clist->column[column].button);
}
@@ -1496,7 +1496,7 @@ gtk_clist_set_column_title (GtkCList *clist,
/* if this button didn't previously exist, then the
* column button positions have to be re-computed */
- if (GTK_WIDGET_VISIBLE (clist) && new_button)
+ if (gtk_widget_get_visible (GTK_WIDGET (clist)) && new_button)
size_allocate_title_buttons (clist);
}
@@ -1550,7 +1550,7 @@ gtk_clist_set_column_widget (GtkCList *clist,
/* if this button didn't previously exist, then the
* column button positions have to be re-computed */
- if (GTK_WIDGET_VISIBLE (clist) && new_button)
+ if (gtk_widget_get_visible (GTK_WIDGET (clist)) && new_button)
size_allocate_title_buttons (clist);
}
@@ -1671,7 +1671,7 @@ gtk_clist_set_column_resizeable (GtkCList *clist,
if (resizeable)
clist->column[column].auto_resize = FALSE;
- if (GTK_WIDGET_VISIBLE (clist))
+ if (gtk_widget_get_visible (GTK_WIDGET (clist)))
size_allocate_title_buttons (clist);
}
@@ -1700,7 +1700,7 @@ gtk_clist_set_column_auto_resize (GtkCList *clist,
}
}
- if (GTK_WIDGET_VISIBLE (clist))
+ if (gtk_widget_get_visible (GTK_WIDGET (clist)))
size_allocate_title_buttons (clist);
}
@@ -4692,7 +4692,7 @@ gtk_clist_map (GtkWidget *widget)
for (i = 0; i < clist->columns; i++)
{
if (clist->column[i].button &&
- GTK_WIDGET_VISIBLE (clist->column[i].button) &&
+ gtk_widget_get_visible (clist->column[i].button) &&
!GTK_WIDGET_MAPPED (clist->column[i].button))
gtk_widget_map (clist->column[i].button);
}
@@ -6161,7 +6161,7 @@ adjust_allocation_recurse (GtkWidget *widget,
if (!GTK_WIDGET_REALIZED (widget))
{
- if (GTK_WIDGET_VISIBLE (widget))
+ if (gtk_widget_get_visible (widget))
{
GdkRectangle tmp_rectangle = widget->allocation;
tmp_rectangle.x += scroll_data->dx;
@@ -6693,7 +6693,7 @@ title_focus_move (GtkCList *clist,
while (!return_val && j >= 0 && j < clist->columns)
{
if (clist->column[j].button &&
- GTK_WIDGET_VISIBLE (clist->column[j].button))
+ gtk_widget_get_visible (clist->column[j].button))
{
if (focus_column (clist, j, dir))
{
@@ -6713,7 +6713,7 @@ title_focus_move (GtkCList *clist,
while (!return_val && j != i)
{
if (clist->column[j].button &&
- GTK_WIDGET_VISIBLE (clist->column[j].button))
+ gtk_widget_get_visible (clist->column[j].button))
{
if (focus_column (clist, j, dir))
{
diff --git a/gtk/gtkcombo.c b/gtk/gtkcombo.c
index 7c7e9b4..a911697 100644
--- a/gtk/gtkcombo.c
+++ b/gtk/gtkcombo.c
@@ -705,7 +705,7 @@ static void
gtk_combo_selection_changed (GtkList *list,
GtkCombo *combo)
{
- if (!GTK_WIDGET_VISIBLE (combo->popwin))
+ if (!gtk_widget_get_visible (combo->popwin))
gtk_combo_update_entry (combo);
}
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 5eb0737..072e376 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -1573,7 +1573,7 @@ gtk_combo_box_menu_position_over (GtkMenu *menu,
if (active == child)
break;
- if (GTK_WIDGET_VISIBLE (child))
+ if (gtk_widget_get_visible (child))
{
gtk_widget_get_child_requisition (child, &requisition);
menu_ypos -= requisition.height;
@@ -1627,7 +1627,7 @@ gtk_combo_box_menu_position (GtkMenu *menu,
gtk_combo_box_menu_position_over (menu, x, y, push_in, user_data);
}
- if (!GTK_WIDGET_VISIBLE (GTK_MENU (priv->popup_widget)->toplevel))
+ if (!gtk_widget_get_visible (GTK_MENU (priv->popup_widget)->toplevel))
gtk_window_set_type_hint (GTK_WINDOW (GTK_MENU (priv->popup_widget)->toplevel),
GDK_WINDOW_TYPE_HINT_COMBO);
}
@@ -2318,7 +2318,7 @@ gtk_combo_box_size_allocate (GtkWidget *widget,
child.width -= child.x;
}
- if (GTK_WIDGET_VISIBLE (priv->popup_widget))
+ if (gtk_widget_get_visible (priv->popup_widget))
{
gint width;
GtkRequisition requisition;
@@ -2405,7 +2405,7 @@ gtk_combo_box_size_allocate (GtkWidget *widget,
child.height -= delta_y * 2;
}
- if (GTK_WIDGET_VISIBLE (priv->popup_window))
+ if (gtk_widget_get_visible (priv->popup_window))
{
gint x, y, width, height;
gtk_combo_box_list_position (combo_box, &x, &y, &width, &height);
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index 3f54017..2aa7ef6 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -1379,7 +1379,7 @@ _gtk_container_queue_resize (GtkContainer *container)
if (resize_container)
{
- if (GTK_WIDGET_VISIBLE (resize_container) &&
+ if (gtk_widget_get_visible (GTK_WIDGET (resize_container)) &&
(gtk_widget_is_toplevel (GTK_WIDGET (resize_container)) || GTK_WIDGET_REALIZED (resize_container)))
{
switch (resize_container->resize_mode)
@@ -2655,7 +2655,7 @@ static void
gtk_container_map_child (GtkWidget *child,
gpointer client_data)
{
- if (GTK_WIDGET_VISIBLE (child) &&
+ if (gtk_widget_get_visible (child) &&
GTK_WIDGET_CHILD_VISIBLE (child) &&
!GTK_WIDGET_MAPPED (child))
gtk_widget_map (child);
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c
index 8d9dfe3..d14e8ac 100644
--- a/gtk/gtkdialog.c
+++ b/gtk/gtkdialog.c
@@ -1057,7 +1057,7 @@ gtk_dialog_run (GtkDialog *dialog)
if (!was_modal)
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- if (!GTK_WIDGET_VISIBLE (dialog))
+ if (!gtk_widget_get_visible (GTK_WIDGET (dialog)))
gtk_widget_show (GTK_WIDGET (dialog));
response_handler =
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index c256b0e..3488509 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -3049,7 +3049,7 @@ gtk_drag_update_icon (GtkDragSourceInfo *info)
info->cur_x - hot_x,
info->cur_y - hot_y);
- if (GTK_WIDGET_VISIBLE (icon_window))
+ if (gtk_widget_get_visible (icon_window))
gdk_window_raise (icon_window->window);
else
gtk_widget_show (icon_window);
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 9d0df4d..9fbd962 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -7603,7 +7603,7 @@ gtk_entry_set_icon_from_pixbuf (GtkEntry *entry,
gtk_entry_ensure_pixbuf (entry, icon_pos);
- if (GTK_WIDGET_VISIBLE (entry))
+ if (gtk_widget_get_visible (GTK_WIDGET (entry)))
gtk_widget_queue_resize (GTK_WIDGET (entry));
g_object_thaw_notify (G_OBJECT (entry));
@@ -7670,7 +7670,7 @@ gtk_entry_set_icon_from_stock (GtkEntry *entry,
gtk_entry_ensure_pixbuf (entry, icon_pos);
- if (GTK_WIDGET_VISIBLE (entry))
+ if (gtk_widget_get_visible (GTK_WIDGET (entry)))
gtk_widget_queue_resize (GTK_WIDGET (entry));
g_object_thaw_notify (G_OBJECT (entry));
@@ -7740,7 +7740,7 @@ gtk_entry_set_icon_from_icon_name (GtkEntry *entry,
gtk_entry_ensure_pixbuf (entry, icon_pos);
- if (GTK_WIDGET_VISIBLE (entry))
+ if (gtk_widget_get_visible (GTK_WIDGET (entry)))
gtk_widget_queue_resize (GTK_WIDGET (entry));
g_object_thaw_notify (G_OBJECT (entry));
@@ -7807,7 +7807,7 @@ gtk_entry_set_icon_from_gicon (GtkEntry *entry,
gtk_entry_ensure_pixbuf (entry, icon_pos);
- if (GTK_WIDGET_VISIBLE (entry))
+ if (gtk_widget_get_visible (GTK_WIDGET (entry)))
gtk_widget_queue_resize (GTK_WIDGET (entry));
g_object_thaw_notify (G_OBJECT (entry));
@@ -9261,7 +9261,7 @@ gtk_entry_completion_timeout (gpointer data)
g_object_get (completion, "popup-single-match", &popup_single, NULL);
if ((matches > (popup_single ? 0: 1)) || actions > 0)
{
- if (GTK_WIDGET_VISIBLE (completion->priv->popup_window))
+ if (gtk_widget_get_visible (completion->priv->popup_window))
_gtk_entry_completion_resize_popup (completion);
else
_gtk_entry_completion_popup (completion);
@@ -9269,7 +9269,7 @@ gtk_entry_completion_timeout (gpointer data)
else
_gtk_entry_completion_popdown (completion);
}
- else if (GTK_WIDGET_VISIBLE (completion->priv->popup_window))
+ else if (gtk_widget_get_visible (completion->priv->popup_window))
_gtk_entry_completion_popdown (completion);
return FALSE;
@@ -9578,7 +9578,7 @@ gtk_entry_completion_changed (GtkWidget *entry,
if (completion->priv->minimum_key_length > 0 &&
strcmp ("", gtk_entry_get_text (GTK_ENTRY (entry))) == 0)
{
- if (GTK_WIDGET_VISIBLE (completion->priv->popup_window))
+ if (gtk_widget_get_visible (completion->priv->popup_window))
_gtk_entry_completion_popdown (completion);
return;
}
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
index dbb2e72..c997e60 100644
--- a/gtk/gtkentrycompletion.c
+++ b/gtk/gtkentrycompletion.c
@@ -1051,7 +1051,7 @@ gtk_entry_completion_set_model (GtkEntryCompletion *completion,
g_object_notify (G_OBJECT (completion), "model");
- if (GTK_WIDGET_VISIBLE (completion->priv->popup_window))
+ if (gtk_widget_get_visible (completion->priv->popup_window))
_gtk_entry_completion_resize_popup (completion);
}
@@ -1180,7 +1180,7 @@ gtk_entry_completion_complete (GtkEntryCompletion *completion)
gtk_tree_model_filter_refilter (completion->priv->filter_model);
- if (GTK_WIDGET_VISIBLE (completion->priv->popup_window))
+ if (gtk_widget_get_visible (completion->priv->popup_window))
_gtk_entry_completion_resize_popup (completion);
}
diff --git a/gtk/gtkeventbox.c b/gtk/gtkeventbox.c
index 9c8f6ff..f6f57d9 100644
--- a/gtk/gtkeventbox.c
+++ b/gtk/gtkeventbox.c
@@ -246,7 +246,7 @@ gtk_event_box_set_visible_window (GtkEventBox *event_box,
{
if (GTK_WIDGET_REALIZED (widget))
{
- gboolean visible = GTK_WIDGET_VISIBLE (widget);
+ gboolean visible = gtk_widget_get_visible (widget);
if (visible)
gtk_widget_hide (widget);
@@ -265,7 +265,7 @@ gtk_event_box_set_visible_window (GtkEventBox *event_box,
gtk_widget_set_has_window (widget, visible_window);
}
- if (GTK_WIDGET_VISIBLE (widget))
+ if (gtk_widget_get_visible (widget))
gtk_widget_queue_resize (widget);
g_object_notify (G_OBJECT (event_box), "visible-window");
@@ -341,7 +341,7 @@ gtk_event_box_set_above_child (GtkEventBox *event_box,
}
else
{
- gboolean visible = GTK_WIDGET_VISIBLE (widget);
+ gboolean visible = gtk_widget_get_visible (widget);
if (visible)
gtk_widget_hide (widget);
@@ -355,7 +355,7 @@ gtk_event_box_set_above_child (GtkEventBox *event_box,
}
}
- if (GTK_WIDGET_VISIBLE (widget))
+ if (gtk_widget_get_visible (widget))
gtk_widget_queue_resize (widget);
g_object_notify (G_OBJECT (event_box), "above-child");
@@ -487,7 +487,7 @@ gtk_event_box_size_request (GtkWidget *widget,
requisition->width = GTK_CONTAINER (widget)->border_width * 2;
requisition->height = GTK_CONTAINER (widget)->border_width * 2;
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
GtkRequisition child_requisition;
diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c
index e96635b..2362a2d 100644
--- a/gtk/gtkexpander.c
+++ b/gtk/gtkexpander.c
@@ -409,7 +409,7 @@ gtk_expander_realize (GtkWidget *widget)
get_expander_bounds (GTK_EXPANDER (widget), &expander_rect);
- if (priv->label_widget && GTK_WIDGET_VISIBLE (priv->label_widget))
+ if (priv->label_widget && gtk_widget_get_visible (priv->label_widget))
{
GtkRequisition label_requisition;
@@ -490,7 +490,7 @@ gtk_expander_size_request (GtkWidget *widget,
2 * focus_width + 2 * focus_pad;
requisition->height = interior_focus ? (2 * focus_width + 2 * focus_pad) : 0;
- if (priv->label_widget && GTK_WIDGET_VISIBLE (priv->label_widget))
+ if (priv->label_widget && gtk_widget_get_visible (priv->label_widget))
{
GtkRequisition label_requisition;
@@ -557,7 +557,7 @@ get_expander_bounds (GtkExpander *expander,
rect->x += widget->allocation.width - 2 * border_width -
expander_spacing - expander_size;
- if (priv->label_widget && GTK_WIDGET_VISIBLE (priv->label_widget))
+ if (priv->label_widget && gtk_widget_get_visible (priv->label_widget))
{
GtkAllocation label_allocation;
@@ -626,7 +626,7 @@ gtk_expander_size_allocate (GtkWidget *widget,
widget->allocation = *allocation;
- if (priv->label_widget && GTK_WIDGET_VISIBLE (priv->label_widget))
+ if (priv->label_widget && gtk_widget_get_visible (priv->label_widget))
{
GtkAllocation label_allocation;
GtkRequisition label_requisition;
@@ -765,7 +765,7 @@ gtk_expander_paint_prelight (GtkExpander *expander)
area.y = widget->allocation.y + container->border_width;
area.width = widget->allocation.width - (2 * container->border_width);
- if (priv->label_widget && GTK_WIDGET_VISIBLE (priv->label_widget))
+ if (priv->label_widget && gtk_widget_get_visible (priv->label_widget))
area.height = priv->label_widget->allocation.height;
else
area.height = 0;
@@ -847,7 +847,7 @@ gtk_expander_paint_focus (GtkExpander *expander,
if (priv->label_widget)
{
- if (GTK_WIDGET_VISIBLE (priv->label_widget))
+ if (gtk_widget_get_visible (priv->label_widget))
{
GtkAllocation label_allocation = priv->label_widget->allocation;
@@ -1686,6 +1686,7 @@ gtk_expander_set_label_widget (GtkExpander *expander,
GtkWidget *label_widget)
{
GtkExpanderPrivate *priv;
+ GtkWidget *widget;
g_return_if_fail (GTK_IS_EXPANDER (expander));
g_return_if_fail (label_widget == NULL || GTK_IS_WIDGET (label_widget));
@@ -1703,19 +1704,20 @@ gtk_expander_set_label_widget (GtkExpander *expander,
}
priv->label_widget = label_widget;
+ widget = GTK_WIDGET (expander);
if (label_widget)
{
priv->label_widget = label_widget;
- gtk_widget_set_parent (label_widget, GTK_WIDGET (expander));
+ gtk_widget_set_parent (label_widget, widget);
if (priv->prelight)
gtk_widget_set_state (label_widget, GTK_STATE_PRELIGHT);
}
- if (GTK_WIDGET_VISIBLE (expander))
- gtk_widget_queue_resize (GTK_WIDGET (expander));
+ if (gtk_widget_get_visible (widget))
+ gtk_widget_queue_resize (widget);
g_object_freeze_notify (G_OBJECT (expander));
g_object_notify (G_OBJECT (expander), "label-widget");
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c
index 771597a..441c15b 100644
--- a/gtk/gtkfilechooserbutton.c
+++ b/gtk/gtkfilechooserbutton.c
@@ -2443,7 +2443,7 @@ open_dialog (GtkFileChooserButton *button)
/* Setup the dialog parent to be chooser button's toplevel, and be modal
as needed. */
- if (!GTK_WIDGET_VISIBLE (priv->dialog))
+ if (!gtk_widget_get_visible (priv->dialog))
{
GtkWidget *toplevel;
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index b54865e..2ced490 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -8030,14 +8030,14 @@ gtk_file_chooser_default_get_default_size (GtkFileChooserEmbed *chooser_embed,
if (impl->preview_widget_active &&
impl->preview_widget &&
- GTK_WIDGET_VISIBLE (impl->preview_widget))
+ gtk_widget_get_visible (impl->preview_widget))
{
gtk_widget_size_request (impl->preview_box, &req);
*default_width += PREVIEW_HBOX_SPACING + req.width;
}
if (impl->extra_widget &&
- GTK_WIDGET_VISIBLE (impl->extra_widget))
+ gtk_widget_get_visible (impl->extra_widget))
{
gtk_widget_size_request (impl->extra_align, &req);
*default_height += GTK_BOX (chooser_embed)->spacing + req.height;
diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c
index 191a5e0..05a5a1e 100644
--- a/gtk/gtkfixed.c
+++ b/gtk/gtkfixed.c
@@ -201,7 +201,8 @@ gtk_fixed_move_internal (GtkFixed *fixed,
gtk_widget_thaw_child_notify (widget);
- if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (fixed))
+ if (gtk_widget_get_visible (widget) &&
+ gtk_widget_get_visible (GTK_WIDGET (fixed)))
gtk_widget_queue_resize (GTK_WIDGET (fixed));
}
@@ -319,7 +320,7 @@ gtk_fixed_size_request (GtkWidget *widget,
child = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (child->widget))
+ if (gtk_widget_get_visible (child->widget))
{
gtk_widget_size_request (child->widget, &child_requisition);
@@ -369,7 +370,7 @@ gtk_fixed_size_allocate (GtkWidget *widget,
child = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (child->widget))
+ if (gtk_widget_get_visible (child->widget))
{
gtk_widget_get_child_requisition (child->widget, &child_requisition);
child_allocation.x = child->x + border_width;
@@ -401,9 +402,11 @@ gtk_fixed_remove (GtkContainer *container,
{
GtkFixed *fixed;
GtkFixedChild *child;
+ GtkWidget *widget_container;
GList *children;
fixed = GTK_FIXED (container);
+ widget_container = GTK_WIDGET (container);
children = fixed->children;
while (children)
@@ -412,7 +415,7 @@ gtk_fixed_remove (GtkContainer *container,
if (child->widget == widget)
{
- gboolean was_visible = GTK_WIDGET_VISIBLE (widget);
+ gboolean was_visible = gtk_widget_get_visible (widget);
gtk_widget_unparent (widget);
@@ -420,8 +423,8 @@ gtk_fixed_remove (GtkContainer *container,
g_list_free (children);
g_free (child);
- if (was_visible && GTK_WIDGET_VISIBLE (container))
- gtk_widget_queue_resize (GTK_WIDGET (container));
+ if (was_visible && gtk_widget_get_visible (widget_container))
+ gtk_widget_queue_resize (widget_container);
break;
}
diff --git a/gtk/gtkfontbutton.c b/gtk/gtkfontbutton.c
index 2f7e108..694c618 100644
--- a/gtk/gtkfontbutton.c
+++ b/gtk/gtkfontbutton.c
@@ -722,7 +722,7 @@ gtk_font_button_clicked (GtkButton *button)
G_CALLBACK (dialog_destroy), font_button);
}
- if (!GTK_WIDGET_VISIBLE (font_button->priv->font_dialog))
+ if (!gtk_widget_get_visible (font_button->priv->font_dialog))
{
font_dialog = GTK_FONT_SELECTION_DIALOG (font_button->priv->font_dialog);
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c
index 7e1b722..3e09e7b 100644
--- a/gtk/gtkframe.c
+++ b/gtk/gtkframe.c
@@ -379,7 +379,7 @@ gtk_frame_set_label_widget (GtkFrame *frame,
if (frame->label_widget)
{
- need_resize = GTK_WIDGET_VISIBLE (frame->label_widget);
+ need_resize = gtk_widget_get_visible (frame->label_widget);
gtk_widget_unparent (frame->label_widget);
}
@@ -389,10 +389,10 @@ gtk_frame_set_label_widget (GtkFrame *frame,
{
frame->label_widget = label_widget;
gtk_widget_set_parent (label_widget, GTK_WIDGET (frame));
- need_resize |= GTK_WIDGET_VISIBLE (label_widget);
+ need_resize |= gtk_widget_get_visible (label_widget);
}
- if (GTK_WIDGET_VISIBLE (frame) && need_resize)
+ if (gtk_widget_get_visible (GTK_WIDGET (frame)) && need_resize)
gtk_widget_queue_resize (GTK_WIDGET (frame));
g_object_freeze_notify (G_OBJECT (frame));
@@ -609,7 +609,7 @@ gtk_frame_size_request (GtkWidget *widget,
GtkBin *bin = GTK_BIN (widget);
GtkRequisition child_requisition;
- if (frame->label_widget && GTK_WIDGET_VISIBLE (frame->label_widget))
+ if (frame->label_widget && gtk_widget_get_visible (frame->label_widget))
{
gtk_widget_size_request (frame->label_widget, &child_requisition);
@@ -623,7 +623,7 @@ gtk_frame_size_request (GtkWidget *widget,
requisition->height = 0;
}
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
gtk_widget_size_request (bin->child, &child_requisition);
@@ -659,12 +659,12 @@ gtk_frame_size_allocate (GtkWidget *widget,
new_allocation.height != frame->child_allocation.height))
gdk_window_invalidate_rect (widget->window, &widget->allocation, FALSE);
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
gtk_widget_size_allocate (bin->child, &new_allocation);
frame->child_allocation = new_allocation;
- if (frame->label_widget && GTK_WIDGET_VISIBLE (frame->label_widget))
+ if (frame->label_widget && gtk_widget_get_visible (frame->label_widget))
{
GtkRequisition child_requisition;
GtkAllocation child_allocation;
diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c
index 7a25be7..9fc9fc3 100644
--- a/gtk/gtkhandlebox.c
+++ b/gtk/gtkhandlebox.c
@@ -354,7 +354,7 @@ gtk_handle_box_map (GtkWidget *widget)
hb = GTK_HANDLE_BOX (widget);
if (bin->child &&
- GTK_WIDGET_VISIBLE (bin->child) &&
+ gtk_widget_get_visible (bin->child) &&
!GTK_WIDGET_MAPPED (bin->child))
gtk_widget_map (bin->child);
@@ -620,7 +620,7 @@ gtk_handle_box_size_allocate (GtkWidget *widget,
widget->allocation.height);
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
GtkAllocation child_allocation;
guint border_width;
@@ -951,7 +951,7 @@ gtk_handle_box_paint (GtkWidget *widget,
event ? &event->area : area,
handle_orientation);
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
GTK_WIDGET_CLASS (gtk_handle_box_parent_class)->expose_event (widget, event);
}
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index 872644c..15fdb6f 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -1425,7 +1425,7 @@ gtk_icon_view_size_request (GtkWidget *widget,
tmp_list = tmp_list->next;
- if (GTK_WIDGET_VISIBLE (child->widget))
+ if (gtk_widget_get_visible (child->widget))
gtk_widget_size_request (child->widget, &child_requisition);
}
}
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index 8b9a9d5..c92f7c6 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -2395,11 +2395,13 @@ gtk_image_update_size (GtkImage *image,
gint image_width,
gint image_height)
{
- GTK_WIDGET (image)->requisition.width = image_width + GTK_MISC (image)->xpad * 2;
- GTK_WIDGET (image)->requisition.height = image_height + GTK_MISC (image)->ypad * 2;
+ GtkWidget *widget = GTK_WIDGET (image);
+
+ widget->requisition.width = image_width + GTK_MISC (image)->xpad * 2;
+ widget->requisition.height = image_height + GTK_MISC (image)->ypad * 2;
- if (GTK_WIDGET_VISIBLE (image))
- gtk_widget_queue_resize (GTK_WIDGET (image));
+ if (gtk_widget_get_visible (widget))
+ gtk_widget_queue_resize (widget);
}
diff --git a/gtk/gtkimagemenuitem.c b/gtk/gtkimagemenuitem.c
index 4441145..3c93476 100644
--- a/gtk/gtkimagemenuitem.c
+++ b/gtk/gtkimagemenuitem.c
@@ -326,7 +326,7 @@ gtk_image_menu_item_toggle_size_request (GtkMenuItem *menu_item,
*requisition = 0;
- if (image_menu_item->image && GTK_WIDGET_VISIBLE (image_menu_item->image))
+ if (image_menu_item->image && gtk_widget_get_visible (image_menu_item->image))
{
GtkRequisition image_requisition;
guint toggle_spacing;
@@ -420,7 +420,7 @@ gtk_image_menu_item_size_request (GtkWidget *widget,
image_menu_item = GTK_IMAGE_MENU_ITEM (widget);
- if (image_menu_item->image && GTK_WIDGET_VISIBLE (image_menu_item->image))
+ if (image_menu_item->image && gtk_widget_get_visible (image_menu_item->image))
{
GtkRequisition child_requisition;
@@ -464,7 +464,7 @@ gtk_image_menu_item_size_allocate (GtkWidget *widget,
GTK_WIDGET_CLASS (gtk_image_menu_item_parent_class)->size_allocate (widget, allocation);
- if (image_menu_item->image && GTK_WIDGET_VISIBLE (image_menu_item->image))
+ if (image_menu_item->image && gtk_widget_get_visible (image_menu_item->image))
{
gint x, y, offset;
GtkRequisition child_requisition;
@@ -977,12 +977,13 @@ gtk_image_menu_item_remove (GtkContainer *container,
{
gboolean widget_was_visible;
- widget_was_visible = GTK_WIDGET_VISIBLE (child);
+ widget_was_visible = gtk_widget_get_visible (child);
gtk_widget_unparent (child);
image_menu_item->image = NULL;
- if (GTK_WIDGET_VISIBLE (container) && widget_was_visible)
+ if (widget_was_visible &&
+ gtk_widget_get_visible (GTK_WIDGET (container)))
gtk_widget_queue_resize (GTK_WIDGET (container));
g_object_notify (G_OBJECT (image_menu_item), "image");
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index faa78e5..ccc9c89 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -3557,7 +3557,7 @@ gtk_label_expose (GtkWidget *widget,
gtk_label_ensure_layout (label);
- if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_MAPPED (widget) &&
+ if (gtk_widget_get_visible (widget) && GTK_WIDGET_MAPPED (widget) &&
label->text && (*label->text != '\0'))
{
get_layout_location (label, &x, &y);
diff --git a/gtk/gtklayout.c b/gtk/gtklayout.c
index f46b473..b4c58fd 100644
--- a/gtk/gtklayout.c
+++ b/gtk/gtklayout.c
@@ -409,8 +409,9 @@ gtk_layout_move_internal (GtkLayout *layout,
gtk_widget_thaw_child_notify (widget);
- if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (layout))
- gtk_widget_queue_resize (GTK_WIDGET (widget));
+ if (gtk_widget_get_visible (widget) &&
+ gtk_widget_get_visible (GTK_WIDGET (layout)))
+ gtk_widget_queue_resize (widget);
}
/**
@@ -915,7 +916,7 @@ gtk_layout_map (GtkWidget *widget)
GtkLayoutChild *child = tmp_list->data;
tmp_list = tmp_list->next;
- if (GTK_WIDGET_VISIBLE (child->widget))
+ if (gtk_widget_get_visible (child->widget))
{
if (!GTK_WIDGET_MAPPED (child->widget))
gtk_widget_map (child->widget);
diff --git a/gtk/gtklist.c b/gtk/gtklist.c
index cf691f0..9b9f4f0 100644
--- a/gtk/gtklist.c
+++ b/gtk/gtklist.c
@@ -382,7 +382,7 @@ gtk_list_size_request (GtkWidget *widget,
child = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (child))
+ if (gtk_widget_get_visible (child))
{
GtkRequisition child_requisition;
@@ -430,7 +430,7 @@ gtk_list_size_allocate (GtkWidget *widget,
child = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (child))
+ if (gtk_widget_get_visible (child))
{
GtkRequisition child_requisition;
gtk_widget_get_child_requisition (child, &child_requisition);
@@ -1204,7 +1204,7 @@ gtk_list_clear_items (GtkList *list,
}
}
- if (GTK_WIDGET_VISIBLE (list))
+ if (gtk_widget_get_visible (GTK_WIDGET (list)))
gtk_widget_queue_resize (GTK_WIDGET (list));
}
@@ -1337,7 +1337,7 @@ gtk_list_remove_items_internal (GtkList *list,
}
}
- if (GTK_WIDGET_VISIBLE (list))
+ if (gtk_widget_get_visible (GTK_WIDGET (list)))
gtk_widget_queue_resize (GTK_WIDGET (list));
}
diff --git a/gtk/gtklistitem.c b/gtk/gtklistitem.c
index 5f26644..1983f9f 100644
--- a/gtk/gtklistitem.c
+++ b/gtk/gtklistitem.c
@@ -484,7 +484,7 @@ gtk_list_item_size_request (GtkWidget *widget,
requisition->height = 2 * (GTK_CONTAINER (widget)->border_width +
focus_width + focus_pad - 1);
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
gtk_widget_size_request (bin->child, &child_requisition);
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 660aed4..4b1ae90 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -2564,7 +2564,7 @@ gtk_print (gchar *str)
gtk_text_insert (GTK_TEXT (text), NULL, NULL, NULL, str, -1);
level -= 1;
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
}
#endif
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index bfa6c81..2208623 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -1568,7 +1568,7 @@ gtk_menu_popup (GtkMenu *menu,
/* We need to show the menu here rather in the init function because
* code expects to be able to tell if the menu is onscreen by
- * looking at the GTK_WIDGET_VISIBLE (menu)
+ * looking at the gtk_widget_get_visible (menu)
*/
gtk_widget_show (GTK_WIDGET (menu));
@@ -1928,7 +1928,7 @@ gtk_menu_set_tearoff_hints (GtkMenu *menu,
if (!menu->tearoff_window)
return;
- if (GTK_WIDGET_VISIBLE (menu->tearoff_scrollbar))
+ if (gtk_widget_get_visible (menu->tearoff_scrollbar))
{
gtk_widget_size_request (menu->tearoff_scrollbar, NULL);
width += menu->tearoff_scrollbar->requisition.width;
@@ -2015,7 +2015,7 @@ gtk_menu_set_tearoff_state (GtkMenu *menu,
if (menu->torn_off)
{
- if (GTK_WIDGET_VISIBLE (menu))
+ if (gtk_widget_get_visible (GTK_WIDGET (menu)))
gtk_menu_popdown (menu);
if (!menu->tearoff_window)
@@ -2450,7 +2450,7 @@ gtk_menu_size_request (GtkWidget *widget,
child = children->data;
children = children->next;
- if (! GTK_WIDGET_VISIBLE (child))
+ if (! gtk_widget_get_visible (child))
continue;
get_effective_child_attach (child, &l, &r, &t, &b);
@@ -2597,7 +2597,7 @@ gtk_menu_size_allocate (GtkWidget *widget,
child = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (child))
+ if (gtk_widget_get_visible (child))
{
gint i;
gint l, r, t, b;
@@ -2651,7 +2651,7 @@ gtk_menu_size_allocate (GtkWidget *widget,
{
if (allocation->height >= widget->requisition.height)
{
- if (GTK_WIDGET_VISIBLE (menu->tearoff_scrollbar))
+ if (gtk_widget_get_visible (menu->tearoff_scrollbar))
{
gtk_widget_hide (menu->tearoff_scrollbar);
gtk_menu_set_tearoff_hints (menu, allocation->width);
@@ -2676,7 +2676,7 @@ gtk_menu_size_allocate (GtkWidget *widget,
gtk_adjustment_changed (menu->tearoff_adjustment);
- if (!GTK_WIDGET_VISIBLE (menu->tearoff_scrollbar))
+ if (!gtk_widget_get_visible (menu->tearoff_scrollbar))
{
gtk_widget_show (menu->tearoff_scrollbar);
gtk_menu_set_tearoff_hints (menu, allocation->width);
@@ -4232,7 +4232,7 @@ gtk_menu_position (GtkMenu *menu)
private->initially_pushed_in = FALSE;
/* Set the type hint here to allow custom position functions to set a different hint */
- if (!GTK_WIDGET_VISIBLE (menu->toplevel))
+ if (!gtk_widget_get_visible (menu->toplevel))
gtk_window_set_type_hint (GTK_WINDOW (menu->toplevel), GDK_WINDOW_TYPE_HINT_POPUP_MENU);
if (menu->position_func)
@@ -5115,7 +5115,7 @@ child_at (GtkMenu *menu,
for (children = menu_shell->children; children; children = children->next)
{
- if (GTK_WIDGET_VISIBLE (children->data))
+ if (gtk_widget_get_visible (children->data))
{
GtkRequisition child_requisition;
diff --git a/gtk/gtkmenubar.c b/gtk/gtkmenubar.c
index 1d0f43c..9e533a6 100644
--- a/gtk/gtkmenubar.c
+++ b/gtk/gtkmenubar.c
@@ -291,7 +291,7 @@ gtk_menu_bar_size_request (GtkWidget *widget,
requisition->width = 0;
requisition->height = 0;
- if (GTK_WIDGET_VISIBLE (widget))
+ if (gtk_widget_get_visible (widget))
{
menu_bar = GTK_MENU_BAR (widget);
menu_shell = GTK_MENU_SHELL (widget);
@@ -305,7 +305,7 @@ gtk_menu_bar_size_request (GtkWidget *widget,
child = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (child))
+ if (gtk_widget_get_visible (child))
{
gint toggle_size;
@@ -432,7 +432,7 @@ gtk_menu_bar_size_allocate (GtkWidget *widget,
ltr_x = allocation->width -
child_requisition.width - offset;
}
- if (GTK_WIDGET_VISIBLE (child))
+ if (gtk_widget_get_visible (child))
{
if ((direction == GTK_TEXT_DIR_LTR) == (priv->pack_direction == GTK_PACK_DIRECTION_LTR))
child_allocation.x = ltr_x;
@@ -482,7 +482,7 @@ gtk_menu_bar_size_allocate (GtkWidget *widget,
ltr_y = allocation->height -
child_requisition.height - offset;
}
- if (GTK_WIDGET_VISIBLE (child))
+ if (gtk_widget_get_visible (child))
{
if ((direction == GTK_TEXT_DIR_LTR) ==
(priv->pack_direction == GTK_PACK_DIRECTION_TTB))
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index 5dc010b..5e474a8 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -982,7 +982,7 @@ gtk_menu_item_size_request (GtkWidget *widget,
(child_pack_dir == GTK_PACK_DIRECTION_TTB || child_pack_dir == GTK_PACK_DIRECTION_BTT))
requisition->height += 2 * horizontal_padding;
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
GtkRequisition child_requisition;
@@ -1820,7 +1820,7 @@ gtk_menu_item_position_menu (GtkMenu *menu,
gtk_menu_set_monitor (menu, monitor_num);
- if (!GTK_WIDGET_VISIBLE (menu->toplevel))
+ if (!gtk_widget_get_visible (menu->toplevel))
{
gtk_window_set_type_hint (GTK_WINDOW (menu->toplevel), menu_item->from_menubar?
GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU : GDK_WINDOW_TYPE_HINT_POPUP_MENU);
@@ -1912,7 +1912,7 @@ gtk_menu_item_can_activate_accel (GtkWidget *widget,
guint signal_id)
{
/* Chain to the parent GtkMenu for further checks */
- return (gtk_widget_is_sensitive (widget) && GTK_WIDGET_VISIBLE (widget) &&
+ return (gtk_widget_is_sensitive (widget) && gtk_widget_get_visible (widget) &&
widget->parent && gtk_widget_can_activate_accel (widget->parent, signal_id));
}
@@ -2102,7 +2102,7 @@ _gtk_menu_item_is_selectable (GtkWidget *menu_item)
G_OBJECT_TYPE (menu_item) == GTK_TYPE_MENU_ITEM) ||
GTK_IS_SEPARATOR_MENU_ITEM (menu_item) ||
!gtk_widget_is_sensitive (menu_item) ||
- !GTK_WIDGET_VISIBLE (menu_item))
+ !gtk_widget_get_visible (menu_item))
return FALSE;
return TRUE;
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c
index c9b8949..4a86b20 100644
--- a/gtk/gtkmenushell.c
+++ b/gtk/gtkmenushell.c
@@ -612,7 +612,7 @@ gtk_menu_shell_button_press (GtkWidget *widget,
if (menu_item && _gtk_menu_item_is_selectable (menu_item) &&
GTK_MENU_ITEM (menu_item)->submenu != NULL &&
- !GTK_WIDGET_VISIBLE (GTK_MENU_ITEM (menu_item)->submenu))
+ !gtk_widget_get_visible (GTK_MENU_ITEM (menu_item)->submenu))
{
GtkMenuShellPrivate *priv;
@@ -922,7 +922,7 @@ gtk_menu_shell_enter_notify (GtkWidget *widget,
priv = GTK_MENU_SHELL_GET_PRIVATE (menu_item->parent);
priv->activated_submenu = TRUE;
- if (!GTK_WIDGET_VISIBLE (GTK_MENU_ITEM (menu_item)->submenu))
+ if (!gtk_widget_get_visible (GTK_MENU_ITEM (menu_item)->submenu))
{
gboolean touchscreen_mode;
@@ -954,7 +954,7 @@ gtk_menu_shell_leave_notify (GtkWidget *widget,
event->mode == GDK_CROSSING_STATE_CHANGED)
return TRUE;
- if (GTK_WIDGET_VISIBLE (widget))
+ if (gtk_widget_get_visible (widget))
{
GtkMenuShell *menu_shell = GTK_MENU_SHELL (widget);
GtkWidget *event_widget = gtk_get_event_widget ((GdkEvent*) event);
@@ -1007,7 +1007,7 @@ gtk_menu_shell_remove (GtkContainer *container,
GtkMenuShell *menu_shell = GTK_MENU_SHELL (container);
gint was_visible;
- was_visible = GTK_WIDGET_VISIBLE (widget);
+ was_visible = gtk_widget_get_visible (widget);
menu_shell->children = g_list_remove (menu_shell->children, widget);
if (widget == menu_shell->active_menu_item)
@@ -1018,7 +1018,7 @@ gtk_menu_shell_remove (GtkContainer *container,
gtk_widget_unparent (widget);
- /* queue resize regardless of GTK_WIDGET_VISIBLE (container),
+ /* queue resize regardless of gtk_widget_get_visible (container),
* since that's what is needed by toplevels.
*/
if (was_visible)
@@ -1329,7 +1329,7 @@ gtk_menu_shell_select_first (GtkMenuShell *menu_shell,
{
GtkWidget *child = tmp_list->data;
- if ((!search_sensitive && GTK_WIDGET_VISIBLE (child)) ||
+ if ((!search_sensitive && gtk_widget_get_visible (child)) ||
_gtk_menu_item_is_selectable (child))
{
to_select = child;
@@ -1356,7 +1356,7 @@ _gtk_menu_shell_select_last (GtkMenuShell *menu_shell,
{
GtkWidget *child = tmp_list->data;
- if ((!search_sensitive && GTK_WIDGET_VISIBLE (child)) ||
+ if ((!search_sensitive && gtk_widget_get_visible (child)) ||
_gtk_menu_item_is_selectable (child))
{
to_select = child;
@@ -1415,7 +1415,7 @@ gtk_real_menu_shell_move_current (GtkMenuShell *menu_shell,
if (touchscreen_mode &&
menu_shell->active_menu_item &&
GTK_MENU_ITEM (menu_shell->active_menu_item)->submenu &&
- GTK_WIDGET_VISIBLE (GTK_MENU_ITEM (menu_shell->active_menu_item)->submenu))
+ gtk_widget_get_visible (GTK_MENU_ITEM (menu_shell->active_menu_item)->submenu))
{
/* if we are on a menu item that has an open submenu but the
* focus is not in that submenu (e.g. because it's empty or
diff --git a/gtk/gtkmenutoolbutton.c b/gtk/gtkmenutoolbutton.c
index 0144409..3e3cf07 100644
--- a/gtk/gtkmenutoolbutton.c
+++ b/gtk/gtkmenutoolbutton.c
@@ -344,7 +344,7 @@ arrow_button_toggled_cb (GtkToggleButton *togglebutton,
return;
if (gtk_toggle_button_get_active (togglebutton) &&
- !GTK_WIDGET_VISIBLE (priv->menu))
+ !gtk_widget_get_visible (GTK_WIDGET (priv->menu)))
{
/* we get here only when the menu is activated by a key
* press, so that we can select the first menu item */
@@ -544,7 +544,7 @@ gtk_menu_tool_button_set_menu (GtkMenuToolButton *button,
if (priv->menu != GTK_MENU (menu))
{
- if (priv->menu && GTK_WIDGET_VISIBLE (priv->menu))
+ if (priv->menu && gtk_widget_get_visible (GTK_WIDGET (priv->menu)))
gtk_menu_shell_deactivate (GTK_MENU_SHELL (priv->menu));
if (priv->menu)
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 3c639da..fd8075b 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -1655,7 +1655,7 @@ gtk_notebook_get_event_window_position (GtkNotebook *notebook,
for (tmp_list = notebook->children; tmp_list; tmp_list = tmp_list->next)
{
GtkNotebookPage *page = tmp_list->data;
- if (GTK_WIDGET_VISIBLE (page->child))
+ if (gtk_widget_get_visible (page->child))
{
visible_page = page;
break;
@@ -1682,7 +1682,7 @@ gtk_notebook_get_event_window_position (GtkNotebook *notebook,
for (i = 0; i < N_ACTION_WIDGETS; i++)
{
if (priv->action_widget[i] &&
- GTK_WIDGET_VISIBLE (priv->action_widget[i]))
+ gtk_widget_get_visible (priv->action_widget[i]))
{
rectangle->width -= priv->action_widget[i]->allocation.width;
if ((!is_rtl && i == ACTION_WIDGET_START) ||
@@ -1701,7 +1701,7 @@ gtk_notebook_get_event_window_position (GtkNotebook *notebook,
for (i = 0; i < N_ACTION_WIDGETS; i++)
{
if (priv->action_widget[i] &&
- GTK_WIDGET_VISIBLE (priv->action_widget[i]))
+ gtk_widget_get_visible (priv->action_widget[i]))
{
rectangle->height -= priv->action_widget[i]->allocation.height;
@@ -1742,14 +1742,14 @@ gtk_notebook_map (GtkWidget *widget)
priv = GTK_NOTEBOOK_GET_PRIVATE (notebook);
if (notebook->cur_page &&
- GTK_WIDGET_VISIBLE (notebook->cur_page->child) &&
+ gtk_widget_get_visible (notebook->cur_page->child) &&
!GTK_WIDGET_MAPPED (notebook->cur_page->child))
gtk_widget_map (notebook->cur_page->child);
for (i = 0; i < N_ACTION_WIDGETS; i++)
{
if (priv->action_widget[i] &&
- GTK_WIDGET_VISIBLE (priv->action_widget[i]) &&
+ gtk_widget_get_visible (priv->action_widget[i]) &&
GTK_WIDGET_CHILD_VISIBLE (priv->action_widget[i]) &&
!GTK_WIDGET_MAPPED (priv->action_widget[i]))
gtk_widget_map (priv->action_widget[i]);
@@ -1767,7 +1767,7 @@ gtk_notebook_map (GtkWidget *widget)
children = children->next;
if (page->tab_label &&
- GTK_WIDGET_VISIBLE (page->tab_label) &&
+ gtk_widget_get_visible (page->tab_label) &&
!GTK_WIDGET_MAPPED (page->tab_label))
gtk_widget_map (page->tab_label);
}
@@ -1884,7 +1884,7 @@ gtk_notebook_size_request (GtkWidget *widget,
{
page = children->data;
- if (GTK_WIDGET_VISIBLE (page->child))
+ if (gtk_widget_get_visible (page->child))
{
vis_pages++;
gtk_widget_size_request (page->child, &child_requisition);
@@ -1895,7 +1895,7 @@ gtk_notebook_size_request (GtkWidget *widget,
child_requisition.height);
if (notebook->menu && page->menu_label->parent &&
- !GTK_WIDGET_VISIBLE (page->menu_label->parent))
+ !gtk_widget_get_visible (page->menu_label->parent))
gtk_widget_show (page->menu_label->parent);
}
else
@@ -1903,7 +1903,7 @@ gtk_notebook_size_request (GtkWidget *widget,
if (page == notebook->cur_page)
switch_page = TRUE;
if (notebook->menu && page->menu_label->parent &&
- GTK_WIDGET_VISIBLE (page->menu_label->parent))
+ gtk_widget_get_visible (page->menu_label->parent))
gtk_widget_hide (page->menu_label->parent);
}
}
@@ -1928,9 +1928,9 @@ gtk_notebook_size_request (GtkWidget *widget,
{
page = children->data;
- if (GTK_WIDGET_VISIBLE (page->child))
+ if (gtk_widget_get_visible (page->child))
{
- if (!GTK_WIDGET_VISIBLE (page->tab_label))
+ if (!gtk_widget_get_visible (page->tab_label))
gtk_widget_show (page->tab_label);
gtk_widget_size_request (page->tab_label,
@@ -1961,7 +1961,7 @@ gtk_notebook_size_request (GtkWidget *widget,
break;
}
}
- else if (GTK_WIDGET_VISIBLE (page->tab_label))
+ else if (gtk_widget_get_visible (page->tab_label))
gtk_widget_hide (page->tab_label);
}
@@ -2001,7 +2001,7 @@ gtk_notebook_size_request (GtkWidget *widget,
page = children->data;
children = children->next;
- if (!GTK_WIDGET_VISIBLE (page->child))
+ if (!gtk_widget_get_visible (page->child))
continue;
if (notebook->homogeneous)
@@ -2051,7 +2051,7 @@ gtk_notebook_size_request (GtkWidget *widget,
page = children->data;
children = children->next;
- if (!GTK_WIDGET_VISIBLE (page->child))
+ if (!gtk_widget_get_visible (page->child))
continue;
page->requisition.width = tab_width;
@@ -2097,7 +2097,7 @@ gtk_notebook_size_request (GtkWidget *widget,
{
page = children->data;
- if (page->tab_label && GTK_WIDGET_VISIBLE (page->tab_label))
+ if (page->tab_label && gtk_widget_get_visible (page->tab_label))
gtk_widget_hide (page->tab_label);
}
}
@@ -2114,14 +2114,14 @@ gtk_notebook_size_request (GtkWidget *widget,
children = children->next)
{
page = children->data;
- if (GTK_WIDGET_VISIBLE (page->child))
+ if (gtk_widget_get_visible (page->child))
{
gtk_notebook_switch_page (notebook, page);
break;
}
}
}
- else if (GTK_WIDGET_VISIBLE (widget))
+ else if (gtk_widget_get_visible (widget))
{
widget->requisition.width = GTK_CONTAINER (widget)->border_width * 2;
widget->requisition.height= GTK_CONTAINER (widget)->border_width * 2;
@@ -2266,7 +2266,7 @@ gtk_notebook_size_allocate (GtkWidget *widget,
page = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (page->child))
+ if (gtk_widget_get_visible (page->child))
gtk_widget_size_allocate (page->child, &child_allocation);
}
@@ -2618,7 +2618,7 @@ get_tab_at_pos (GtkNotebook *notebook, gint x, gint y)
{
page = children->data;
- if (GTK_WIDGET_VISIBLE (page->child) &&
+ if (gtk_widget_get_visible (page->child) &&
page->tab_label && GTK_WIDGET_MAPPED (page->tab_label) &&
(x >= page->allocation.x) &&
(y >= page->allocation.y) &&
@@ -2790,7 +2790,7 @@ get_drop_position (GtkNotebook *notebook,
page = children->data;
if ((priv->operation != DRAG_OPERATION_REORDER || page != notebook->cur_page) &&
- GTK_WIDGET_VISIBLE (page->child) &&
+ gtk_widget_get_visible (page->child) &&
page->tab_label &&
GTK_WIDGET_MAPPED (page->tab_label) &&
page->pack == pack)
@@ -3988,7 +3988,7 @@ focus_action_in (GtkNotebook *notebook,
GtkNotebookPrivate *priv = GTK_NOTEBOOK_GET_PRIVATE (notebook);
if (priv->action_widget[action] &&
- GTK_WIDGET_VISIBLE (priv->action_widget[action]))
+ gtk_widget_get_visible (priv->action_widget[action]))
return gtk_widget_child_focus (priv->action_widget[action], direction);
else
return FALSE;
@@ -4299,7 +4299,7 @@ page_visible_cb (GtkWidget *page,
if (notebook->cur_page &&
notebook->cur_page->child == page &&
- !GTK_WIDGET_VISIBLE (page))
+ !gtk_widget_get_visible (page))
{
list = g_list_find (notebook->children, notebook->cur_page);
if (list)
@@ -4371,7 +4371,7 @@ gtk_notebook_real_insert_page (GtkNotebook *notebook,
if (tab_label)
{
- if (notebook->show_tabs && GTK_WIDGET_VISIBLE (child))
+ if (notebook->show_tabs && gtk_widget_get_visible (child))
gtk_widget_show (tab_label);
else
gtk_widget_hide (tab_label);
@@ -4640,7 +4640,8 @@ gtk_notebook_real_remove (GtkNotebook *notebook,
g_signal_handler_disconnect (page->child, page->notify_visible_handler);
- if (GTK_WIDGET_VISIBLE (page->child) && GTK_WIDGET_VISIBLE (notebook))
+ if (gtk_widget_get_visible (page->child) &&
+ gtk_widget_get_visible (GTK_WIDGET (notebook)))
need_resize = TRUE;
gtk_widget_unparent (page->child);
@@ -4710,11 +4711,11 @@ gtk_notebook_update_labels (GtkNotebook *notebook)
gtk_label_set_text (GTK_LABEL (page->tab_label), string);
}
- if (GTK_WIDGET_VISIBLE (page->child) &&
- !GTK_WIDGET_VISIBLE (page->tab_label))
+ if (gtk_widget_get_visible (page->child) &&
+ !gtk_widget_get_visible (page->tab_label))
gtk_widget_show (page->tab_label);
- else if (!GTK_WIDGET_VISIBLE (page->child) &&
- GTK_WIDGET_VISIBLE (page->tab_label))
+ else if (!gtk_widget_get_visible (page->child) &&
+ gtk_widget_get_visible (page->tab_label))
gtk_widget_hide (page->tab_label);
}
if (notebook->menu && page->default_menu)
@@ -4788,7 +4789,7 @@ gtk_notebook_search_page (GtkNotebook *notebook,
page = list->data;
if (page->pack == flag &&
(!find_visible ||
- (GTK_WIDGET_VISIBLE (page->child) &&
+ (gtk_widget_get_visible (page->child) &&
(!page->tab_label || NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page)))))
return list;
old_list = list;
@@ -4806,7 +4807,7 @@ gtk_notebook_search_page (GtkNotebook *notebook,
page = list->data;
if (page->pack != flag &&
(!find_visible ||
- (GTK_WIDGET_VISIBLE (page->child) &&
+ (gtk_widget_get_visible (page->child) &&
(!page->tab_label || NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page)))))
return list;
old_list = list;
@@ -4846,7 +4847,7 @@ gtk_notebook_paint (GtkWidget *widget,
tab_pos = get_effective_tab_pos (notebook);
if ((!notebook->show_tabs && !notebook->show_border) ||
- !notebook->cur_page || !GTK_WIDGET_VISIBLE (notebook->cur_page->child))
+ !notebook->cur_page || !gtk_widget_get_visible (notebook->cur_page->child))
return;
x = widget->allocation.x + border_width;
@@ -4932,7 +4933,7 @@ gtk_notebook_paint (GtkWidget *widget,
page = children->data;
children = gtk_notebook_search_page (notebook, children,
step, TRUE);
- if (!GTK_WIDGET_VISIBLE (page->child))
+ if (!gtk_widget_get_visible (page->child))
continue;
if (!GTK_WIDGET_MAPPED (page->tab_label))
showarrow = TRUE;
@@ -5140,7 +5141,7 @@ gtk_notebook_tab_space (GtkNotebook *notebook,
children = children->next;
if (NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page) &&
- GTK_WIDGET_VISIBLE (page->child))
+ gtk_widget_get_visible (page->child))
*tab_space += page->requisition.width;
}
break;
@@ -5168,7 +5169,7 @@ gtk_notebook_tab_space (GtkNotebook *notebook,
children = children->next;
if (NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page) &&
- GTK_WIDGET_VISIBLE (page->child))
+ gtk_widget_get_visible (page->child))
*tab_space += page->requisition.height;
}
break;
@@ -5268,7 +5269,7 @@ gtk_notebook_calculate_shown_tabs (GtkNotebook *notebook,
*remaining_space = tab_space;
if (NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, notebook->cur_page) &&
- GTK_WIDGET_VISIBLE (notebook->cur_page->child))
+ gtk_widget_get_visible (notebook->cur_page->child))
{
gtk_notebook_calc_tabs (notebook,
notebook->focus_tab,
@@ -5295,7 +5296,7 @@ gtk_notebook_calculate_shown_tabs (GtkNotebook *notebook,
/* Is first_tab really predecessor of focus_tab? */
page = notebook->first_tab->data;
if (NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page) &&
- GTK_WIDGET_VISIBLE (page->child))
+ gtk_widget_get_visible (page->child))
for (children = notebook->focus_tab;
children && children != notebook->first_tab;
children = gtk_notebook_search_page (notebook,
@@ -5428,7 +5429,7 @@ gtk_notebook_calculate_shown_tabs (GtkNotebook *notebook,
children = children->next;
if (!NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page) ||
- !GTK_WIDGET_VISIBLE (page->child))
+ !gtk_widget_get_visible (page->child))
continue;
c++;
@@ -5554,7 +5555,7 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook *notebook,
{
*children = (*children)->next;
- if (page->pack != GTK_PACK_END || !GTK_WIDGET_VISIBLE (page->child))
+ if (page->pack != GTK_PACK_END || !gtk_widget_get_visible (page->child))
continue;
}
@@ -5867,7 +5868,7 @@ gtk_notebook_page_allocate (GtkNotebook *notebook,
gboolean was_visible = page->tab_allocated_visible;
if (!page->tab_label ||
- !GTK_WIDGET_VISIBLE (page->tab_label) ||
+ !gtk_widget_get_visible (page->tab_label) ||
!gtk_widget_get_child_visible (page->tab_label))
{
page->tab_allocated_visible = FALSE;
@@ -5988,7 +5989,7 @@ gtk_notebook_calc_tabs (GtkNotebook *notebook,
{
page = children->data;
if (NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page) &&
- GTK_WIDGET_VISIBLE (page->child))
+ gtk_widget_get_visible (page->child))
{
if (page->pack == pack)
{
@@ -6024,7 +6025,7 @@ gtk_notebook_calc_tabs (GtkNotebook *notebook,
{
page = children->data;
if (NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page) &&
- GTK_WIDGET_VISIBLE (page->child))
+ gtk_widget_get_visible (page->child))
{
if (page->pack == pack)
{
@@ -6093,7 +6094,7 @@ gtk_notebook_real_switch_page (GtkNotebook *notebook,
{
gboolean child_has_focus;
- if (notebook->cur_page == page || !GTK_WIDGET_VISIBLE (page->child))
+ if (notebook->cur_page == page || !gtk_widget_get_visible (page->child))
return;
/* save the value here, changing visibility changes focus */
@@ -6280,7 +6281,7 @@ gtk_notebook_menu_item_create (GtkNotebook *notebook,
gtk_notebook_real_page_position (notebook, list));
g_signal_connect (menu_item, "activate",
G_CALLBACK (gtk_notebook_menu_switch_page), page);
- if (GTK_WIDGET_VISIBLE (page->child))
+ if (gtk_widget_get_visible (page->child))
gtk_widget_show (menu_item);
}
@@ -6331,7 +6332,8 @@ gtk_notebook_set_tab_border_internal (GtkNotebook *notebook,
notebook->tab_hborder = border_width;
notebook->tab_vborder = border_width;
- if (GTK_WIDGET_VISIBLE (notebook) && notebook->show_tabs)
+ if (notebook->show_tabs &&
+ gtk_widget_get_visible (GTK_WIDGET (notebook)))
gtk_widget_queue_resize (GTK_WIDGET (notebook));
g_object_freeze_notify (G_OBJECT (notebook));
@@ -6349,7 +6351,8 @@ gtk_notebook_set_tab_hborder_internal (GtkNotebook *notebook,
notebook->tab_hborder = tab_hborder;
- if (GTK_WIDGET_VISIBLE (notebook) && notebook->show_tabs)
+ if (notebook->show_tabs &&
+ gtk_widget_get_visible (GTK_WIDGET (notebook)))
gtk_widget_queue_resize (GTK_WIDGET (notebook));
g_object_notify (G_OBJECT (notebook), "tab-hborder");
@@ -6364,7 +6367,8 @@ gtk_notebook_set_tab_vborder_internal (GtkNotebook *notebook,
notebook->tab_vborder = tab_vborder;
- if (GTK_WIDGET_VISIBLE (notebook) && notebook->show_tabs)
+ if (notebook->show_tabs &&
+ gtk_widget_get_visible (GTK_WIDGET (notebook)))
gtk_widget_queue_resize (GTK_WIDGET (notebook));
g_object_notify (G_OBJECT (notebook), "tab-vborder");
@@ -6846,7 +6850,7 @@ gtk_notebook_set_show_border (GtkNotebook *notebook,
{
notebook->show_border = show_border;
- if (GTK_WIDGET_VISIBLE (notebook))
+ if (gtk_widget_get_visible (GTK_WIDGET (notebook)))
gtk_widget_queue_resize (GTK_WIDGET (notebook));
g_object_notify (G_OBJECT (notebook), "show-border");
@@ -6966,7 +6970,7 @@ gtk_notebook_set_tab_pos (GtkNotebook *notebook,
if (notebook->tab_pos != pos)
{
notebook->tab_pos = pos;
- if (GTK_WIDGET_VISIBLE (notebook))
+ if (gtk_widget_get_visible (GTK_WIDGET (notebook)))
gtk_widget_queue_resize (GTK_WIDGET (notebook));
}
@@ -7077,7 +7081,7 @@ gtk_notebook_set_scrollable (GtkNotebook *notebook,
{
notebook->scrollable = scrollable;
- if (GTK_WIDGET_VISIBLE (notebook))
+ if (gtk_widget_get_visible (GTK_WIDGET (notebook)))
gtk_widget_queue_resize (GTK_WIDGET (notebook));
g_object_notify (G_OBJECT (notebook), "scrollable");
@@ -7271,7 +7275,7 @@ gtk_notebook_set_tab_label (GtkNotebook *notebook,
G_CALLBACK (gtk_notebook_mnemonic_activate_switch_page),
notebook);
- if (notebook->show_tabs && GTK_WIDGET_VISIBLE (child))
+ if (notebook->show_tabs && gtk_widget_get_visible (child))
{
gtk_widget_show (page->tab_label);
gtk_widget_queue_resize (GTK_WIDGET (notebook));
diff --git a/gtk/gtkoffscreenwindow.c b/gtk/gtkoffscreenwindow.c
index 840995e..56cce55 100644
--- a/gtk/gtkoffscreenwindow.c
+++ b/gtk/gtkoffscreenwindow.c
@@ -63,7 +63,7 @@ gtk_offscreen_window_size_request (GtkWidget *widget,
requisition->width = border_width * 2;
requisition->height = border_width * 2;
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
GtkRequisition child_req;
@@ -100,7 +100,7 @@ gtk_offscreen_window_size_allocate (GtkWidget *widget,
allocation->width,
allocation->height);
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
GtkAllocation child_alloc;
@@ -210,7 +210,7 @@ gtk_offscreen_window_check_resize (GtkContainer *container)
{
GtkWidget *widget = GTK_WIDGET (container);
- if (GTK_WIDGET_VISIBLE (widget))
+ if (gtk_widget_get_visible (widget))
gtk_offscreen_window_resize (widget);
}
diff --git a/gtk/gtkoptionmenu.c b/gtk/gtkoptionmenu.c
index 4b077a6..9da3fe0 100644
--- a/gtk/gtkoptionmenu.c
+++ b/gtk/gtkoptionmenu.c
@@ -420,7 +420,7 @@ gtk_option_menu_size_request (GtkWidget *widget,
gtk_option_menu_get_props (option_menu, &props);
- if (GTK_BIN (option_menu)->child && GTK_WIDGET_VISIBLE (GTK_BIN (option_menu)->child))
+ if (GTK_BIN (option_menu)->child && gtk_widget_get_visible (GTK_BIN (option_menu)->child))
{
gtk_widget_size_request (GTK_BIN (option_menu)->child, &child_requisition);
@@ -464,7 +464,7 @@ gtk_option_menu_size_allocate (GtkWidget *widget,
allocation->width - border_width * 2, allocation->height - border_width * 2);
child = GTK_BIN (widget)->child;
- if (child && GTK_WIDGET_VISIBLE (child))
+ if (child && gtk_widget_get_visible (child))
{
gint xthickness = GTK_WIDGET (widget)->style->xthickness;
gint ythickness = GTK_WIDGET (widget)->style->ythickness;
@@ -846,7 +846,7 @@ gtk_option_menu_calc_size (GtkOptionMenu *option_menu)
child = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (child))
+ if (gtk_widget_get_visible (child))
{
GtkWidget *inner = GTK_BIN (child)->child;
@@ -915,7 +915,7 @@ gtk_option_menu_position (GtkMenu *menu,
if (active == child)
break;
- if (GTK_WIDGET_VISIBLE (child))
+ if (gtk_widget_get_visible (child))
{
gtk_widget_get_child_requisition (child, &requisition);
menu_ypos -= requisition.height;
@@ -1014,7 +1014,8 @@ gtk_option_menu_scroll_event (GtkWidget *widget,
l = g_list_nth (GTK_MENU_SHELL (option_menu->menu)->children, index);
item = GTK_MENU_ITEM (l->data);
- if (GTK_WIDGET_VISIBLE (item) && gtk_widget_is_sensitive (GTK_WIDGET (item)))
+ if (gtk_widget_get_visible (GTK_WIDGET (item)) &&
+ gtk_widget_is_sensitive (GTK_WIDGET (item)))
{
gtk_option_menu_set_history (option_menu, index);
gtk_menu_item_activate (GTK_MENU_ITEM (item));
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index 328f0ab..7beb737 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -762,7 +762,7 @@ gtk_paned_size_request (GtkWidget *widget,
requisition->width = 0;
requisition->height = 0;
- if (paned->child1 && GTK_WIDGET_VISIBLE (paned->child1))
+ if (paned->child1 && gtk_widget_get_visible (paned->child1))
{
gtk_widget_size_request (paned->child1, &child_requisition);
@@ -770,7 +770,7 @@ gtk_paned_size_request (GtkWidget *widget,
requisition->width = child_requisition.width;
}
- if (paned->child2 && GTK_WIDGET_VISIBLE (paned->child2))
+ if (paned->child2 && gtk_widget_get_visible (paned->child2))
{
gtk_widget_size_request (paned->child2, &child_requisition);
@@ -791,8 +791,8 @@ gtk_paned_size_request (GtkWidget *widget,
requisition->width += GTK_CONTAINER (paned)->border_width * 2;
requisition->height += GTK_CONTAINER (paned)->border_width * 2;
- if (paned->child1 && GTK_WIDGET_VISIBLE (paned->child1) &&
- paned->child2 && GTK_WIDGET_VISIBLE (paned->child2))
+ if (paned->child1 && gtk_widget_get_visible (paned->child1) &&
+ paned->child2 && gtk_widget_get_visible (paned->child2))
{
gint handle_size;
@@ -824,8 +824,8 @@ gtk_paned_size_allocate (GtkWidget *widget,
widget->allocation = *allocation;
- if (paned->child1 && GTK_WIDGET_VISIBLE (paned->child1) &&
- paned->child2 && GTK_WIDGET_VISIBLE (paned->child2))
+ if (paned->child1 && gtk_widget_get_visible (paned->child1) &&
+ paned->child2 && gtk_widget_get_visible (paned->child2))
{
GtkRequisition child1_requisition;
GtkRequisition child2_requisition;
@@ -963,9 +963,9 @@ gtk_paned_size_allocate (GtkWidget *widget,
child_allocation.width = MAX (1, allocation->width - 2 * border_width);
child_allocation.height = MAX (1, allocation->height - 2 * border_width);
- if (paned->child1 && GTK_WIDGET_VISIBLE (paned->child1))
+ if (paned->child1 && gtk_widget_get_visible (paned->child1))
gtk_widget_size_allocate (paned->child1, &child_allocation);
- else if (paned->child2 && GTK_WIDGET_VISIBLE (paned->child2))
+ else if (paned->child2 && gtk_widget_get_visible (paned->child2))
gtk_widget_size_allocate (paned->child2, &child_allocation);
}
}
@@ -1012,8 +1012,8 @@ gtk_paned_realize (GtkWidget *widget)
widget->style = gtk_style_attach (widget->style, widget->window);
- if (paned->child1 && GTK_WIDGET_VISIBLE (paned->child1) &&
- paned->child2 && GTK_WIDGET_VISIBLE (paned->child2))
+ if (paned->child1 && gtk_widget_get_visible (paned->child1) &&
+ paned->child2 && gtk_widget_get_visible (paned->child2))
gdk_window_show (paned->handle);
}
@@ -1069,9 +1069,9 @@ gtk_paned_expose (GtkWidget *widget,
{
GtkPaned *paned = GTK_PANED (widget);
- if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_MAPPED (widget) &&
- paned->child1 && GTK_WIDGET_VISIBLE (paned->child1) &&
- paned->child2 && GTK_WIDGET_VISIBLE (paned->child2))
+ if (gtk_widget_get_visible (widget) && GTK_WIDGET_MAPPED (widget) &&
+ paned->child1 && gtk_widget_get_visible (paned->child1) &&
+ paned->child2 && gtk_widget_get_visible (paned->child2))
{
GtkStateType state;
@@ -1423,7 +1423,7 @@ gtk_paned_remove (GtkContainer *container,
gboolean was_visible;
paned = GTK_PANED (container);
- was_visible = GTK_WIDGET_VISIBLE (widget);
+ was_visible = gtk_widget_get_visible (widget);
if (paned->child1 == widget)
{
@@ -1431,7 +1431,7 @@ gtk_paned_remove (GtkContainer *container,
paned->child1 = NULL;
- if (was_visible && GTK_WIDGET_VISIBLE (container))
+ if (was_visible && gtk_widget_get_visible (GTK_WIDGET (container)))
gtk_widget_queue_resize_no_redraw (GTK_WIDGET (container));
}
else if (paned->child2 == widget)
@@ -1440,7 +1440,7 @@ gtk_paned_remove (GtkContainer *container,
paned->child2 = NULL;
- if (was_visible && GTK_WIDGET_VISIBLE (container))
+ if (was_visible && gtk_widget_get_visible (GTK_WIDGET (container)))
gtk_widget_queue_resize_no_redraw (GTK_WIDGET (container));
}
}
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index b86a8f4..81d06c6 100644
--- a/gtk/gtkpathbar.c
+++ b/gtk/gtkpathbar.c
@@ -714,7 +714,7 @@ static void
gtk_path_bar_remove_1 (GtkContainer *container,
GtkWidget *widget)
{
- gboolean was_visible = GTK_WIDGET_VISIBLE (widget);
+ gboolean was_visible = gtk_widget_get_visible (widget);
gtk_widget_unparent (widget);
if (was_visible)
gtk_widget_queue_resize (GTK_WIDGET (container));
diff --git a/gtk/gtkpixmap.c b/gtk/gtkpixmap.c
index 60e4bd0..3f1a586 100644
--- a/gtk/gtkpixmap.c
+++ b/gtk/gtkpixmap.c
@@ -135,7 +135,7 @@ gtk_pixmap_set (GtkPixmap *pixmap,
GTK_WIDGET (pixmap)->requisition.width = 0;
GTK_WIDGET (pixmap)->requisition.height = 0;
}
- if (GTK_WIDGET_VISIBLE (pixmap))
+ if (gtk_widget_get_visible (GTK_WIDGET (pixmap)))
{
if ((GTK_WIDGET (pixmap)->requisition.width != oldwidth) ||
(GTK_WIDGET (pixmap)->requisition.height != oldheight))
@@ -235,7 +235,7 @@ gtk_pixmap_set_build_insensitive (GtkPixmap *pixmap, gboolean build)
pixmap->build_insensitive = build;
- if (GTK_WIDGET_VISIBLE (pixmap))
+ if (gtk_widget_get_visible (GTK_WIDGET (pixmap)))
{
gtk_widget_queue_draw (GTK_WIDGET (pixmap));
}
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
index b41d385..34fa4cb 100644
--- a/gtk/gtkplug.c
+++ b/gtk/gtkplug.c
@@ -392,7 +392,7 @@ _gtk_plug_remove_from_socket (GtkPlug *plug,
g_object_ref (plug);
g_object_ref (socket_);
- widget_was_visible = GTK_WIDGET_VISIBLE (plug);
+ widget_was_visible = gtk_widget_get_visible (widget);
gdk_window_hide (widget->window);
GTK_PRIVATE_SET_FLAG (plug, GTK_IN_REPARENT);
@@ -428,7 +428,7 @@ _gtk_plug_remove_from_socket (GtkPlug *plug,
g_object_unref (plug);
- if (widget_was_visible && GTK_WIDGET_VISIBLE (socket_))
+ if (widget_was_visible && gtk_widget_get_visible (GTK_WIDGET (socket_)))
gtk_widget_queue_resize (GTK_WIDGET (socket_));
g_object_unref (socket_);
@@ -690,7 +690,7 @@ gtk_plug_map (GtkWidget *widget)
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
if (bin->child &&
- GTK_WIDGET_VISIBLE (bin->child) &&
+ gtk_widget_get_visible (bin->child) &&
!GTK_WIDGET_MAPPED (bin->child))
gtk_widget_map (bin->child);
@@ -742,7 +742,7 @@ gtk_plug_size_allocate (GtkWidget *widget,
allocation->x, allocation->y,
allocation->width, allocation->height);
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
GtkAllocation child_allocation;
diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c
index 2fcba3b..11e3c86 100644
--- a/gtk/gtkradiobutton.c
+++ b/gtk/gtkradiobutton.c
@@ -705,7 +705,7 @@ gtk_radio_button_draw_indicator (GtkCheckButton *check_button,
y = widget->allocation.y + (widget->allocation.height - indicator_size) / 2;
child = GTK_BIN (check_button)->child;
- if (!interior_focus || !(child && GTK_WIDGET_VISIBLE (child)))
+ if (!interior_focus || !(child && gtk_widget_get_visible (child)))
x += focus_width + focus_pad;
if (toggle_button->inconsistent)
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
index 70fd429..02222a0 100644
--- a/gtk/gtkscale.c
+++ b/gtk/gtkscale.c
@@ -654,15 +654,18 @@ void
gtk_scale_set_value_pos (GtkScale *scale,
GtkPositionType pos)
{
+ GtkWidget *widget;
+
g_return_if_fail (GTK_IS_SCALE (scale));
if (scale->value_pos != pos)
{
scale->value_pos = pos;
+ widget = GTK_WIDGET (scale);
_gtk_scale_clear_layout (scale);
- if (GTK_WIDGET_VISIBLE (scale) && GTK_WIDGET_MAPPED (scale))
- gtk_widget_queue_resize (GTK_WIDGET (scale));
+ if (gtk_widget_get_visible (widget) && GTK_WIDGET_MAPPED (widget))
+ gtk_widget_queue_resize (widget);
g_object_notify (G_OBJECT (scale), "value-pos");
}
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 8006fb6..67274e7 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -1259,7 +1259,7 @@ gtk_scrolled_window_size_request (GtkWidget *widget,
gtk_widget_size_request (scrolled_window->vscrollbar,
&vscrollbar_requisition);
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
gtk_widget_size_request (bin->child, &child_requisition);
@@ -1415,7 +1415,7 @@ gtk_scrolled_window_size_allocate (GtkWidget *widget,
else if (scrolled_window->vscrollbar_policy == GTK_POLICY_NEVER)
scrolled_window->vscrollbar_visible = FALSE;
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
gboolean previous_hvis;
gboolean previous_vvis;
@@ -1469,7 +1469,7 @@ gtk_scrolled_window_size_allocate (GtkWidget *widget,
gtk_widget_get_child_requisition (scrolled_window->hscrollbar,
&hscrollbar_requisition);
- if (!GTK_WIDGET_VISIBLE (scrolled_window->hscrollbar))
+ if (!gtk_widget_get_visible (scrolled_window->hscrollbar))
gtk_widget_show (scrolled_window->hscrollbar);
child_allocation.x = relative_allocation.x;
@@ -1508,13 +1508,13 @@ gtk_scrolled_window_size_allocate (GtkWidget *widget,
gtk_widget_size_allocate (scrolled_window->hscrollbar, &child_allocation);
}
- else if (GTK_WIDGET_VISIBLE (scrolled_window->hscrollbar))
+ else if (gtk_widget_get_visible (scrolled_window->hscrollbar))
gtk_widget_hide (scrolled_window->hscrollbar);
if (scrolled_window->vscrollbar_visible)
{
GtkRequisition vscrollbar_requisition;
- if (!GTK_WIDGET_VISIBLE (scrolled_window->vscrollbar))
+ if (!gtk_widget_get_visible (scrolled_window->vscrollbar))
gtk_widget_show (scrolled_window->vscrollbar);
gtk_widget_get_child_requisition (scrolled_window->vscrollbar,
@@ -1560,7 +1560,7 @@ gtk_scrolled_window_size_allocate (GtkWidget *widget,
gtk_widget_size_allocate (scrolled_window->vscrollbar, &child_allocation);
}
- else if (GTK_WIDGET_VISIBLE (scrolled_window->vscrollbar))
+ else if (gtk_widget_get_visible (scrolled_window->vscrollbar))
gtk_widget_hide (scrolled_window->vscrollbar);
}
@@ -1578,7 +1578,7 @@ gtk_scrolled_window_scroll_event (GtkWidget *widget,
else
range = GTK_SCROLLED_WINDOW (widget)->hscrollbar;
- if (range && GTK_WIDGET_VISIBLE (range))
+ if (range && gtk_widget_get_visible (range))
{
GtkAdjustment *adj = GTK_RANGE (range)->adjustment;
gdouble delta, new_value;
diff --git a/gtk/gtkstatusbar.c b/gtk/gtkstatusbar.c
index 125efef..04212be 100644
--- a/gtk/gtkstatusbar.c
+++ b/gtk/gtkstatusbar.c
@@ -894,7 +894,7 @@ has_extra_children (GtkStatusbar *statusbar)
{
child = l->data;
- if (!GTK_WIDGET_VISIBLE (child->widget))
+ if (!gtk_widget_get_visible (child->widget))
continue;
if (frame->pack == GTK_PACK_START || child->pack == GTK_PACK_END)
diff --git a/gtk/gtktable.c b/gtk/gtktable.c
index a5d4b95..4c3b7b5 100644
--- a/gtk/gtktable.c
+++ b/gtk/gtktable.c
@@ -372,7 +372,8 @@ gtk_table_set_child_property (GtkContainer *container,
GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
break;
}
- if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (table))
+ if (gtk_widget_get_visible (child) &&
+ gtk_widget_get_visible (GTK_WIDGET (table)))
gtk_widget_queue_resize (child);
}
@@ -626,7 +627,7 @@ gtk_table_set_row_spacing (GtkTable *table,
{
table->rows[row].spacing = spacing;
- if (GTK_WIDGET_VISIBLE (table))
+ if (gtk_widget_get_visible (GTK_WIDGET (table)))
gtk_widget_queue_resize (GTK_WIDGET (table));
}
}
@@ -663,7 +664,7 @@ gtk_table_set_col_spacing (GtkTable *table,
{
table->cols[column].spacing = spacing;
- if (GTK_WIDGET_VISIBLE (table))
+ if (gtk_widget_get_visible (GTK_WIDGET (table)))
gtk_widget_queue_resize (GTK_WIDGET (table));
}
}
@@ -700,7 +701,7 @@ gtk_table_set_row_spacings (GtkTable *table,
for (row = 0; row < table->nrows; row++)
table->rows[row].spacing = spacing;
- if (GTK_WIDGET_VISIBLE (table))
+ if (gtk_widget_get_visible (GTK_WIDGET (table)))
gtk_widget_queue_resize (GTK_WIDGET (table));
g_object_notify (G_OBJECT (table), "row-spacing");
@@ -736,7 +737,7 @@ gtk_table_set_col_spacings (GtkTable *table,
for (col = 0; col < table->ncols; col++)
table->cols[col].spacing = spacing;
- if (GTK_WIDGET_VISIBLE (table))
+ if (gtk_widget_get_visible (GTK_WIDGET (table)))
gtk_widget_queue_resize (GTK_WIDGET (table));
g_object_notify (G_OBJECT (table), "column-spacing");
@@ -771,7 +772,7 @@ gtk_table_set_homogeneous (GtkTable *table,
{
table->homogeneous = homogeneous;
- if (GTK_WIDGET_VISIBLE (table))
+ if (gtk_widget_get_visible (GTK_WIDGET (table)))
gtk_widget_queue_resize (GTK_WIDGET (table));
g_object_notify (G_OBJECT (table), "homogeneous");
@@ -862,6 +863,7 @@ gtk_table_remove (GtkContainer *container,
{
GtkTable *table = GTK_TABLE (container);
GtkTableChild *child;
+ GtkWidget *widget_container = GTK_WIDGET (container);
GList *children;
children = table->children;
@@ -873,15 +875,15 @@ gtk_table_remove (GtkContainer *container,
if (child->widget == widget)
{
- gboolean was_visible = GTK_WIDGET_VISIBLE (widget);
+ gboolean was_visible = gtk_widget_get_visible (widget);
gtk_widget_unparent (widget);
table->children = g_list_remove (table->children, child);
g_free (child);
- if (was_visible && GTK_WIDGET_VISIBLE (container))
- gtk_widget_queue_resize (GTK_WIDGET (container));
+ if (was_visible && gtk_widget_get_visible (widget_container))
+ gtk_widget_queue_resize (widget_container);
break;
}
}
@@ -932,7 +934,7 @@ gtk_table_size_request_init (GtkTable *table)
child = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (child->widget))
+ if (gtk_widget_get_visible (child->widget))
gtk_widget_size_request (child->widget, NULL);
if (child->left_attach == (child->right_attach - 1) && child->xexpand)
@@ -957,7 +959,7 @@ gtk_table_size_request_pass1 (GtkTable *table)
child = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (child->widget))
+ if (gtk_widget_get_visible (child->widget))
{
GtkRequisition child_requisition;
gtk_widget_get_child_requisition (child->widget, &child_requisition);
@@ -1020,7 +1022,7 @@ gtk_table_size_request_pass3 (GtkTable *table)
child = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (child->widget))
+ if (gtk_widget_get_visible (child->widget))
{
/* Child spans multiple columns.
*/
@@ -1173,7 +1175,7 @@ gtk_table_size_allocate_init (GtkTable *table)
child = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (child->widget))
+ if (gtk_widget_get_visible (child->widget))
{
if (child->left_attach == (child->right_attach - 1))
{
@@ -1208,7 +1210,7 @@ gtk_table_size_allocate_init (GtkTable *table)
child = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (child->widget))
+ if (gtk_widget_get_visible (child->widget))
{
if (child->left_attach != (child->right_attach - 1))
{
@@ -1545,7 +1547,7 @@ gtk_table_size_allocate_pass2 (GtkTable *table)
child = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (child->widget))
+ if (gtk_widget_get_visible (child->widget))
{
GtkRequisition child_requisition;
gtk_widget_get_child_requisition (child->widget, &child_requisition);
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 1e79bd1..589e8af 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -1501,7 +1501,7 @@ gtk_text_view_set_buffer (GtkTextView *text_view,
g_object_notify (G_OBJECT (text_view), "buffer");
- if (GTK_WIDGET_VISIBLE (text_view))
+ if (gtk_widget_get_visible (GTK_WIDGET (text_view)))
gtk_widget_queue_draw (GTK_WIDGET (text_view));
DV(g_print ("Invalidating due to set_buffer\n"));
@@ -7124,7 +7124,7 @@ adjust_allocation_recurse (GtkWidget *widget,
*/
if (!GTK_WIDGET_REALIZED (widget))
{
- if (GTK_WIDGET_VISIBLE (widget))
+ if (gtk_widget_get_visible (widget))
{
GdkRectangle tmp_rectangle = widget->allocation;
tmp_rectangle.x += scroll_data->dx;
@@ -9025,7 +9025,8 @@ gtk_text_view_move_child (GtkTextView *text_view,
vc->x = xpos;
vc->y = ypos;
- if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (text_view))
+ if (gtk_widget_get_visible (child) &&
+ gtk_widget_get_visible (GTK_WIDGET (text_view)))
gtk_widget_queue_resize (child);
}
diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c
index 4350d82..35c0f10 100644
--- a/gtk/gtktogglebutton.c
+++ b/gtk/gtktogglebutton.c
@@ -310,7 +310,7 @@ gtk_toggle_button_set_mode (GtkToggleButton *toggle_button,
toggle_button->draw_indicator = draw_indicator;
GTK_BUTTON (toggle_button)->depress_on_activate = !draw_indicator;
- if (GTK_WIDGET_VISIBLE (toggle_button))
+ if (gtk_widget_get_visible (GTK_WIDGET (toggle_button)))
gtk_widget_queue_resize (GTK_WIDGET (toggle_button));
g_object_notify (G_OBJECT (toggle_button), "draw-indicator");
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index 229a5d9..44f6ad1 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -1802,7 +1802,7 @@ gtk_toolbar_size_allocate (GtkWidget *widget,
{
gtk_widget_hide (GTK_WIDGET (priv->arrow_button));
- if (priv->menu && GTK_WIDGET_VISIBLE (priv->menu))
+ if (priv->menu && gtk_widget_get_visible (GTK_WIDGET (priv->menu)))
gtk_menu_shell_deactivate (GTK_MENU_SHELL (priv->menu));
}
@@ -2673,7 +2673,7 @@ gtk_toolbar_arrow_button_clicked (GtkWidget *button,
GtkToolbarPrivate *priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->arrow_button)) &&
- (!priv->menu || !GTK_WIDGET_VISIBLE (priv->menu)))
+ (!priv->menu || !gtk_widget_get_visible (GTK_WIDGET (priv->menu))))
{
/* We only get here when the button is clicked with the keyboard,
* because mouse button presses result in the menu being shown so
@@ -4117,7 +4117,7 @@ toolbar_content_visible (ToolbarContent *content,
case TOOL_ITEM:
item = content->u.tool_item.item;
- if (!GTK_WIDGET_VISIBLE (item))
+ if (!gtk_widget_get_visible (GTK_WIDGET (item)))
return FALSE;
if (toolbar->orientation == GTK_ORIENTATION_HORIZONTAL &&
@@ -4133,7 +4133,7 @@ toolbar_content_visible (ToolbarContent *content,
case COMPATIBILITY:
if (content->u.compatibility.child.type != GTK_TOOLBAR_CHILD_SPACE)
- return GTK_WIDGET_VISIBLE (content->u.compatibility.child.widget);
+ return gtk_widget_get_visible (content->u.compatibility.child.widget);
else
return TRUE;
break;
diff --git a/gtk/gtktoolitem.c b/gtk/gtktoolitem.c
index eb4d800..9b62ced 100644
--- a/gtk/gtktoolitem.c
+++ b/gtk/gtktoolitem.c
@@ -524,7 +524,7 @@ gtk_tool_item_size_request (GtkWidget *widget,
{
GtkWidget *child = GTK_BIN (widget)->child;
- if (child && GTK_WIDGET_VISIBLE (child))
+ if (child && gtk_widget_get_visible (child))
{
gtk_widget_size_request (child, requisition);
}
@@ -557,7 +557,7 @@ gtk_tool_item_size_allocate (GtkWidget *widget,
widget->allocation.width - border_width * 2,
widget->allocation.height - border_width * 2);
- if (child && GTK_WIDGET_VISIBLE (child))
+ if (child && gtk_widget_get_visible (child))
{
child_allocation.x = allocation->x + border_width;
child_allocation.y = allocation->y + border_width;
diff --git a/gtk/gtktoolitemgroup.c b/gtk/gtktoolitemgroup.c
index d891008..2c644f0 100644
--- a/gtk/gtktoolitemgroup.c
+++ b/gtk/gtktoolitemgroup.c
@@ -589,7 +589,7 @@ gtk_tool_item_group_is_item_visible (GtkToolItemGroup *group,
return FALSE;
return
- (GTK_WIDGET_VISIBLE (child->item)) &&
+ (gtk_widget_get_visible (GTK_WIDGET (child->item))) &&
(GTK_ORIENTATION_VERTICAL == orientation ?
gtk_tool_item_get_visible_vertical (child->item) :
gtk_tool_item_get_visible_horizontal (child->item));
@@ -819,7 +819,7 @@ gtk_tool_item_group_real_size_query (GtkWidget *widget,
inquery->height = 0;
/* figure out header widget size */
- if (GTK_WIDGET_VISIBLE (priv->header))
+ if (gtk_widget_get_visible (priv->header))
{
GtkRequisition child_requisition;
@@ -869,7 +869,7 @@ gtk_tool_item_group_real_size_allocate (GtkWidget *widget,
child_allocation.y = border_width;
/* place the header widget */
- if (GTK_WIDGET_VISIBLE (priv->header))
+ if (gtk_widget_get_visible (priv->header))
{
gtk_widget_size_request (priv->header, &child_requisition);
@@ -1390,7 +1390,9 @@ gtk_tool_item_group_set_item_packing (GtkToolItemGroup *group,
gtk_widget_thaw_child_notify (GTK_WIDGET (item));
- if (changed && GTK_WIDGET_VISIBLE (group) && GTK_WIDGET_VISIBLE (item))
+ if (changed
+ && gtk_widget_get_visible (GTK_WIDGET (group))
+ && gtk_widget_get_visible (GTK_WIDGET (item)))
gtk_widget_queue_resize (GTK_WIDGET (group));
}
@@ -1707,7 +1709,7 @@ gtk_tool_item_group_set_label_widget (GtkToolItemGroup *group,
priv->label_widget = label_widget;
- if (GTK_WIDGET_VISIBLE (group))
+ if (gtk_widget_get_visible (GTK_WIDGET (group)))
gtk_widget_queue_resize (GTK_WIDGET (group));
/* Only show the header widget if the group has children: */
@@ -1782,7 +1784,7 @@ gtk_tool_item_group_force_expose (GtkToolItemGroup *group)
gtk_widget_translate_coordinates (widget, parent, 0, 0, &x, &y);
- if (GTK_WIDGET_VISIBLE (priv->header))
+ if (gtk_widget_get_visible (priv->header))
{
height -= priv->header->allocation.height;
y += priv->header->allocation.height;
@@ -2097,7 +2099,8 @@ gtk_tool_item_group_set_item_position (GtkToolItemGroup *group,
priv->children = g_list_insert (priv->children, child, position);
gtk_widget_child_notify (GTK_WIDGET (item), "position");
- if (GTK_WIDGET_VISIBLE (group) && GTK_WIDGET_VISIBLE (item))
+ if (gtk_widget_get_visible (GTK_WIDGET (group)) &&
+ gtk_widget_get_visible (GTK_WIDGET (item)))
gtk_widget_queue_resize (GTK_WIDGET (group));
}
@@ -2292,7 +2295,7 @@ _gtk_tool_item_group_paint (GtkToolItemGroup *group,
v0 = v1 - 256;
- if (!GTK_WIDGET_VISIBLE (priv->header))
+ if (!gtk_widget_get_visible (priv->header))
v0 = MAX (v0, 0);
else if (GTK_ORIENTATION_VERTICAL == orientation)
v0 = MAX (v0, priv->header->allocation.height);
diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c
index c94226c..87871e8 100644
--- a/gtk/gtktooltip.c
+++ b/gtk/gtktooltip.c
@@ -79,7 +79,7 @@ struct _GtkTooltipClass
GObjectClass parent_class;
};
-#define GTK_TOOLTIP_VISIBLE(tooltip) ((tooltip)->current_window && GTK_WIDGET_VISIBLE ((tooltip)->current_window))
+#define GTK_TOOLTIP_VISIBLE(tooltip) ((tooltip)->current_window && gtk_widget_get_visible (GTK_WIDGET((tooltip)->current_window)))
static void gtk_tooltip_class_init (GtkTooltipClass *klass);
diff --git a/gtk/gtktree.c b/gtk/gtktree.c
index 625d04e..d1d4ee8 100644
--- a/gtk/gtktree.c
+++ b/gtk/gtktree.c
@@ -521,7 +521,7 @@ gtk_tree_map (GtkWidget *widget)
child = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (child) &&
+ if (gtk_widget_get_visible (child) &&
!GTK_WIDGET_MAPPED (child))
gtk_widget_map (child);
@@ -529,7 +529,7 @@ gtk_tree_map (GtkWidget *widget)
{
child = GTK_WIDGET (GTK_TREE_ITEM (child)->subtree);
- if (GTK_WIDGET_VISIBLE (child) && !GTK_WIDGET_MAPPED (child))
+ if (gtk_widget_get_visible (child) && !GTK_WIDGET_MAPPED (child))
gtk_widget_map (child);
}
}
@@ -800,7 +800,7 @@ gtk_tree_remove_items (GtkTree *tree,
gtk_tree_select_child (root_tree, widget);
}
- if (GTK_WIDGET_VISIBLE (root_tree))
+ if (gtk_widget_get_visible (GTK_WIDGET (root_tree)))
{
#ifdef TREE_DEBUG
g_message("* query queue resizing for root_tree\n");
@@ -867,7 +867,7 @@ gtk_tree_size_allocate (GtkWidget *widget,
child = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (child))
+ if (gtk_widget_get_visible (child))
{
GtkRequisition child_requisition;
gtk_widget_get_child_requisition (child, &child_requisition);
@@ -879,7 +879,7 @@ gtk_tree_size_allocate (GtkWidget *widget,
child_allocation.y += child_allocation.height;
if((subtree = GTK_TREE_ITEM(child)->subtree))
- if(GTK_WIDGET_VISIBLE (subtree))
+ if(gtk_widget_get_visible (subtree))
{
child_allocation.height = subtree->requisition.height;
gtk_widget_size_allocate (subtree, &child_allocation);
@@ -914,7 +914,7 @@ gtk_tree_size_request (GtkWidget *widget,
child = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (child))
+ if (gtk_widget_get_visible (child))
{
gtk_widget_size_request (child, &child_requisition);
@@ -922,7 +922,7 @@ gtk_tree_size_request (GtkWidget *widget,
requisition->height += child_requisition.height;
if((subtree = GTK_TREE_ITEM(child)->subtree) &&
- GTK_WIDGET_VISIBLE (subtree))
+ gtk_widget_get_visible (subtree))
{
gtk_widget_size_request (subtree, &child_requisition);
diff --git a/gtk/gtktreeitem.c b/gtk/gtktreeitem.c
index 5488872..801b237 100644
--- a/gtk/gtktreeitem.c
+++ b/gtk/gtktreeitem.c
@@ -204,7 +204,7 @@ gtk_tree_item_subtree_button_changed_state (GtkWidget *widget)
{
g_return_if_fail (GTK_IS_EVENT_BOX (widget));
- if (GTK_WIDGET_VISIBLE (widget))
+ if (gtk_widget_get_visible (widget))
{
if (widget->state == GTK_STATE_NORMAL)
@@ -462,7 +462,7 @@ gtk_tree_item_size_request (GtkWidget *widget,
widget->style->xthickness) * 2;
requisition->height = GTK_CONTAINER (widget)->border_width * 2;
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
GtkRequisition pix_requisition;
@@ -640,7 +640,7 @@ gtk_tree_item_paint (GtkWidget *widget,
gtk_tree_item_draw_lines(widget);
if (tree_item->pixmaps_box &&
- GTK_WIDGET_VISIBLE(tree_item->pixmaps_box) &&
+ gtk_widget_get_visible(tree_item->pixmaps_box) &&
gtk_widget_intersect (tree_item->pixmaps_box, area, &child_area))
{
gtk_widget_queue_draw_area (tree_item->pixmaps_box,
@@ -946,12 +946,12 @@ gtk_tree_item_map (GtkWidget *widget)
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
if(item->pixmaps_box &&
- GTK_WIDGET_VISIBLE (item->pixmaps_box) &&
+ gtk_widget_get_visible (item->pixmaps_box) &&
!GTK_WIDGET_MAPPED (item->pixmaps_box))
gtk_widget_map (item->pixmaps_box);
if (bin->child &&
- GTK_WIDGET_VISIBLE (bin->child) &&
+ gtk_widget_get_visible (bin->child) &&
!GTK_WIDGET_MAPPED (bin->child))
gtk_widget_map (bin->child);
@@ -969,12 +969,12 @@ gtk_tree_item_unmap (GtkWidget *widget)
gdk_window_hide (widget->window);
if(item->pixmaps_box &&
- GTK_WIDGET_VISIBLE (item->pixmaps_box) &&
+ gtk_widget_get_visible (item->pixmaps_box) &&
GTK_WIDGET_MAPPED (item->pixmaps_box))
gtk_widget_unmap (bin->child);
if (bin->child &&
- GTK_WIDGET_VISIBLE (bin->child) &&
+ gtk_widget_get_visible (bin->child) &&
GTK_WIDGET_MAPPED (bin->child))
gtk_widget_unmap (bin->child);
}
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 620ccfc..ead022f 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -1711,7 +1711,7 @@ gtk_tree_view_map_buttons (GtkTreeView *tree_view)
for (list = tree_view->priv->columns; list; list = list->next)
{
column = list->data;
- if (GTK_WIDGET_VISIBLE (column->button) &&
+ if (gtk_widget_get_visible (column->button) &&
!GTK_WIDGET_MAPPED (column->button))
gtk_widget_map (column->button);
}
@@ -1746,7 +1746,7 @@ gtk_tree_view_map (GtkWidget *widget)
GtkTreeViewChild *child = tmp_list->data;
tmp_list = tmp_list->next;
- if (GTK_WIDGET_VISIBLE (child->widget))
+ if (gtk_widget_get_visible (child->widget))
{
if (!GTK_WIDGET_MAPPED (child->widget))
gtk_widget_map (child->widget);
@@ -2049,7 +2049,7 @@ gtk_tree_view_size_request (GtkWidget *widget,
tmp_list = tmp_list->next;
- if (GTK_WIDGET_VISIBLE (child->widget))
+ if (gtk_widget_get_visible (child->widget))
gtk_widget_size_request (child->widget, &child_requisition);
}
}
@@ -10383,7 +10383,7 @@ gtk_tree_view_real_start_interactive_search (GtkTreeView *tree_view,
return FALSE;
if (tree_view->priv->search_window != NULL &&
- GTK_WIDGET_VISIBLE (tree_view->priv->search_window))
+ gtk_widget_get_visible (tree_view->priv->search_window))
return TRUE;
for (list = tree_view->priv->columns; list; list = list->next)
@@ -10517,7 +10517,7 @@ adjust_allocation_recurse (GtkWidget *widget,
*/
if (!GTK_WIDGET_REALIZED (widget))
{
- if (GTK_WIDGET_VISIBLE (widget))
+ if (gtk_widget_get_visible (widget))
{
GdkRectangle tmp_rectangle = widget->allocation;
tmp_rectangle.x += scroll_data->dx;
@@ -11660,7 +11660,7 @@ gtk_tree_view_scroll_to_cell (GtkTreeView *tree_view,
* scrolling code, we short-circuit validate_visible_area's immplementation as
* it is much slower than just going to the point.
*/
- if (! GTK_WIDGET_VISIBLE (tree_view) ||
+ if (! gtk_widget_get_visible (GTK_WIDGET (tree_view)) ||
! GTK_WIDGET_REALIZED (tree_view) ||
GTK_WIDGET_ALLOC_NEEDED (tree_view) ||
GTK_RBNODE_FLAG_SET (tree_view->priv->tree->root, GTK_RBNODE_DESCENDANTS_INVALID))
@@ -14171,7 +14171,7 @@ gtk_tree_view_search_dialog_hide (GtkWidget *search_dialog,
tree_view->priv->typeselect_flush_timeout = 0;
}
- if (GTK_WIDGET_VISIBLE (search_dialog))
+ if (gtk_widget_get_visible (search_dialog))
{
/* send focus-in event */
send_focus_change (GTK_WIDGET (tree_view->priv->search_entry), FALSE);
diff --git a/gtk/gtkuimanager.c b/gtk/gtkuimanager.c
index c5c7794..084f1bf 100644
--- a/gtk/gtkuimanager.c
+++ b/gtk/gtkuimanager.c
@@ -2133,7 +2133,7 @@ _gtk_menu_is_empty (GtkWidget *menu)
cur = children;
while (cur)
{
- if (GTK_WIDGET_VISIBLE (cur->data))
+ if (gtk_widget_get_visible (cur->data))
{
if (!GTK_IS_TEAROFF_MENU_ITEM (cur->data) &&
!g_object_get_data (cur->data, "gtk-empty-menu-item"))
@@ -2214,7 +2214,7 @@ update_smart_separators (GtkWidget *proxy)
break;
}
}
- else if (GTK_WIDGET_VISIBLE (cur->data))
+ else if (gtk_widget_get_visible (cur->data))
{
last = NULL;
if (GTK_IS_TEAROFF_MENU_ITEM (cur->data) || cur->data == filler)
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index b4411cf..5d707d9 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -378,7 +378,7 @@ viewport_set_hadjustment_values (GtkViewport *viewport,
hadjustment->lower = 0;
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
GtkRequisition child_requisition;
@@ -415,7 +415,7 @@ viewport_set_vadjustment_values (GtkViewport *viewport,
vadjustment->lower = 0;
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
GtkRequisition child_requisition;
@@ -529,7 +529,7 @@ gtk_viewport_set_shadow_type (GtkViewport *viewport,
{
viewport->shadow_type = type;
- if (GTK_WIDGET_VISIBLE (viewport))
+ if (gtk_widget_get_visible (GTK_WIDGET (viewport)))
{
gtk_widget_size_allocate (GTK_WIDGET (viewport), &(GTK_WIDGET (viewport)->allocation));
gtk_widget_queue_draw (GTK_WIDGET (viewport));
@@ -738,7 +738,7 @@ gtk_viewport_size_request (GtkWidget *widget,
requisition->height += 2 * widget->style->ythickness;
}
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
gtk_widget_size_request (bin->child, &child_requisition);
requisition->width += child_requisition.width;
@@ -797,7 +797,7 @@ gtk_viewport_size_allocate (GtkWidget *widget,
child_allocation.width,
child_allocation.height);
}
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
gtk_widget_size_allocate (bin->child, &child_allocation);
gtk_adjustment_changed (hadjustment);
@@ -815,7 +815,7 @@ gtk_viewport_adjustment_value_changed (GtkAdjustment *adjustment,
GtkViewport *viewport = GTK_VIEWPORT (data);
GtkBin *bin = GTK_BIN (data);
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child) &&
+ if (bin->child && gtk_widget_get_visible (bin->child) &&
GTK_WIDGET_REALIZED (viewport))
{
GtkAdjustment *hadjustment = gtk_viewport_get_hadjustment (viewport);
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 34e27ac..f22efb3 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -2670,7 +2670,7 @@ gtk_widget_set_property (GObject *object,
tmp = (tooltip_window != NULL || tooltip_markup != NULL);
gtk_widget_real_set_has_tooltip (widget, tmp, FALSE);
- if (GTK_WIDGET_VISIBLE (widget))
+ if (gtk_widget_get_visible (widget))
gtk_widget_queue_tooltip_query (widget);
break;
case PROP_TOOLTIP_TEXT:
@@ -2691,7 +2691,7 @@ gtk_widget_set_property (GObject *object,
tmp = (tooltip_window != NULL || tooltip_markup != NULL);
gtk_widget_real_set_has_tooltip (widget, tmp, FALSE);
- if (GTK_WIDGET_VISIBLE (widget))
+ if (gtk_widget_get_visible (widget))
gtk_widget_queue_tooltip_query (widget);
break;
case PROP_DOUBLE_BUFFERED:
@@ -2740,7 +2740,7 @@ gtk_widget_get_property (GObject *object,
}
break;
case PROP_VISIBLE:
- g_value_set_boolean (value, (GTK_WIDGET_VISIBLE (widget) != FALSE));
+ g_value_set_boolean (value, (gtk_widget_get_visible (widget) != FALSE));
break;
case PROP_SENSITIVE:
g_value_set_boolean (value, (gtk_widget_get_sensitive (widget) != FALSE));
@@ -3178,7 +3178,7 @@ gtk_widget_show (GtkWidget *widget)
{
g_return_if_fail (GTK_IS_WIDGET (widget));
- if (!GTK_WIDGET_VISIBLE (widget))
+ if (!gtk_widget_get_visible (widget))
{
g_object_ref (widget);
if (!gtk_widget_is_toplevel (widget))
@@ -3192,7 +3192,7 @@ gtk_widget_show (GtkWidget *widget)
static void
gtk_widget_real_show (GtkWidget *widget)
{
- if (!GTK_WIDGET_VISIBLE (widget))
+ if (!gtk_widget_get_visible (widget))
{
GTK_WIDGET_SET_FLAGS (widget, GTK_VISIBLE);
@@ -3259,7 +3259,7 @@ gtk_widget_hide (GtkWidget *widget)
{
g_return_if_fail (GTK_IS_WIDGET (widget));
- if (GTK_WIDGET_VISIBLE (widget))
+ if (gtk_widget_get_visible (widget))
{
GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
@@ -3278,7 +3278,7 @@ gtk_widget_hide (GtkWidget *widget)
static void
gtk_widget_real_hide (GtkWidget *widget)
{
- if (GTK_WIDGET_VISIBLE (widget))
+ if (gtk_widget_get_visible (widget))
{
GTK_WIDGET_UNSET_FLAGS (widget, GTK_VISIBLE);
@@ -3367,7 +3367,7 @@ void
gtk_widget_map (GtkWidget *widget)
{
g_return_if_fail (GTK_IS_WIDGET (widget));
- g_return_if_fail (GTK_WIDGET_VISIBLE (widget));
+ g_return_if_fail (gtk_widget_get_visible (widget));
g_return_if_fail (GTK_WIDGET_CHILD_VISIBLE (widget));
if (!GTK_WIDGET_MAPPED (widget))
@@ -5832,7 +5832,7 @@ gtk_widget_set_visible (GtkWidget *widget,
{
g_return_if_fail (GTK_IS_WIDGET (widget));
- if (visible != GTK_WIDGET_VISIBLE (widget))
+ if (visible != gtk_widget_get_visible (widget))
{
if (visible)
gtk_widget_show (widget);
@@ -5860,7 +5860,7 @@ gtk_widget_get_visible (GtkWidget *widget)
{
g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
- return (GTK_WIDGET_FLAGS (widget) & GTK_VISIBLE) != 0;
+ return (GTK_OBJECT_FLAGS (widget) & GTK_VISIBLE) != 0;
}
/**
@@ -6349,8 +6349,8 @@ gtk_widget_set_parent (GtkWidget *widget,
if (GTK_WIDGET_REALIZED (widget->parent))
gtk_widget_realize (widget);
- if (GTK_WIDGET_VISIBLE (widget->parent) &&
- GTK_WIDGET_VISIBLE (widget))
+ if (gtk_widget_get_visible (widget->parent) &&
+ gtk_widget_get_visible (widget))
{
if (GTK_WIDGET_CHILD_VISIBLE (widget) &&
GTK_WIDGET_MAPPED (widget->parent))
@@ -7446,7 +7446,7 @@ gtk_widget_set_child_visible (GtkWidget *widget,
{
if (GTK_WIDGET_MAPPED (widget->parent) &&
GTK_WIDGET_CHILD_VISIBLE (widget) &&
- GTK_WIDGET_VISIBLE (widget))
+ gtk_widget_get_visible (widget))
gtk_widget_map (widget);
else
gtk_widget_unmap (widget);
@@ -7647,7 +7647,7 @@ gtk_widget_child_focus (GtkWidget *widget,
g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
- if (!GTK_WIDGET_VISIBLE (widget) ||
+ if (!gtk_widget_get_visible (widget) ||
!gtk_widget_is_sensitive (widget))
return FALSE;
@@ -7823,7 +7823,7 @@ gtk_widget_set_uposition (GtkWidget *widget,
if (GTK_IS_WINDOW (widget) && aux_info->x_set && aux_info->y_set)
_gtk_window_reposition (GTK_WINDOW (widget), aux_info->x, aux_info->y);
- if (GTK_WIDGET_VISIBLE (widget) && widget->parent)
+ if (gtk_widget_get_visible (widget) && widget->parent)
gtk_widget_size_allocate (widget, &widget->allocation);
}
@@ -7852,7 +7852,7 @@ gtk_widget_set_usize_internal (GtkWidget *widget,
changed = TRUE;
}
- if (GTK_WIDGET_VISIBLE (widget) && changed)
+ if (gtk_widget_get_visible (widget) && changed)
gtk_widget_queue_resize (widget);
g_object_thaw_notify (G_OBJECT (widget));
@@ -8680,7 +8680,7 @@ gtk_widget_dispose (GObject *object)
if (widget->parent)
gtk_container_remove (GTK_CONTAINER (widget->parent), widget);
- else if (GTK_WIDGET_VISIBLE (widget))
+ else if (gtk_widget_get_visible (widget))
gtk_widget_hide (widget);
GTK_WIDGET_UNSET_FLAGS (widget, GTK_VISIBLE);
@@ -9559,7 +9559,7 @@ gtk_widget_get_snapshot (GtkWidget *widget,
GList *windows = NULL, *list;
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
- if (!GTK_WIDGET_VISIBLE (widget))
+ if (!gtk_widget_get_visible (widget))
return NULL;
/* the widget (and parent_window) must be realized to be drawable */
@@ -10953,7 +10953,7 @@ gtk_widget_set_tooltip_window (GtkWidget *widget,
has_tooltip = (custom_window != NULL || tooltip_markup != NULL);
gtk_widget_real_set_has_tooltip (widget, has_tooltip, FALSE);
- if (has_tooltip && GTK_WIDGET_VISIBLE (widget))
+ if (has_tooltip && gtk_widget_get_visible (widget))
gtk_widget_queue_tooltip_query (widget);
}
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index b3439a7..0a22a98 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -233,13 +233,17 @@ typedef enum
*/
#define GTK_WIDGET_MAPPED(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_MAPPED) != 0)
+#ifndef GTK_DISABLE_DEPRECATED
/**
* GTK_WIDGET_VISIBLE:
* @wid: a #GtkWidget.
*
* Evaluates to %TRUE if the widget is visible.
+ *
+ * Deprecated: 2.20: Use gtk_widget_get_visible() instead.
*/
#define GTK_WIDGET_VISIBLE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_VISIBLE) != 0)
+#endif
#ifndef GTK_DISABLE_DEPRECATED
/**
diff --git a/gtk/gtkwin32embedwidget.c b/gtk/gtkwin32embedwidget.c
index 6afd918..0d90d2b 100644
--- a/gtk/gtkwin32embedwidget.c
+++ b/gtk/gtkwin32embedwidget.c
@@ -270,7 +270,7 @@ gtk_win32_embed_widget_map (GtkWidget *widget)
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
if (bin->child &&
- GTK_WIDGET_VISIBLE (bin->child) &&
+ gtk_widget_get_visible (bin->child) &&
!GTK_WIDGET_MAPPED (bin->child))
gtk_widget_map (bin->child);
@@ -297,7 +297,7 @@ gtk_win32_embed_widget_size_allocate (GtkWidget *widget,
allocation->x, allocation->y,
allocation->width, allocation->height);
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
GtkAllocation child_allocation;
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index e28bffd..86a915a 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -2037,6 +2037,8 @@ void
gtk_window_set_modal (GtkWindow *window,
gboolean modal)
{
+ GtkWidget *widget;
+
g_return_if_fail (GTK_IS_WINDOW (window));
modal = modal != FALSE;
@@ -2044,24 +2046,23 @@ gtk_window_set_modal (GtkWindow *window,
return;
window->modal = modal;
+ widget = GTK_WIDGET (window);
/* adjust desired modality state */
if (GTK_WIDGET_REALIZED (window))
{
- GtkWidget *widget = GTK_WIDGET (window);
-
if (window->modal)
gdk_window_set_modal_hint (widget->window, TRUE);
else
gdk_window_set_modal_hint (widget->window, FALSE);
}
- if (GTK_WIDGET_VISIBLE (window))
+ if (gtk_widget_get_visible (widget))
{
if (window->modal)
- gtk_grab_add (GTK_WIDGET (window));
+ gtk_grab_add (widget);
else
- gtk_grab_remove (GTK_WIDGET (window));
+ gtk_grab_remove (widget);
}
g_object_notify (G_OBJECT (window), "modal");
@@ -4564,7 +4565,7 @@ gtk_window_map (GtkWidget *widget)
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
if (window->bin.child &&
- GTK_WIDGET_VISIBLE (window->bin.child) &&
+ gtk_widget_get_visible (window->bin.child) &&
!GTK_WIDGET_MAPPED (window->bin.child))
gtk_widget_map (window->bin.child);
@@ -4939,7 +4940,7 @@ gtk_window_size_request (GtkWidget *widget,
requisition->width = GTK_CONTAINER (window)->border_width * 2;
requisition->height = GTK_CONTAINER (window)->border_width * 2;
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
+ if (bin->child && gtk_widget_get_visible (bin->child))
{
GtkRequisition child_requisition;
@@ -4960,7 +4961,7 @@ gtk_window_size_allocate (GtkWidget *widget,
window = GTK_WINDOW (widget);
widget->allocation = *allocation;
- if (window->bin.child && GTK_WIDGET_VISIBLE (window->bin.child))
+ if (window->bin.child && gtk_widget_get_visible (window->bin.child))
{
child_allocation.x = GTK_CONTAINER (window)->border_width;
child_allocation.y = GTK_CONTAINER (window)->border_width;
@@ -5305,7 +5306,7 @@ gtk_window_focus_in_event (GtkWidget *widget,
* the window is visible before actually handling the
* event
*/
- if (GTK_WIDGET_VISIBLE (widget))
+ if (gtk_widget_get_visible (widget))
{
_gtk_window_set_has_toplevel_focus (window, TRUE);
_gtk_window_set_is_active (window, TRUE);
@@ -5392,10 +5393,8 @@ gtk_window_client_event (GtkWidget *widget,
static void
gtk_window_check_resize (GtkContainer *container)
{
- GtkWindow *window = GTK_WINDOW (container);
-
- if (GTK_WIDGET_VISIBLE (container))
- gtk_window_move_resize (window);
+ if (gtk_widget_get_visible (GTK_WIDGET (container)))
+ gtk_window_move_resize (GTK_WINDOW (container));
}
static gboolean
@@ -6778,7 +6777,7 @@ gtk_window_present_with_time (GtkWindow *window,
widget = GTK_WIDGET (window);
- if (GTK_WIDGET_VISIBLE (window))
+ if (gtk_widget_get_visible (widget))
{
g_assert (widget->window != NULL);
@@ -7333,9 +7332,8 @@ gtk_window_begin_resize_drag (GtkWindow *window,
GdkWindow *toplevel;
g_return_if_fail (GTK_IS_WINDOW (window));
- g_return_if_fail (GTK_WIDGET_VISIBLE (window));
-
widget = GTK_WIDGET (window);
+ g_return_if_fail (gtk_widget_get_visible (widget));
if (window->frame)
toplevel = window->frame;
@@ -7413,9 +7411,8 @@ gtk_window_begin_move_drag (GtkWindow *window,
GdkWindow *toplevel;
g_return_if_fail (GTK_IS_WINDOW (window));
- g_return_if_fail (GTK_WIDGET_VISIBLE (window));
-
widget = GTK_WIDGET (window);
+ g_return_if_fail (gtk_widget_get_visible (widget));
if (window->frame)
toplevel = window->frame;
diff --git a/gtk/tests/filechooser.c b/gtk/tests/filechooser.c
index 6b99459..dd5988f 100644
--- a/gtk/tests/filechooser.c
+++ b/gtk/tests/filechooser.c
@@ -517,9 +517,9 @@ test_widgets_for_current_action (GtkFileChooserDialog *dialog,
/* OPEN implies that the "new folder" button is hidden; otherwise it is shown */
if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN)
- passed = passed && !GTK_WIDGET_VISIBLE (impl->browse_new_folder_button);
+ passed = passed && !gtk_widget_get_visible (impl->browse_new_folder_button);
else
- passed = passed && GTK_WIDGET_VISIBLE (impl->browse_new_folder_button);
+ passed = passed && gtk_widget_get_visible (impl->browse_new_folder_button);
/* Check that the widgets are present/visible or not */
if (has_action (open_actions, G_N_ELEMENTS (open_actions), impl->action))
diff --git a/modules/other/gail/gailbutton.c b/modules/other/gail/gailbutton.c
index d4fcf4d..3a1ac3d 100644
--- a/modules/other/gail/gailbutton.c
+++ b/modules/other/gail/gailbutton.c
@@ -459,7 +459,7 @@ gail_button_do_action (AtkAction *action,
*/
return FALSE;
- if (!gtk_widget_is_sensitive (widget) || !GTK_WIDGET_VISIBLE (widget))
+ if (!gtk_widget_is_sensitive (widget) || !gtk_widget_get_visible (widget))
return FALSE;
button = GAIL_BUTTON (action);
@@ -505,7 +505,7 @@ idle_do_action (gpointer data)
g_object_ref (gail_button);
if (widget == NULL /* State is defunct */ ||
- !gtk_widget_is_sensitive (widget) || !GTK_WIDGET_VISIBLE (widget))
+ !gtk_widget_is_sensitive (widget) || !gtk_widget_get_visible (widget))
{
g_object_unref (gail_button);
return FALSE;
diff --git a/modules/other/gail/gailcombo.c b/modules/other/gail/gailcombo.c
index 08ce2ea..1f10ecb 100644
--- a/modules/other/gail/gailcombo.c
+++ b/modules/other/gail/gailcombo.c
@@ -267,7 +267,7 @@ gail_combo_do_action (AtkAction *action,
*/
return FALSE;
- if (!gtk_widget_get_sensitive (widget) || !GTK_WIDGET_VISIBLE (widget))
+ if (!gtk_widget_get_sensitive (widget) || !gtk_widget_get_visible (widget))
return FALSE;
combo = GAIL_COMBO (action);
@@ -305,7 +305,7 @@ idle_do_action (gpointer data)
gail_combo->action_idle_handler = 0;
widget = GTK_ACCESSIBLE (gail_combo)->widget;
if (widget == NULL /* State is defunct */ ||
- !gtk_widget_get_sensitive (widget) || !GTK_WIDGET_VISIBLE (widget))
+ !gtk_widget_get_sensitive (widget) || !gtk_widget_get_visible (widget))
return FALSE;
combo = GTK_COMBO (widget);
diff --git a/modules/other/gail/gailcombobox.c b/modules/other/gail/gailcombobox.c
index 3b6fde6..d33e919 100644
--- a/modules/other/gail/gailcombobox.c
+++ b/modules/other/gail/gailcombobox.c
@@ -284,7 +284,7 @@ gail_combo_box_do_action (AtkAction *action,
*/
return FALSE;
- if (!gtk_widget_get_sensitive (widget) || !GTK_WIDGET_VISIBLE (widget))
+ if (!gtk_widget_get_sensitive (widget) || !gtk_widget_get_visible (widget))
return FALSE;
combo_box = GAIL_COMBO_BOX (action);
@@ -313,7 +313,7 @@ idle_do_action (gpointer data)
gail_combo_box->action_idle_handler = 0;
widget = GTK_ACCESSIBLE (gail_combo_box)->widget;
if (widget == NULL || /* State is defunct */
- !gtk_widget_get_sensitive (widget) || !GTK_WIDGET_VISIBLE (widget))
+ !gtk_widget_get_sensitive (widget) || !gtk_widget_get_visible (widget))
return FALSE;
combo_box = GTK_COMBO_BOX (widget);
diff --git a/modules/other/gail/gailentry.c b/modules/other/gail/gailentry.c
index 5b01989..9da1f45 100644
--- a/modules/other/gail/gailentry.c
+++ b/modules/other/gail/gailentry.c
@@ -1204,7 +1204,7 @@ gail_entry_do_action (AtkAction *action,
*/
return FALSE;
- if (!gtk_widget_get_sensitive (widget) || !GTK_WIDGET_VISIBLE (widget))
+ if (!gtk_widget_get_sensitive (widget) || !gtk_widget_get_visible (widget))
return FALSE;
switch (i)
@@ -1232,7 +1232,7 @@ idle_do_action (gpointer data)
entry->action_idle_handler = 0;
widget = GTK_ACCESSIBLE (entry)->widget;
if (widget == NULL /* State is defunct */ ||
- !gtk_widget_get_sensitive (widget) || !GTK_WIDGET_VISIBLE (widget))
+ !gtk_widget_get_sensitive (widget) || !gtk_widget_get_visible (widget))
return FALSE;
gtk_widget_activate (widget);
diff --git a/modules/other/gail/gailexpander.c b/modules/other/gail/gailexpander.c
index c4b7cd2..fd42659 100644
--- a/modules/other/gail/gailexpander.c
+++ b/modules/other/gail/gailexpander.c
@@ -374,7 +374,7 @@ gail_expander_do_action (AtkAction *action,
*/
return FALSE;
- if (!gtk_widget_is_sensitive (widget) || !GTK_WIDGET_VISIBLE (widget))
+ if (!gtk_widget_is_sensitive (widget) || !gtk_widget_get_visible (widget))
return FALSE;
expander = GAIL_EXPANDER (action);
@@ -404,7 +404,7 @@ idle_do_action (gpointer data)
widget = GTK_ACCESSIBLE (gail_expander)->widget;
if (widget == NULL /* State is defunct */ ||
- !gtk_widget_is_sensitive (widget) || !GTK_WIDGET_VISIBLE (widget))
+ !gtk_widget_is_sensitive (widget) || !gtk_widget_get_visible (widget))
return FALSE;
gtk_widget_activate (widget);
diff --git a/modules/other/gail/gailmenuitem.c b/modules/other/gail/gailmenuitem.c
index 53257c8..5677552 100644
--- a/modules/other/gail/gailmenuitem.c
+++ b/modules/other/gail/gailmenuitem.c
@@ -162,7 +162,7 @@ get_children (GtkWidget *submenu)
*
* The following hack forces the menu items to be created.
*/
- if (!GTK_WIDGET_VISIBLE (submenu))
+ if (!gtk_widget_get_visible (submenu))
{
GTK_WIDGET_SET_FLAGS (submenu, GTK_VISIBLE);
g_signal_emit_by_name (submenu, "show");
@@ -291,7 +291,7 @@ gail_menu_item_do_action (AtkAction *action,
/* State is defunct */
return FALSE;
- if (!gtk_widget_get_sensitive (item) || !GTK_WIDGET_VISIBLE (item))
+ if (!gtk_widget_get_sensitive (item) || !gtk_widget_get_visible (item))
return FALSE;
gail_menu_item = GAIL_MENU_ITEM (action);
@@ -347,7 +347,7 @@ idle_do_action (gpointer data)
menu_item->action_idle_handler = 0;
item = GTK_ACCESSIBLE (menu_item)->widget;
if (item == NULL /* State is defunct */ ||
- !gtk_widget_get_sensitive (item) || !GTK_WIDGET_VISIBLE (item))
+ !gtk_widget_get_sensitive (item) || !gtk_widget_get_visible (item))
return FALSE;
item_parent = gtk_widget_get_parent (item);
diff --git a/modules/other/gail/gailoptionmenu.c b/modules/other/gail/gailoptionmenu.c
index a26325a..680ab20 100644
--- a/modules/other/gail/gailoptionmenu.c
+++ b/modules/other/gail/gailoptionmenu.c
@@ -212,7 +212,7 @@ gail_option_menu_do_action (AtkAction *action,
*/
return FALSE;
- if (!gtk_widget_get_sensitive (widget) || !GTK_WIDGET_VISIBLE (widget))
+ if (!gtk_widget_get_sensitive (widget) || !gtk_widget_get_visible (widget))
return FALSE;
switch (i)
@@ -243,7 +243,7 @@ idle_do_action (gpointer data)
widget = GTK_ACCESSIBLE (gail_button)->widget;
if (widget == NULL /* State is defunct */ ||
- !gtk_widget_get_sensitive (widget) || !GTK_WIDGET_VISIBLE (widget))
+ !gtk_widget_get_sensitive (widget) || !gtk_widget_get_visible (widget))
return FALSE;
button = GTK_BUTTON (widget);
diff --git a/modules/other/gail/gailrange.c b/modules/other/gail/gailrange.c
index 099d0c6..c21a5b9 100644
--- a/modules/other/gail/gailrange.c
+++ b/modules/other/gail/gailrange.c
@@ -346,7 +346,7 @@ gail_range_do_action (AtkAction *action,
* State is defunct
*/
return FALSE;
- if (!gtk_widget_get_sensitive (widget) || !GTK_WIDGET_VISIBLE (widget))
+ if (!gtk_widget_get_sensitive (widget) || !gtk_widget_get_visible (widget))
return FALSE;
if(i==0)
{
@@ -370,7 +370,7 @@ idle_do_action (gpointer data)
range->action_idle_handler = 0;
widget = GTK_ACCESSIBLE (range)->widget;
if (widget == NULL /* State is defunct */ ||
- !gtk_widget_get_sensitive (widget) || !GTK_WIDGET_VISIBLE (widget))
+ !gtk_widget_get_sensitive (widget) || !gtk_widget_get_visible (widget))
return FALSE;
gtk_widget_activate (widget);
diff --git a/modules/other/gail/gailscalebutton.c b/modules/other/gail/gailscalebutton.c
index 956543c..bf79a5a 100644
--- a/modules/other/gail/gailscalebutton.c
+++ b/modules/other/gail/gailscalebutton.c
@@ -115,7 +115,7 @@ gail_scale_button_do_action(AtkAction *action,
if (widget == NULL)
return FALSE;
- if (!gtk_widget_is_sensitive (widget) || !GTK_WIDGET_VISIBLE (widget))
+ if (!gtk_widget_is_sensitive (widget) || !gtk_widget_get_visible (widget))
return FALSE;
switch (i) {
diff --git a/modules/other/gail/gailtoplevel.c b/modules/other/gail/gailtoplevel.c
index c8ac919..7f458fb 100644
--- a/modules/other/gail/gailtoplevel.c
+++ b/modules/other/gail/gailtoplevel.c
@@ -94,7 +94,7 @@ gail_toplevel_init (GailToplevel *toplevel)
window = GTK_WINDOW (l->data);
widget = GTK_WIDGET (window);
if (!window ||
- !GTK_WIDGET_VISIBLE (widget) ||
+ !gtk_widget_get_visible (widget) ||
is_attached_menu_window (widget) ||
GTK_WIDGET (window)->parent ||
GTK_IS_PLUG (window))
diff --git a/modules/other/gail/gailwidget.c b/modules/other/gail/gailwidget.c
index 1732882..95d4302 100644
--- a/modules/other/gail/gailwidget.c
+++ b/modules/other/gail/gailwidget.c
@@ -511,7 +511,7 @@ gail_widget_ref_state_set (AtkObject *accessible)
* GailWidget data structure so we can determine whether the value has
* changed.
*/
- if (GTK_WIDGET_VISIBLE (widget))
+ if (gtk_widget_get_visible (widget))
{
atk_state_set_add_state (state_set, ATK_STATE_VISIBLE);
if (gail_widget_on_screen (widget) && GTK_WIDGET_MAPPED (widget) &&
@@ -986,7 +986,7 @@ gail_widget_real_notify_gtk (GObject *obj,
else if (strcmp (pspec->name, "visible") == 0)
{
state = ATK_STATE_VISIBLE;
- value = GTK_WIDGET_VISIBLE (widget);
+ value = gtk_widget_get_visible (widget);
}
else if (strcmp (pspec->name, "sensitive") == 0)
{
@@ -1093,7 +1093,7 @@ static gboolean gail_widget_all_parents_visible (GtkWidget *widget)
for (iter_parent = gtk_widget_get_parent (widget); iter_parent;
iter_parent = gtk_widget_get_parent (iter_parent))
{
- if (!GTK_WIDGET_VISIBLE (iter_parent))
+ if (!gtk_widget_get_visible (iter_parent))
{
result = FALSE;
break;
diff --git a/modules/other/gail/gailwindow.c b/modules/other/gail/gailwindow.c
index 5f2e8b4..851179a 100644
--- a/modules/other/gail/gailwindow.c
+++ b/modules/other/gail/gailwindow.c
@@ -418,7 +418,7 @@ gail_window_ref_relation_set (AtkObject *obj)
{
atk_relation_set_remove (relation_set, relation);
}
- if (GTK_WIDGET_VISIBLE(widget) && gtk_tooltips_get_info_from_tip_window (GTK_WINDOW (widget), NULL, ¤t_widget))
+ if (gtk_widget_get_visible(widget) && gtk_tooltips_get_info_from_tip_window (GTK_WINDOW (widget), NULL, ¤t_widget))
{
array [0] = gtk_widget_get_accessible (current_widget);
diff --git a/modules/other/gail/tests/ferret.c b/modules/other/gail/tests/ferret.c
index 531651b..4cde9a7 100644
--- a/modules/other/gail/tests/ferret.c
+++ b/modules/other/gail/tests/ferret.c
@@ -1710,7 +1710,7 @@ _create_window (void)
gtk_container_add (GTK_CONTAINER (vbox1), GTK_WIDGET (notebook));
gtk_widget_show (GTK_WIDGET (notebook));
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
mainWindow = GTK_WIDGET (window);
diff --git a/perf/gtkwidgetprofiler.c b/perf/gtkwidgetprofiler.c
index 4b33d09..937d8f5 100644
--- a/perf/gtkwidgetprofiler.c
+++ b/perf/gtkwidgetprofiler.c
@@ -168,7 +168,7 @@ create_widget_via_emission (GtkWidgetProfiler *profiler)
if (!widget)
g_error ("The profiler emitted the \"create-widget\" signal but the signal handler returned no widget!");
- if (GTK_WIDGET_VISIBLE (widget) || GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_visible (widget) || GTK_WIDGET_MAPPED (widget))
g_error ("The handler for \"create-widget\" must return an unmapped and unshown widget");
return widget;
diff --git a/tests/gtkoffscreenbox.c b/tests/gtkoffscreenbox.c
index e7fa941..83968ca 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;
diff --git a/tests/testassistant.c b/tests/testassistant.c
index 91774e3..33e06e3 100644
--- a/tests/testassistant.c
+++ b/tests/testassistant.c
@@ -184,7 +184,7 @@ create_simple_assistant (GtkWidget *widget)
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), page, TRUE);
}
- if (!GTK_WIDGET_VISIBLE (assistant))
+ if (!gtk_widget_get_visible (assistant))
gtk_widget_show (assistant);
else
{
@@ -277,7 +277,7 @@ create_generous_assistant (GtkWidget *widget)
G_CALLBACK (complete_cb), pdata);
}
- if (!GTK_WIDGET_VISIBLE (assistant))
+ if (!gtk_widget_get_visible (assistant))
gtk_widget_show (assistant);
else
{
@@ -374,7 +374,7 @@ create_nonlinear_assistant (GtkWidget *widget)
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), page, TRUE);
}
- if (!GTK_WIDGET_VISIBLE (assistant))
+ if (!gtk_widget_get_visible (assistant))
gtk_widget_show (assistant);
else
{
@@ -471,7 +471,7 @@ create_looping_assistant (GtkWidget *widget)
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), page, TRUE);
}
- if (!GTK_WIDGET_VISIBLE (assistant))
+ if (!gtk_widget_get_visible (assistant))
gtk_widget_show (assistant);
else
{
@@ -535,7 +535,7 @@ create_full_featured_assistant (GtkWidget *widget)
gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), page, pixbuf);
}
- if (!GTK_WIDGET_VISIBLE (assistant))
+ if (!gtk_widget_get_visible (assistant))
gtk_widget_show (assistant);
else
{
diff --git a/tests/testgtk.c b/tests/testgtk.c
index d2a5b5d..2bde6bc 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -414,7 +414,7 @@ create_alpha_window (GtkWidget *widget)
NULL);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -558,7 +558,7 @@ create_composited_window (GtkWidget *widget)
G_CALLBACK (window_expose_event), NULL);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -779,7 +779,7 @@ create_big_windows (GtkWidget *widget)
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_hide (window);
@@ -793,7 +793,7 @@ static void
button_window (GtkWidget *widget,
GtkWidget *button)
{
- if (!GTK_WIDGET_VISIBLE (button))
+ if (!gtk_widget_get_visible (button))
gtk_widget_show (button);
else
gtk_widget_hide (button);
@@ -913,7 +913,7 @@ create_buttons (GtkWidget *widget)
gtk_widget_grab_default (button[9]);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -981,7 +981,7 @@ create_toggle_buttons (GtkWidget *widget)
gtk_widget_grab_default (button);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -1102,7 +1102,7 @@ create_check_buttons (GtkWidget *widget)
gtk_box_pack_start (GTK_BOX (box1), table, TRUE, TRUE, 0);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -1198,7 +1198,7 @@ create_radio_buttons (GtkWidget *widget)
gtk_box_pack_start (GTK_BOX (box1), table, TRUE, TRUE, 0);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -1326,7 +1326,7 @@ create_button_box (GtkWidget *widget)
TRUE, TRUE, 5);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -1544,7 +1544,7 @@ create_toolbar (GtkWidget *widget)
gtk_widget_set_size_request (toolbar, 200, -1);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -1796,7 +1796,7 @@ create_statusbar (GtkWidget *widget)
gtk_widget_grab_default (button);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -2276,7 +2276,7 @@ create_tree_mode_window(GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy),
window);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -2550,7 +2550,7 @@ create_handle_box (GtkWidget *widget)
g_object_new (GTK_TYPE_ARROW, "visible", 1, "parent", hbox, NULL);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
gtk_widget_destroy (window);
@@ -3160,7 +3160,7 @@ void create_labels (GtkWidget *widget)
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -3224,7 +3224,7 @@ create_rotated_label (GtkWidget *widget)
gtk_box_pack_start (GTK_BOX (scale_hbox), hscale, TRUE, TRUE, 0);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -3373,7 +3373,7 @@ create_rotated_text (GtkWidget *widget)
gtk_window_resize (GTK_WINDOW (window), requisition.width, requisition.height);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
gtk_widget_destroy (window);
@@ -3498,7 +3498,7 @@ create_reparent (GtkWidget *widget)
gtk_widget_grab_default (button);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -3649,7 +3649,7 @@ create_resize_grips (GtkWidget *widget)
GINT_TO_POINTER (GDK_WINDOW_EDGE_SOUTH_EAST));
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -3871,7 +3871,7 @@ create_pixmap (GtkWidget *widget)
gtk_widget_grab_default (button);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -4038,7 +4038,7 @@ create_tooltips (GtkWidget *widget)
gtk_tooltips_set_tip (tooltips, button, "Push this button to close window", "ContextHelp/buttons/Close");
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -4105,7 +4105,7 @@ create_image (GtkWidget *widget)
gtk_image_new_from_pixmap (pixmap, mask));
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -4522,7 +4522,7 @@ create_menus (GtkWidget *widget)
gtk_widget_show (button);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
gtk_widget_destroy (window);
@@ -5216,7 +5216,7 @@ create_scrolled_windows (GtkWidget *widget)
gtk_window_set_default_size (GTK_WINDOW (window), 300, 300);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
gtk_widget_destroy (window);
@@ -5416,7 +5416,7 @@ create_entry (GtkWidget *widget)
gtk_widget_grab_default (button);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -5455,7 +5455,7 @@ create_expander (GtkWidget *widget)
gtk_container_add (GTK_CONTAINER (expander), hidden);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -5584,7 +5584,7 @@ create_event_box (GtkWidget *widget)
gtk_widget_grab_default (button);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -5747,16 +5747,16 @@ create_size_groups (GtkWidget *widget)
&window2);
}
- if (GTK_WIDGET_VISIBLE (window1) && GTK_WIDGET_VISIBLE (window2))
+ if (gtk_widget_get_visible (window1) && gtk_widget_get_visible (window2))
{
gtk_widget_destroy (window1);
gtk_widget_destroy (window2);
}
else
{
- if (!GTK_WIDGET_VISIBLE (window1))
+ if (!gtk_widget_get_visible (window1))
gtk_widget_show_all (window1);
- if (!GTK_WIDGET_VISIBLE (window2))
+ if (!gtk_widget_get_visible (window2))
gtk_widget_show_all (window2);
}
}
@@ -6125,7 +6125,7 @@ create_spins (GtkWidget *widget)
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 5);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -6627,7 +6627,7 @@ create_list (GtkWidget *widget)
gtk_widget_grab_default (button);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -7178,7 +7178,7 @@ create_clist (GtkWidget *widget)
gtk_widget_grab_default (button);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
{
@@ -7520,7 +7520,7 @@ void export_ctree (GtkWidget *widget, GtkCTree *ctree)
gtk_widget_set_size_request (GTK_WIDGET (export_ctree), 300, 200);
}
- if (!GTK_WIDGET_VISIBLE (export_window))
+ if (!gtk_widget_get_visible (export_window))
gtk_widget_show_all (export_window);
gtk_clist_clear (GTK_CLIST (export_ctree));
@@ -8127,7 +8127,7 @@ void create_ctree (GtkWidget *widget)
rebuild_tree (NULL, ctree);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -8226,7 +8226,7 @@ create_color_selection (GtkWidget *widget)
picker);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -8322,7 +8322,7 @@ create_file_selection (GtkWidget *widget)
gtk_widget_show (button);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
gtk_widget_destroy (window);
@@ -8461,7 +8461,7 @@ create_flipping (GtkWidget *widget)
button, TRUE, TRUE, 0);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -8572,7 +8572,7 @@ create_focus (GtkWidget *widget)
gtk_container_add (GTK_CONTAINER (frame), table);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -8627,7 +8627,7 @@ create_font_selection (GtkWidget *widget)
gtk_container_add (GTK_CONTAINER (hbox), picker);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -8732,7 +8732,7 @@ create_dialog (GtkWidget *widget)
gtk_widget_show (button);
}
- if (!GTK_WIDGET_VISIBLE (dialog_window))
+ if (!gtk_widget_get_visible (dialog_window))
gtk_widget_show (dialog_window);
else
gtk_widget_destroy (dialog_window);
@@ -8993,7 +8993,7 @@ create_event_watcher (GtkWidget *widget)
gtk_widget_show (button);
}
- if (!GTK_WIDGET_VISIBLE (dialog_window))
+ if (!gtk_widget_get_visible (dialog_window))
gtk_widget_show (dialog_window);
else
gtk_widget_destroy (dialog_window);
@@ -9126,7 +9126,7 @@ create_range_controls (GtkWidget *widget)
gtk_widget_show (button);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
gtk_widget_destroy (window);
@@ -9194,7 +9194,7 @@ create_rulers (GtkWidget *widget)
gtk_widget_show (ruler);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
gtk_widget_destroy (window);
@@ -9403,7 +9403,7 @@ create_text (GtkWidget *widget)
gtk_widget_show (button);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
gtk_widget_destroy (window);
@@ -9773,7 +9773,7 @@ create_notebook (GtkWidget *widget)
gtk_widget_grab_default (button);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -9955,7 +9955,7 @@ create_panes (GtkWidget *widget)
gtk_widget_show_all (vbox);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
gtk_widget_destroy (window);
@@ -10325,22 +10325,22 @@ create_paned_keyboard_navigation (GtkWidget *widget)
&window4);
}
- if (GTK_WIDGET_VISIBLE (window1))
+ if (gtk_widget_get_visible (window1))
gtk_widget_destroy (GTK_WIDGET (window1));
else
gtk_widget_show_all (GTK_WIDGET (window1));
- if (GTK_WIDGET_VISIBLE (window2))
+ if (gtk_widget_get_visible (window2))
gtk_widget_destroy (GTK_WIDGET (window2));
else
gtk_widget_show_all (GTK_WIDGET (window2));
- if (GTK_WIDGET_VISIBLE (window3))
+ if (gtk_widget_get_visible (window3))
gtk_widget_destroy (GTK_WIDGET (window3));
else
gtk_widget_show_all (GTK_WIDGET (window3));
- if (GTK_WIDGET_VISIBLE (window4))
+ if (gtk_widget_get_visible (window4))
gtk_widget_destroy (GTK_WIDGET (window4));
else
gtk_widget_show_all (GTK_WIDGET (window4));
@@ -10643,7 +10643,7 @@ create_wmhints (GtkWidget *widget)
gtk_widget_show (button);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
gtk_widget_destroy (window);
@@ -10948,7 +10948,7 @@ create_window_states (GtkWidget *widget)
gtk_widget_show_all (box1);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
gtk_widget_destroy (window);
@@ -11632,7 +11632,7 @@ create_window_sizing (GtkWidget *widget)
* of behavior on first show.
*/
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
gtk_widget_destroy (window);
@@ -12077,7 +12077,7 @@ create_progress_bar (GtkWidget *widget)
gtk_widget_grab_default (button);
}
- if (!GTK_WIDGET_VISIBLE (pdata->window))
+ if (!gtk_widget_get_visible (pdata->window))
gtk_widget_show_all (pdata->window);
else
gtk_widget_destroy (pdata->window);
@@ -12355,7 +12355,7 @@ create_properties (GtkWidget *widget)
data);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -12519,7 +12519,7 @@ create_snapshot (GtkWidget *widget)
data);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -12614,7 +12614,7 @@ create_color_preview (GtkWidget *widget)
color_idle = gtk_idle_add ((GtkFunction) color_idle_func, preview);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -12695,7 +12695,7 @@ create_gray_preview (GtkWidget *widget)
gray_idle = gtk_idle_add ((GtkFunction) gray_idle_func, preview);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -12832,7 +12832,7 @@ create_selection_test (GtkWidget *widget)
window);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -12877,7 +12877,7 @@ create_gamma_curve (GtkWidget *widget)
gtk_curve_set_vector (GTK_CURVE (GTK_GAMMA_CURVE (curve)->curve),
max, vec);
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else if (count % 4 == 3)
{
@@ -13045,7 +13045,7 @@ create_scroll_test (GtkWidget *widget)
drawing_area, &geometry, geometry_mask);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
gtk_widget_destroy (window);
@@ -13155,7 +13155,7 @@ create_timeout_test (GtkWidget *widget)
gtk_widget_show (button);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
gtk_widget_destroy (window);
@@ -13331,7 +13331,7 @@ create_idle_test (GtkWidget *widget)
gtk_widget_show (button);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
gtk_widget_destroy (window);
@@ -13426,7 +13426,7 @@ create_rc_file (GtkWidget *widget)
button, TRUE, TRUE, 0);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -13484,7 +13484,7 @@ create_mainloop (GtkWidget *widget)
gtk_widget_show (button);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show (window);
@@ -13600,7 +13600,7 @@ void create_layout (GtkWidget *widget)
}
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
@@ -13729,7 +13729,7 @@ create_styles (GtkWidget *widget)
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
diff --git a/tests/testmenubars.c b/tests/testmenubars.c
index 27e2635..7626431 100644
--- a/tests/testmenubars.c
+++ b/tests/testmenubars.c
@@ -165,7 +165,7 @@ main (int argc, char **argv)
gtk_widget_show (button);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show (window);
}
diff --git a/tests/testmenus.c b/tests/testmenus.c
index b29db53..541ee19 100644
--- a/tests/testmenus.c
+++ b/tests/testmenus.c
@@ -229,7 +229,7 @@ main (int argc, char **argv)
gtk_widget_show (button);
}
- if (!GTK_WIDGET_VISIBLE (window))
+ if (!gtk_widget_get_visible (window))
{
gtk_widget_show (window);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]