[gtk+] Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_REALIZED)
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_REALIZED)
- Date: Sat, 6 Mar 2010 10:53:31 +0000 (UTC)
commit 1934de4b652e96af40db796191aff72dfdfd6b82
Author: Javier Jardón <jjardon gnome org>
Date: Sat Mar 6 11:51:33 2010 +0100
Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_REALIZED)
Use new API instead: gtk_widget_set_realized ()
https://bugzilla.gnome.org/show_bug.cgi?id=69872
demos/gtk-demo/offscreen_window.c | 2 +-
demos/gtk-demo/offscreen_window2.c | 2 +-
docs/tutorial/gtk-tut.sgml | 4 ++--
examples/gtkdial/gtkdial.c | 2 +-
gtk/gtkbutton.c | 2 +-
gtk/gtkcalendar.c | 2 +-
gtk/gtkclist.c | 2 +-
gtk/gtkdrawingarea.c | 2 +-
gtk/gtkentry.c | 2 +-
gtk/gtkeventbox.c | 2 +-
gtk/gtkexpander.c | 2 +-
gtk/gtkfixed.c | 2 +-
gtk/gtkhandlebox.c | 2 +-
gtk/gtkhsv.c | 2 +-
gtk/gtkiconview.c | 2 +-
gtk/gtkinvisible.c | 2 +-
gtk/gtkitem.c | 2 +-
gtk/gtklayout.c | 2 +-
gtk/gtklist.c | 2 +-
gtk/gtklistitem.c | 2 +-
gtk/gtkmenu.c | 2 +-
gtk/gtkmenuitem.c | 2 +-
gtk/gtkmenushell.c | 2 +-
gtk/gtkmisc.c | 2 +-
gtk/gtknotebook.c | 3 ++-
gtk/gtkoffscreenwindow.c | 2 +-
gtk/gtkpaned.c | 2 +-
gtk/gtkpathbar.c | 2 +-
gtk/gtkplug.c | 2 +-
gtk/gtkpreview.c | 2 +-
gtk/gtkprogress.c | 2 +-
gtk/gtkrange.c | 2 +-
gtk/gtkruler.c | 3 ++-
gtk/gtksocket.c | 4 ++--
gtk/gtktext.c | 2 +-
gtk/gtktextview.c | 3 ++-
gtk/gtktoolbar.c | 2 +-
gtk/gtktoolitem.c | 2 +-
gtk/gtktoolitemgroup.c | 2 +-
gtk/gtktoolpalette.c | 2 +-
gtk/gtktree.c | 2 +-
gtk/gtktreeview.c | 2 +-
gtk/gtkviewport.c | 2 +-
gtk/gtkwidget.c | 8 ++++----
gtk/gtkwin32embedwidget.c | 2 +-
gtk/gtkwindow.c | 2 +-
tests/gtkoffscreenbox.c | 2 +-
47 files changed, 55 insertions(+), 52 deletions(-)
---
diff --git a/demos/gtk-demo/offscreen_window.c b/demos/gtk-demo/offscreen_window.c
index b6c741b..6ff212f 100644
--- a/demos/gtk-demo/offscreen_window.c
+++ b/demos/gtk-demo/offscreen_window.c
@@ -229,7 +229,7 @@ gtk_rotated_bin_realize (GtkWidget *widget)
gint border_width;
GtkRequisition child_requisition;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
border_width = GTK_CONTAINER (widget)->border_width;
diff --git a/demos/gtk-demo/offscreen_window2.c b/demos/gtk-demo/offscreen_window2.c
index 8f10894..3ee3630 100644
--- a/demos/gtk-demo/offscreen_window2.c
+++ b/demos/gtk-demo/offscreen_window2.c
@@ -167,7 +167,7 @@ gtk_mirror_bin_realize (GtkWidget *widget)
gint border_width;
GtkRequisition child_requisition;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
border_width = GTK_CONTAINER (widget)->border_width;
diff --git a/docs/tutorial/gtk-tut.sgml b/docs/tutorial/gtk-tut.sgml
index c92a550..3eee1bd 100755
--- a/docs/tutorial/gtk-tut.sgml
+++ b/docs/tutorial/gtk-tut.sgml
@@ -11925,7 +11925,7 @@ gtk_dial_realize (GtkWidget *widget)
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_DIAL (widget));
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
dial = GTK_DIAL (widget);
attributes.x = widget->allocation.x;
@@ -15113,7 +15113,7 @@ gtk_dial_realize (GtkWidget *widget)
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_DIAL (widget));
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
dial = GTK_DIAL (widget);
attributes.x = widget->allocation.x;
diff --git a/examples/gtkdial/gtkdial.c b/examples/gtkdial/gtkdial.c
index f5d8c3b..31f51c0 100644
--- a/examples/gtkdial/gtkdial.c
+++ b/examples/gtkdial/gtkdial.c
@@ -214,7 +214,7 @@ gtk_dial_realize (GtkWidget *widget)
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_DIAL (widget));
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
dial = GTK_DIAL (widget);
attributes.x = widget->allocation.x;
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 9f359c4..47819ce 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -1175,7 +1175,7 @@ gtk_button_realize (GtkWidget *widget)
gint border_width;
button = GTK_BUTTON (widget);
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
border_width = GTK_CONTAINER (widget)->border_width;
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index 3b27565..37d55c3 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -1572,7 +1572,7 @@ gtk_calendar_realize (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
attributes.x = widget->allocation.x;
attributes.y = widget->allocation.y;
diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c
index 661bda8..08216ae 100644
--- a/gtk/gtkclist.c
+++ b/gtk/gtkclist.c
@@ -4458,7 +4458,7 @@ gtk_clist_realize (GtkWidget *widget)
clist = GTK_CLIST (widget);
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
border_width = GTK_CONTAINER (widget)->border_width;
diff --git a/gtk/gtkdrawingarea.c b/gtk/gtkdrawingarea.c
index 4b4dfde..fa7d8b4 100644
--- a/gtk/gtkdrawingarea.c
+++ b/gtk/gtkdrawingarea.c
@@ -85,7 +85,7 @@ gtk_drawing_area_realize (GtkWidget *widget)
}
else
{
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x;
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index f132753..c4aeb66 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -2753,7 +2753,7 @@ gtk_entry_realize (GtkWidget *widget)
gint attributes_mask;
int i;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
entry = GTK_ENTRY (widget);
priv = GTK_ENTRY_GET_PRIVATE (entry);
diff --git a/gtk/gtkeventbox.c b/gtk/gtkeventbox.c
index 7ac4f38..bb334e1 100644
--- a/gtk/gtkeventbox.c
+++ b/gtk/gtkeventbox.c
@@ -372,7 +372,7 @@ gtk_event_box_realize (GtkWidget *widget)
GtkEventBoxPrivate *priv;
gboolean visible_window;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
border_width = GTK_CONTAINER (widget)->border_width;
diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c
index eb47404..df64e54 100644
--- a/gtk/gtkexpander.c
+++ b/gtk/gtkexpander.c
@@ -403,7 +403,7 @@ gtk_expander_realize (GtkWidget *widget)
gint label_height;
priv = GTK_EXPANDER (widget)->priv;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
border_width = GTK_CONTAINER (widget)->border_width;
diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c
index c915bb4..3106e1f 100644
--- a/gtk/gtkfixed.c
+++ b/gtk/gtkfixed.c
@@ -277,7 +277,7 @@ gtk_fixed_realize (GtkWidget *widget)
GTK_WIDGET_CLASS (gtk_fixed_parent_class)->realize (widget);
else
{
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x;
diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c
index 720d7fc..b3e12d3 100644
--- a/gtk/gtkhandlebox.c
+++ b/gtk/gtkhandlebox.c
@@ -394,7 +394,7 @@ gtk_handle_box_realize (GtkWidget *widget)
hb = GTK_HANDLE_BOX (widget);
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
attributes.x = widget->allocation.x;
attributes.y = widget->allocation.y;
diff --git a/gtk/gtkhsv.c b/gtk/gtkhsv.c
index 704b69e..a9b4bb5 100644
--- a/gtk/gtkhsv.c
+++ b/gtk/gtkhsv.c
@@ -279,7 +279,7 @@ gtk_hsv_realize (GtkWidget *widget)
hsv = GTK_HSV (widget);
priv = hsv->priv;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
/* Create window */
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index 74eaacd..24718bd 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -1318,7 +1318,7 @@ gtk_icon_view_realize (GtkWidget *widget)
icon_view = GTK_ICON_VIEW (widget);
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
/* Make the main, clipping window */
attributes.window_type = GDK_WINDOW_CHILD;
diff --git a/gtk/gtkinvisible.c b/gtk/gtkinvisible.c
index 0ca218d..c24487c 100644
--- a/gtk/gtkinvisible.c
+++ b/gtk/gtkinvisible.c
@@ -218,7 +218,7 @@ gtk_invisible_realize (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
parent = gtk_widget_get_parent_window (widget);
if (parent == NULL)
diff --git a/gtk/gtkitem.c b/gtk/gtkitem.c
index cc5e3df..b21c1e5 100644
--- a/gtk/gtkitem.c
+++ b/gtk/gtkitem.c
@@ -125,7 +125,7 @@ gtk_item_realize (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
attributes.x = widget->allocation.x;
attributes.y = widget->allocation.y;
diff --git a/gtk/gtklayout.c b/gtk/gtklayout.c
index 6f74e64..be7917b 100644
--- a/gtk/gtklayout.c
+++ b/gtk/gtklayout.c
@@ -847,7 +847,7 @@ gtk_layout_realize (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
- GTK_WIDGET_SET_FLAGS (layout, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x;
diff --git a/gtk/gtklist.c b/gtk/gtklist.c
index 11a643d..29a0c63 100644
--- a/gtk/gtklist.c
+++ b/gtk/gtklist.c
@@ -451,7 +451,7 @@ gtk_list_realize (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x;
diff --git a/gtk/gtklistitem.c b/gtk/gtklistitem.c
index 68c9e92..d013462 100644
--- a/gtk/gtklistitem.c
+++ b/gtk/gtklistitem.c
@@ -431,7 +431,7 @@ gtk_list_item_realize (GtkWidget *widget)
g_return_if_fail (GTK_IS_LIST_ITEM (widget));
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
attributes.x = widget->allocation.x;
attributes.y = widget->allocation.y;
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index 083c133..cbc95ad 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -2263,7 +2263,7 @@ gtk_menu_realize (GtkWidget *widget)
menu = GTK_MENU (widget);
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x;
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index 4b26231..3d47499 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -1129,7 +1129,7 @@ gtk_menu_item_realize (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
widget->window = gtk_widget_get_parent_window (widget);
g_object_ref (widget->window);
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c
index 4a86b20..4788590 100644
--- a/gtk/gtkmenushell.c
+++ b/gtk/gtkmenushell.c
@@ -513,7 +513,7 @@ gtk_menu_shell_realize (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
attributes.x = widget->allocation.x;
attributes.y = widget->allocation.y;
diff --git a/gtk/gtkmisc.c b/gtk/gtkmisc.c
index e625f38..93d8421 100644
--- a/gtk/gtkmisc.c
+++ b/gtk/gtkmisc.c
@@ -308,7 +308,7 @@ gtk_misc_realize (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
if (!gtk_widget_get_has_window (widget))
{
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index fb3fa7d..a8e99db 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -1798,7 +1798,8 @@ gtk_notebook_realize (GtkWidget *widget)
GdkRectangle event_window_pos;
notebook = GTK_NOTEBOOK (widget);
- GTK_WIDGET_SET_FLAGS (notebook, GTK_REALIZED);
+
+ gtk_widget_set_realized (widget, TRUE);
gtk_notebook_get_event_window_position (notebook, &event_window_pos);
diff --git a/gtk/gtkoffscreenwindow.c b/gtk/gtkoffscreenwindow.c
index 78818e4..0633a78 100644
--- a/gtk/gtkoffscreenwindow.c
+++ b/gtk/gtkoffscreenwindow.c
@@ -125,7 +125,7 @@ gtk_offscreen_window_realize (GtkWidget *widget)
bin = GTK_BIN (widget);
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index 6fa4688..1e98163 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -978,7 +978,7 @@ gtk_paned_realize (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
paned = GTK_PANED (widget);
widget->window = gtk_widget_get_parent_window (widget);
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index 69d3b62..48eec63 100644
--- a/gtk/gtkpathbar.c
+++ b/gtk/gtkpathbar.c
@@ -408,7 +408,7 @@ gtk_path_bar_realize (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
path_bar = GTK_PATH_BAR (widget);
widget->window = gtk_widget_get_parent_window (widget);
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
index 45352f2..8de5b2f 100644
--- a/gtk/gtkplug.c
+++ b/gtk/gtkplug.c
@@ -607,7 +607,7 @@ gtk_plug_realize (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD; /* XXX GDK_WINDOW_PLUG ? */
attributes.title = window->title;
diff --git a/gtk/gtkpreview.c b/gtk/gtkpreview.c
index fa74ebd..458fed4 100644
--- a/gtk/gtkpreview.c
+++ b/gtk/gtkpreview.c
@@ -420,7 +420,7 @@ gtk_preview_realize (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD;
diff --git a/gtk/gtkprogress.c b/gtk/gtkprogress.c
index ef062bb..8f46de4 100644
--- a/gtk/gtkprogress.c
+++ b/gtk/gtkprogress.c
@@ -212,7 +212,7 @@ gtk_progress_realize (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x;
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 85cb85f..ab295b9 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -1495,7 +1495,7 @@ gtk_range_realize (GtkWidget *widget)
gtk_range_calc_layout (range, range->adjustment->value);
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
widget->window = gtk_widget_get_parent_window (widget);
g_object_ref (widget->window);
diff --git a/gtk/gtkruler.c b/gtk/gtkruler.c
index ae86b0b..d066775 100644
--- a/gtk/gtkruler.c
+++ b/gtk/gtkruler.c
@@ -441,7 +441,8 @@ gtk_ruler_realize (GtkWidget *widget)
gint attributes_mask;
ruler = GTK_RULER (widget);
- GTK_WIDGET_SET_FLAGS (ruler, GTK_REALIZED);
+
+ gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x;
diff --git a/gtk/gtksocket.c b/gtk/gtksocket.c
index fc15775..847ee9f 100644
--- a/gtk/gtksocket.c
+++ b/gtk/gtksocket.c
@@ -326,7 +326,7 @@ gtk_socket_realize (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x;
@@ -390,7 +390,7 @@ gtk_socket_unrealize (GtkWidget *widget)
{
GtkSocket *socket = GTK_SOCKET (widget);
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, FALSE);
if (socket->plug_widget)
{
diff --git a/gtk/gtktext.c b/gtk/gtktext.c
index 543bd2c..5fdbb38 100644
--- a/gtk/gtktext.c
+++ b/gtk/gtktext.c
@@ -1239,7 +1239,7 @@ gtk_text_realize (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
- GTK_WIDGET_SET_FLAGS (text, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x;
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 6f62590..0504f59 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -3827,7 +3827,8 @@ gtk_text_view_realize (GtkWidget *widget)
GSList *tmp_list;
text_view = GTK_TEXT_VIEW (widget);
- GTK_WIDGET_SET_FLAGS (text_view, GTK_REALIZED);
+
+ gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x;
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index 36b0e9a..8f065a7 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -813,7 +813,7 @@ gtk_toolbar_realize (GtkWidget *widget)
gint attributes_mask;
gint border_width;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
border_width = GTK_CONTAINER (widget)->border_width;
diff --git a/gtk/gtktoolitem.c b/gtk/gtktoolitem.c
index da2e45f..606ce1e 100644
--- a/gtk/gtktoolitem.c
+++ b/gtk/gtktoolitem.c
@@ -462,7 +462,7 @@ gtk_tool_item_realize (GtkWidget *widget)
GtkToolItem *toolitem;
toolitem = GTK_TOOL_ITEM (widget);
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
widget->window = gtk_widget_get_parent_window (widget);
g_object_ref (widget->window);
diff --git a/gtk/gtktoolitemgroup.c b/gtk/gtktoolitemgroup.c
index 7f1db34..ecff531 100644
--- a/gtk/gtktoolitemgroup.c
+++ b/gtk/gtktoolitemgroup.c
@@ -1181,7 +1181,7 @@ gtk_tool_item_group_realize (GtkWidget *widget)
gdk_window_set_user_data (widget->window, widget);
widget->style = gtk_style_attach (widget->style, widget->window);
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
gtk_container_forall (GTK_CONTAINER (widget),
(GtkCallback) gtk_widget_set_parent_window,
diff --git a/gtk/gtktoolpalette.c b/gtk/gtktoolpalette.c
index 94ea452..e7b9400 100644
--- a/gtk/gtktoolpalette.c
+++ b/gtk/gtktoolpalette.c
@@ -672,7 +672,7 @@ gtk_tool_palette_realize (GtkWidget *widget)
gdk_window_set_user_data (widget->window, widget);
widget->style = gtk_style_attach (widget->style, widget->window);
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
gtk_container_forall (GTK_CONTAINER (widget),
(GtkCallback) gtk_widget_set_parent_window,
diff --git a/gtk/gtktree.c b/gtk/gtktree.c
index f3e6f7f..1ac137a 100644
--- a/gtk/gtktree.c
+++ b/gtk/gtktree.c
@@ -560,7 +560,7 @@ gtk_tree_realize (GtkWidget *widget)
g_return_if_fail (GTK_IS_TREE (widget));
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x;
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 3b80571..f11f6f2 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -1767,7 +1767,7 @@ gtk_tree_view_realize (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
/* Make the main, clipping window */
attributes.window_type = GDK_WINDOW_CHILD;
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index e36ae68..bfda9f2 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -588,7 +588,7 @@ gtk_viewport_realize (GtkWidget *widget)
gint attributes_mask;
gint event_mask;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
attributes.x = widget->allocation.x + border_width;
attributes.y = widget->allocation.y + border_width;
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index c0549c2..275f06e 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -5989,9 +5989,9 @@ gtk_widget_set_realized (GtkWidget *widget,
g_return_if_fail (GTK_IS_WIDGET (widget));
if (realized)
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ GTK_OBJECT_FLAGS (widget) |= GTK_REALIZED;
else
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED);
+ GTK_OBJECT_FLAGS (widget) &= ~(GTK_REALIZED);
}
/**
@@ -8793,7 +8793,7 @@ gtk_widget_real_realize (GtkWidget *widget)
{
g_assert (!gtk_widget_get_has_window (widget));
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
if (widget->parent)
{
widget->window = gtk_widget_get_parent_window (widget);
@@ -8847,7 +8847,7 @@ gtk_widget_real_unrealize (GtkWidget *widget)
gtk_selection_remove_all (widget);
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, FALSE);
}
static void
diff --git a/gtk/gtkwin32embedwidget.c b/gtk/gtkwin32embedwidget.c
index 7604923..e710a8b 100644
--- a/gtk/gtkwin32embedwidget.c
+++ b/gtk/gtkwin32embedwidget.c
@@ -200,7 +200,7 @@ gtk_win32_embed_widget_realize (GtkWidget *widget)
g_return_if_fail (!gtk_widget_get_realized (widget));
}
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
attributes.window_type = GDK_WINDOW_CHILD;
attributes.title = window->title;
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 8d05b77..577f672 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -4742,7 +4742,7 @@ gtk_window_realize (GtkWidget *widget)
g_return_if_fail (!gtk_widget_get_realized (widget));
}
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
switch (window->type)
{
diff --git a/tests/gtkoffscreenbox.c b/tests/gtkoffscreenbox.c
index 760810c..b6caa14 100644
--- a/tests/gtkoffscreenbox.c
+++ b/tests/gtkoffscreenbox.c
@@ -238,7 +238,7 @@ gtk_offscreen_box_realize (GtkWidget *widget)
GtkRequisition child_requisition;
int start_y = 0;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
border_width = GTK_CONTAINER (widget)->border_width;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]