summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2010-03-06 11:29:31 +0100
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2010-04-03 20:59:02 -0400
commite2f79c33ff9dd1c726966cc069e06578a1e38fad (patch)
treead6380c1018e97db676ecf3caf7640826a61199c /gtk
parente5aca4ac884478a3f7658171c5add9acfe794392 (diff)
downloadgtk+-e2f79c33ff9dd1c726966cc069e06578a1e38fad.tar.gz
Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_NO_WINDOW)
Use new API instead: gtk_widget_set_has_window () https://bugzilla.gnome.org/show_bug.cgi?id=69872
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkalignment.c2
-rw-r--r--gtk/gtkarrow.c2
-rw-r--r--gtk/gtkbin.c2
-rw-r--r--gtk/gtkbox.c2
-rw-r--r--gtk/gtkbutton.c2
-rw-r--r--gtk/gtkcellview.c2
-rw-r--r--gtk/gtkcheckbutton.c2
-rw-r--r--gtk/gtkclist.c2
-rw-r--r--gtk/gtkexpander.c2
-rw-r--r--gtk/gtkhandlebox.c2
-rw-r--r--gtk/gtkhsv.c2
-rw-r--r--gtk/gtkimage.c2
-rw-r--r--gtk/gtkinvisible.c2
-rw-r--r--gtk/gtkitem.c2
-rw-r--r--gtk/gtklabel.c2
-rw-r--r--gtk/gtkmenuitem.c2
-rw-r--r--gtk/gtknotebook.c2
-rw-r--r--gtk/gtkpaned.c2
-rw-r--r--gtk/gtkpathbar.c2
-rw-r--r--gtk/gtkpixmap.c2
-rw-r--r--gtk/gtkprintunixdialog.c4
-rw-r--r--gtk/gtkradiobutton.c2
-rw-r--r--gtk/gtkrange.c2
-rw-r--r--gtk/gtkscrolledwindow.c2
-rw-r--r--gtk/gtkseparator.c2
-rw-r--r--gtk/gtkspinner.c2
-rw-r--r--gtk/gtktable.c2
-rw-r--r--gtk/gtktoolbar.c2
-rw-r--r--gtk/gtkviewport.c2
-rw-r--r--gtk/gtkwidget.c4
-rw-r--r--gtk/gtkwindow.c2
31 files changed, 33 insertions, 33 deletions
diff --git a/gtk/gtkalignment.c b/gtk/gtkalignment.c
index 4573c14006..3accb4ddb7 100644
--- a/gtk/gtkalignment.c
+++ b/gtk/gtkalignment.c
@@ -200,7 +200,7 @@ gtk_alignment_init (GtkAlignment *alignment)
{
GtkAlignmentPrivate *priv;
- GTK_WIDGET_SET_FLAGS (alignment, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (alignment), FALSE);
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (alignment), FALSE);
alignment->xalign = 0.5;
diff --git a/gtk/gtkarrow.c b/gtk/gtkarrow.c
index 22a5870fe0..5a432d5cf8 100644
--- a/gtk/gtkarrow.c
+++ b/gtk/gtkarrow.c
@@ -146,7 +146,7 @@ gtk_arrow_get_property (GObject *object,
static void
gtk_arrow_init (GtkArrow *arrow)
{
- GTK_WIDGET_SET_FLAGS (arrow, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (arrow), FALSE);
GTK_WIDGET (arrow)->requisition.width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2;
GTK_WIDGET (arrow)->requisition.height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2;
diff --git a/gtk/gtkbin.c b/gtk/gtkbin.c
index 3a503c2685..8da28ef188 100644
--- a/gtk/gtkbin.c
+++ b/gtk/gtkbin.c
@@ -63,7 +63,7 @@ gtk_bin_class_init (GtkBinClass *class)
static void
gtk_bin_init (GtkBin *bin)
{
- GTK_WIDGET_SET_FLAGS (bin, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (bin), FALSE);
bin->child = NULL;
}
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c
index e4c1c87bbd..a0217f08b7 100644
--- a/gtk/gtkbox.c
+++ b/gtk/gtkbox.c
@@ -210,7 +210,7 @@ gtk_box_init (GtkBox *box)
{
GtkBoxPrivate *private = GTK_BOX_GET_PRIVATE (box);
- GTK_WIDGET_SET_FLAGS (box, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (box), FALSE);
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (box), FALSE);
box->children = NULL;
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 8192fbad45..9f359c4d87 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -542,7 +542,7 @@ gtk_button_init (GtkButton *button)
gtk_widget_set_can_focus (GTK_WIDGET (button), TRUE);
gtk_widget_set_receives_default (GTK_WIDGET (button), TRUE);
- GTK_WIDGET_SET_FLAGS (button, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (button), FALSE);
button->label_text = NULL;
diff --git a/gtk/gtkcellview.c b/gtk/gtkcellview.c
index 831a5a3c04..382cc6e0e1 100644
--- a/gtk/gtkcellview.c
+++ b/gtk/gtkcellview.c
@@ -295,7 +295,7 @@ gtk_cell_view_set_property (GObject *object,
static void
gtk_cell_view_init (GtkCellView *cellview)
{
- GTK_WIDGET_SET_FLAGS (cellview, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (cellview), FALSE);
cellview->priv = GTK_CELL_VIEW_GET_PRIVATE (cellview);
}
diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c
index 5309296b8a..ed94e3caa0 100644
--- a/gtk/gtkcheckbutton.c
+++ b/gtk/gtkcheckbutton.c
@@ -85,7 +85,7 @@ gtk_check_button_class_init (GtkCheckButtonClass *class)
static void
gtk_check_button_init (GtkCheckButton *check_button)
{
- GTK_WIDGET_SET_FLAGS (check_button, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (check_button), FALSE);
gtk_widget_set_receives_default (GTK_WIDGET (check_button), FALSE);
GTK_TOGGLE_BUTTON (check_button)->draw_indicator = TRUE;
GTK_BUTTON (check_button)->depress_on_activate = FALSE;
diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c
index 11cef81c88..661bda88f5 100644
--- a/gtk/gtkclist.c
+++ b/gtk/gtkclist.c
@@ -1009,7 +1009,7 @@ gtk_clist_init (GtkCList *clist)
{
clist->flags = 0;
- GTK_WIDGET_UNSET_FLAGS (clist, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (clist), TRUE);
gtk_widget_set_can_focus (GTK_WIDGET (clist), TRUE);
GTK_CLIST_SET_FLAG (clist, CLIST_DRAW_DRAG_LINE);
GTK_CLIST_SET_FLAG (clist, CLIST_USE_DRAG_ICONS);
diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c
index 55fd004f76..eb474041f4 100644
--- a/gtk/gtkexpander.c
+++ b/gtk/gtkexpander.c
@@ -267,7 +267,7 @@ gtk_expander_init (GtkExpander *expander)
expander->priv = priv = GTK_EXPANDER_GET_PRIVATE (expander);
gtk_widget_set_can_focus (GTK_WIDGET (expander), TRUE);
- GTK_WIDGET_SET_FLAGS (expander, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (expander), FALSE);
priv->label_widget = NULL;
priv->event_window = NULL;
diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c
index d0ecd63d94..720d7fcc31 100644
--- a/gtk/gtkhandlebox.c
+++ b/gtk/gtkhandlebox.c
@@ -259,7 +259,7 @@ gtk_handle_box_get_private (GtkHandleBox *hb)
static void
gtk_handle_box_init (GtkHandleBox *handle_box)
{
- GTK_WIDGET_UNSET_FLAGS (handle_box, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (handle_box), TRUE);
handle_box->bin_window = NULL;
handle_box->float_window = NULL;
diff --git a/gtk/gtkhsv.c b/gtk/gtkhsv.c
index 71d4545bba..704b69e7ed 100644
--- a/gtk/gtkhsv.c
+++ b/gtk/gtkhsv.c
@@ -213,7 +213,7 @@ gtk_hsv_init (GtkHSV *hsv)
hsv->priv = priv;
- GTK_WIDGET_SET_FLAGS (hsv, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (hsv), FALSE);
gtk_widget_set_can_focus (GTK_WIDGET (hsv), TRUE);
priv->h = 0.0;
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index e5bae41c09..d316dc35df 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -357,7 +357,7 @@ gtk_image_init (GtkImage *image)
{
GtkImagePrivate *priv = GTK_IMAGE_GET_PRIVATE (image);
- GTK_WIDGET_SET_FLAGS (image, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (image), FALSE);
image->storage_type = GTK_IMAGE_EMPTY;
image->icon_size = DEFAULT_ICON_SIZE;
diff --git a/gtk/gtkinvisible.c b/gtk/gtkinvisible.c
index 0885d6c16a..0ca218dfa9 100644
--- a/gtk/gtkinvisible.c
+++ b/gtk/gtkinvisible.c
@@ -94,7 +94,7 @@ gtk_invisible_init (GtkInvisible *invisible)
{
GdkColormap *colormap;
- GTK_WIDGET_UNSET_FLAGS (invisible, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (invisible), TRUE);
GTK_WIDGET_SET_FLAGS (invisible, GTK_TOPLEVEL);
g_object_ref_sink (invisible);
diff --git a/gtk/gtkitem.c b/gtk/gtkitem.c
index dde270169c..cc5e3df0b4 100644
--- a/gtk/gtkitem.c
+++ b/gtk/gtkitem.c
@@ -97,7 +97,7 @@ gtk_item_class_init (GtkItemClass *class)
static void
gtk_item_init (GtkItem *item)
{
- GTK_WIDGET_UNSET_FLAGS (item, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (item), TRUE);
}
void
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index f6b2a7b18e..46c072e138 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -1068,7 +1068,7 @@ gtk_label_init (GtkLabel *label)
{
GtkLabelPrivate *priv;
- GTK_WIDGET_SET_FLAGS (label, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (label), FALSE);
priv = GTK_LABEL_GET_PRIVATE (label);
priv->width_chars = -1;
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index b45c964930..4b26231441 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -392,7 +392,7 @@ gtk_menu_item_init (GtkMenuItem *menu_item)
{
GtkMenuItemPrivate *priv = GET_PRIVATE (menu_item);
- GTK_WIDGET_SET_FLAGS (menu_item, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (menu_item), FALSE);
priv->action = NULL;
priv->use_action_appearance = TRUE;
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 6c5861098b..fb3fa7d901 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -1072,7 +1072,7 @@ gtk_notebook_init (GtkNotebook *notebook)
GtkNotebookPrivate *priv;
gtk_widget_set_can_focus (GTK_WIDGET (notebook), TRUE);
- GTK_WIDGET_SET_FLAGS (notebook, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (notebook), FALSE);
priv = GTK_NOTEBOOK_GET_PRIVATE (notebook);
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index 8687ef701c..6fa46888c4 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -559,7 +559,7 @@ gtk_paned_child_type (GtkContainer *container)
static void
gtk_paned_init (GtkPaned *paned)
{
- GTK_WIDGET_SET_FLAGS (paned, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (paned), FALSE);
gtk_widget_set_can_focus (GTK_WIDGET (paned), TRUE);
/* We only need to redraw when the handle position moves, which is
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index b7b6cd22e1..69d3b62c64 100644
--- a/gtk/gtkpathbar.c
+++ b/gtk/gtkpathbar.c
@@ -169,7 +169,7 @@ get_slider_button (GtkPathBar *path_bar,
static void
gtk_path_bar_init (GtkPathBar *path_bar)
{
- GTK_WIDGET_SET_FLAGS (path_bar, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (path_bar), FALSE);
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (path_bar), FALSE);
path_bar->get_info_cancellable = NULL;
diff --git a/gtk/gtkpixmap.c b/gtk/gtkpixmap.c
index 3f1a586f5e..0604bc0408 100644
--- a/gtk/gtkpixmap.c
+++ b/gtk/gtkpixmap.c
@@ -63,7 +63,7 @@ gtk_pixmap_class_init (GtkPixmapClass *class)
static void
gtk_pixmap_init (GtkPixmap *pixmap)
{
- GTK_WIDGET_SET_FLAGS (pixmap, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (pixmap), FALSE);
pixmap->pixmap = NULL;
pixmap->mask = NULL;
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index 95e7c06ee3..c3edb789a7 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -2270,7 +2270,7 @@ create_main_page (GtkPrintUnixDialog *dialog)
0, 0);
image = gtk_drawing_area_new ();
- GTK_WIDGET_SET_FLAGS (image, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (image, FALSE);
priv->collate_image = image;
gtk_widget_show (image);
@@ -3500,7 +3500,7 @@ create_page_setup_page (GtkPrintUnixDialog *dialog)
gtk_box_pack_start (GTK_BOX (main_vbox), hbox2, TRUE, TRUE, 0);
draw = gtk_drawing_area_new ();
- GTK_WIDGET_SET_FLAGS (draw, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (draw, FALSE);
priv->page_layout_preview = draw;
gtk_widget_set_size_request (draw, 350, 200);
g_signal_connect (draw, "expose-event", G_CALLBACK (draw_page_cb), dialog);
diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c
index 2da7a73541..45265ce7a6 100644
--- a/gtk/gtkradiobutton.c
+++ b/gtk/gtkradiobutton.c
@@ -118,7 +118,7 @@ gtk_radio_button_class_init (GtkRadioButtonClass *class)
static void
gtk_radio_button_init (GtkRadioButton *radio_button)
{
- GTK_WIDGET_SET_FLAGS (radio_button, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (radio_button), FALSE);
gtk_widget_set_receives_default (GTK_WIDGET (radio_button), FALSE);
GTK_TOGGLE_BUTTON (radio_button)->active = TRUE;
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 567a649046..85cb85f681 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -654,7 +654,7 @@ gtk_range_get_property (GObject *object,
static void
gtk_range_init (GtkRange *range)
{
- GTK_WIDGET_SET_FLAGS (range, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (range), FALSE);
range->orientation = GTK_ORIENTATION_HORIZONTAL;
range->adjustment = NULL;
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index f5e9b1c593..7d26d7ca95 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -368,7 +368,7 @@ gtk_scrolled_window_class_init (GtkScrolledWindowClass *class)
static void
gtk_scrolled_window_init (GtkScrolledWindow *scrolled_window)
{
- GTK_WIDGET_SET_FLAGS (scrolled_window, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (scrolled_window), FALSE);
gtk_widget_set_can_focus (GTK_WIDGET (scrolled_window), TRUE);
scrolled_window->hscrollbar = NULL;
diff --git a/gtk/gtkseparator.c b/gtk/gtkseparator.c
index f69860c5be..a172240f64 100644
--- a/gtk/gtkseparator.c
+++ b/gtk/gtkseparator.c
@@ -94,7 +94,7 @@ gtk_separator_init (GtkSeparator *separator)
GtkWidget *widget = GTK_WIDGET (separator);
GtkSeparatorPrivate *private = GTK_SEPARATOR_GET_PRIVATE (separator);
- GTK_WIDGET_SET_FLAGS (separator, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (separator), FALSE);
private->orientation = GTK_ORIENTATION_HORIZONTAL;
diff --git a/gtk/gtkspinner.c b/gtk/gtkspinner.c
index 39a36a23fd..736b03f406 100644
--- a/gtk/gtkspinner.c
+++ b/gtk/gtkspinner.c
@@ -211,7 +211,7 @@ gtk_spinner_init (GtkSpinner *spinner)
spinner->priv = priv;
- GTK_WIDGET_SET_FLAGS (GTK_WIDGET (spinner), GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (spinner), FALSE);
}
static gboolean
diff --git a/gtk/gtktable.c b/gtk/gtktable.c
index 4c3b7b5477..dd14bedecc 100644
--- a/gtk/gtktable.c
+++ b/gtk/gtktable.c
@@ -441,7 +441,7 @@ gtk_table_get_child_property (GtkContainer *container,
static void
gtk_table_init (GtkTable *table)
{
- GTK_WIDGET_SET_FLAGS (table, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (table), FALSE);
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (table), FALSE);
table->children = NULL;
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index b8d7464c91..36b0e9a2a6 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -668,7 +668,7 @@ gtk_toolbar_init (GtkToolbar *toolbar)
GtkToolbarPrivate *priv;
gtk_widget_set_can_focus (GTK_WIDGET (toolbar), FALSE);
- GTK_WIDGET_SET_FLAGS (toolbar, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (toolbar), FALSE);
priv = GTK_TOOLBAR_GET_PRIVATE (toolbar);
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index b414fe6273..e36ae687b6 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -203,7 +203,7 @@ gtk_viewport_get_property (GObject *object,
static void
gtk_viewport_init (GtkViewport *viewport)
{
- GTK_WIDGET_UNSET_FLAGS (viewport, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (viewport), TRUE);
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (viewport), FALSE);
gtk_container_set_resize_mode (GTK_CONTAINER (viewport), GTK_RESIZE_QUEUE);
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 41c230b2ad..bd46ab7f6a 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -5903,9 +5903,9 @@ gtk_widget_set_has_window (GtkWidget *widget,
g_return_if_fail (GTK_IS_WIDGET (widget));
if (has_window)
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_NO_WINDOW);
+ GTK_OBJECT_FLAGS (widget) &= ~(GTK_NO_WINDOW);
else
- GTK_WIDGET_SET_FLAGS (widget, GTK_NO_WINDOW);
+ GTK_OBJECT_FLAGS (widget) |= GTK_NO_WINDOW;
}
/**
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 2ef3de3dc7..8d05b77b1b 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -900,7 +900,7 @@ gtk_window_init (GtkWindow *window)
GdkColormap *colormap;
GtkWindowPrivate *priv = GTK_WINDOW_GET_PRIVATE (window);
- GTK_WIDGET_UNSET_FLAGS (window, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (window), TRUE);
GTK_WIDGET_SET_FLAGS (window, GTK_TOPLEVEL);
GTK_PRIVATE_SET_FLAG (window, GTK_ANCHORED);