mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
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
This commit is contained in:
parent
e5aca4ac88
commit
e2f79c33ff
@ -166,7 +166,7 @@ gtk_rotated_bin_class_init (GtkRotatedBinClass *klass)
|
||||
static void
|
||||
gtk_rotated_bin_init (GtkRotatedBin *bin)
|
||||
{
|
||||
GTK_WIDGET_UNSET_FLAGS (bin, GTK_NO_WINDOW);
|
||||
gtk_widget_set_has_window (GTK_WIDGET (bin), TRUE);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
|
@ -104,7 +104,7 @@ gtk_mirror_bin_class_init (GtkMirrorBinClass *klass)
|
||||
static void
|
||||
gtk_mirror_bin_init (GtkMirrorBin *bin)
|
||||
{
|
||||
GTK_WIDGET_UNSET_FLAGS (bin, GTK_NO_WINDOW);
|
||||
gtk_widget_set_has_window (GTK_WIDGET (bin), TRUE);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
|
@ -131,7 +131,7 @@ gtk_offscreen_box_class_init (GtkOffscreenBoxClass *klass)
|
||||
static void
|
||||
gtk_offscreen_box_init (GtkOffscreenBox *offscreen_box)
|
||||
{
|
||||
GTK_WIDGET_UNSET_FLAGS (offscreen_box, GTK_NO_WINDOW);
|
||||
gtk_widget_set_has_window (GTK_WIDGET (offscreen_box), TRUE);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
|
Loading…
Reference in New Issue
Block a user