diff options
author | Benjamin Otte <otte@redhat.com> | 2020-02-14 20:55:36 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2020-02-14 21:18:49 +0100 |
commit | a278edab2271c3963ef5f323778300e996702ed3 (patch) | |
tree | 397b1829e3d4581900a58a7fd7216930824bcae4 | |
parent | c2bd4bc3cbc298c7cb4e4566e0622c7c201a95b0 (diff) | |
download | gtk+-a278edab2271c3963ef5f323778300e996702ed3.tar.gz |
window: Remove type argument from gtk_window_new()
190 files changed, 284 insertions, 298 deletions
diff --git a/demos/constraint-editor/constraint-editor-window.c b/demos/constraint-editor/constraint-editor-window.c index 823deb3c96..48d092c9da 100644 --- a/demos/constraint-editor/constraint-editor-window.c +++ b/demos/constraint-editor/constraint-editor-window.c @@ -400,7 +400,7 @@ edit_constraint (ConstraintEditorWindow *win, ConstraintEditor *editor; GListModel *model; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (win)); gtk_window_set_resizable (GTK_WINDOW (window), FALSE); if (constraint) @@ -440,7 +440,7 @@ edit_guide (ConstraintEditorWindow *win, GtkWidget *window; GuideEditor *editor; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_resizable (GTK_WINDOW (window), FALSE); gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (win)); gtk_window_set_title (GTK_WINDOW (window), "Edit Guide"); diff --git a/demos/gtk-demo/clipboard.c b/demos/gtk-demo/clipboard.c index c5a83d7e05..97d0579f1d 100644 --- a/demos/gtk-demo/clipboard.c +++ b/demos/gtk-demo/clipboard.c @@ -280,7 +280,7 @@ do_clipboard (GtkWidget *do_widget) GtkDropTarget *dest; GdkContentFormats *formats; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Clipboard"); diff --git a/demos/gtk-demo/colorsel.c b/demos/gtk-demo/colorsel.c index 5ebdfd6a12..fa19813d2e 100644 --- a/demos/gtk-demo/colorsel.c +++ b/demos/gtk-demo/colorsel.c @@ -69,7 +69,7 @@ do_colorsel (GtkWidget *do_widget) color.green = 0; color.alpha = 1; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Color Chooser"); diff --git a/demos/gtk-demo/combobox.c b/demos/gtk-demo/combobox.c index bfbda60791..ddf849f6a8 100644 --- a/demos/gtk-demo/combobox.c +++ b/demos/gtk-demo/combobox.c @@ -310,7 +310,7 @@ do_combobox (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Combo Boxes"); diff --git a/demos/gtk-demo/constraints.c b/demos/gtk-demo/constraints.c index 1b6b00b2f5..6c6fc30dab 100644 --- a/demos/gtk-demo/constraints.c +++ b/demos/gtk-demo/constraints.c @@ -255,7 +255,7 @@ do_constraints (GtkWidget *do_widget) { GtkWidget *header, *box, *grid, *button; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); header = gtk_header_bar_new (); diff --git a/demos/gtk-demo/constraints2.c b/demos/gtk-demo/constraints2.c index 7ec7e09520..beb9c19ba9 100644 --- a/demos/gtk-demo/constraints2.c +++ b/demos/gtk-demo/constraints2.c @@ -211,7 +211,7 @@ do_constraints2 (GtkWidget *do_widget) { GtkWidget *header, *box, *grid, *button; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); header = gtk_header_bar_new (); diff --git a/demos/gtk-demo/constraints3.c b/demos/gtk-demo/constraints3.c index 648f38125b..ec384e88bd 100644 --- a/demos/gtk-demo/constraints3.c +++ b/demos/gtk-demo/constraints3.c @@ -131,7 +131,7 @@ do_constraints3 (GtkWidget *do_widget) { GtkWidget *header, *box, *grid, *button; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); header = gtk_header_bar_new (); diff --git a/demos/gtk-demo/css_accordion.c b/demos/gtk-demo/css_accordion.c index 40c664f4ed..648393a506 100644 --- a/demos/gtk-demo/css_accordion.c +++ b/demos/gtk-demo/css_accordion.c @@ -24,7 +24,7 @@ do_css_accordion (GtkWidget *do_widget) GtkWidget *container, *child; GtkStyleProvider *provider; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "CSS Accordion"); gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (do_widget)); gtk_window_set_default_size (GTK_WINDOW (window), 600, 300); diff --git a/demos/gtk-demo/css_basics.c b/demos/gtk-demo/css_basics.c index 06b36483ed..83e408dd68 100644 --- a/demos/gtk-demo/css_basics.c +++ b/demos/gtk-demo/css_basics.c @@ -72,7 +72,7 @@ do_css_basics (GtkWidget *do_widget) GtkTextBuffer *text; GBytes *bytes; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "CSS Basics"); gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (do_widget)); gtk_window_set_default_size (GTK_WINDOW (window), 400, 300); diff --git a/demos/gtk-demo/css_multiplebgs.c b/demos/gtk-demo/css_multiplebgs.c index 6475c2c31a..056b647e69 100644 --- a/demos/gtk-demo/css_multiplebgs.c +++ b/demos/gtk-demo/css_multiplebgs.c @@ -86,7 +86,7 @@ do_css_multiplebgs (GtkWidget *do_widget) GtkTextBuffer *text; GBytes *bytes; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Multiple Backgrounds"); gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (do_widget)); gtk_window_set_default_size (GTK_WINDOW (window), 400, 300); diff --git a/demos/gtk-demo/css_pixbufs.c b/demos/gtk-demo/css_pixbufs.c index 4846102ac3..e60a7d4e87 100644 --- a/demos/gtk-demo/css_pixbufs.c +++ b/demos/gtk-demo/css_pixbufs.c @@ -72,7 +72,7 @@ do_css_pixbufs (GtkWidget *do_widget) GtkTextBuffer *text; GBytes *bytes; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Animated Backgrounds"); gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (do_widget)); gtk_window_set_default_size (GTK_WINDOW (window), 400, 300); diff --git a/demos/gtk-demo/css_shadows.c b/demos/gtk-demo/css_shadows.c index a61bd3bd03..2c6a640ad3 100644 --- a/demos/gtk-demo/css_shadows.c +++ b/demos/gtk-demo/css_shadows.c @@ -91,7 +91,7 @@ do_css_shadows (GtkWidget *do_widget) GtkTextBuffer *text; GBytes *bytes; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Shadows"); gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (do_widget)); gtk_window_set_default_size (GTK_WINDOW (window), 400, 300); diff --git a/demos/gtk-demo/dialog.c b/demos/gtk-demo/dialog.c index 70294af82f..f719dc3d18 100644 --- a/demos/gtk-demo/dialog.c +++ b/demos/gtk-demo/dialog.c @@ -105,7 +105,7 @@ do_dialog (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Dialogs and Message Boxes"); diff --git a/demos/gtk-demo/dnd.c b/demos/gtk-demo/dnd.c index c768398be5..bf82ccf37a 100644 --- a/demos/gtk-demo/dnd.c +++ b/demos/gtk-demo/dnd.c @@ -356,7 +356,7 @@ do_dnd (GtkWidget *do_widget) GtkGesture *multipress; GtkCssProvider *provider; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Drag-and-drop"); diff --git a/demos/gtk-demo/drawingarea.c b/demos/gtk-demo/drawingarea.c index 7c09677577..875c4b7feb 100644 --- a/demos/gtk-demo/drawingarea.c +++ b/demos/gtk-demo/drawingarea.c @@ -189,7 +189,7 @@ do_drawingarea (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Drawing Area"); diff --git a/demos/gtk-demo/editable_cells.c b/demos/gtk-demo/editable_cells.c index f3fe0a6e2c..05076594f7 100644 --- a/demos/gtk-demo/editable_cells.c +++ b/demos/gtk-demo/editable_cells.c @@ -345,7 +345,7 @@ do_editable_cells (GtkWidget *do_widget) GtkTreeModel *items_model; GtkTreeModel *numbers_model; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Editable Cells"); diff --git a/demos/gtk-demo/entry_completion.c b/demos/gtk-demo/entry_completion.c index 2f6315566d..3c35038d32 100644 --- a/demos/gtk-demo/entry_completion.c +++ b/demos/gtk-demo/entry_completion.c @@ -45,7 +45,7 @@ do_entry_completion (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Entry Completion"); diff --git a/demos/gtk-demo/entry_undo.c b/demos/gtk-demo/entry_undo.c index e94aefd529..089bc6b13c 100644 --- a/demos/gtk-demo/entry_undo.c +++ b/demos/gtk-demo/entry_undo.c @@ -20,7 +20,7 @@ do_entry_undo (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Entry Undo"); diff --git a/demos/gtk-demo/fixed.c b/demos/gtk-demo/fixed.c index 745b8c7288..95715c992a 100644 --- a/demos/gtk-demo/fixed.c +++ b/demos/gtk-demo/fixed.c @@ -124,7 +124,7 @@ create_demo_window (GtkWidget *do_widget) { GtkWidget *window, *sw, *fixed, *cube; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Fixed layout"); gtk_window_set_default_size (GTK_WINDOW (window), 600, 400); diff --git a/demos/gtk-demo/flowbox.c b/demos/gtk-demo/flowbox.c index 6d599a2c13..09acaf42f9 100644 --- a/demos/gtk-demo/flowbox.c +++ b/demos/gtk-demo/flowbox.c @@ -719,7 +719,7 @@ do_flowbox (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Flow Box"); diff --git a/demos/gtk-demo/gestures.c b/demos/gtk-demo/gestures.c index 4079ed950f..d50eb34b99 100644 --- a/demos/gtk-demo/gestures.c +++ b/demos/gtk-demo/gestures.c @@ -146,7 +146,7 @@ do_gestures (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 400, 400); gtk_window_set_title (GTK_WINDOW (window), "Gestures"); g_signal_connect (window, "destroy", diff --git a/demos/gtk-demo/glarea.c b/demos/gtk-demo/glarea.c index 21e88b63ae..8f55301ec4 100644 --- a/demos/gtk-demo/glarea.c +++ b/demos/gtk-demo/glarea.c @@ -389,7 +389,7 @@ create_glarea_window (GtkWidget *do_widget) GtkWidget *window, *box, *button, *controls; int i; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "OpenGL Area"); gtk_window_set_default_size (GTK_WINDOW (window), 400, 600); diff --git a/demos/gtk-demo/headerbar.c b/demos/gtk-demo/headerbar.c index 6784ea3905..dff42be3a4 100644 --- a/demos/gtk-demo/headerbar.c +++ b/demos/gtk-demo/headerbar.c @@ -23,7 +23,7 @@ do_headerbar (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window); diff --git a/demos/gtk-demo/hypertext.c b/demos/gtk-demo/hypertext.c index 5b6d42befc..6ced8931af 100644 --- a/demos/gtk-demo/hypertext.c +++ b/demos/gtk-demo/hypertext.c @@ -232,7 +232,7 @@ do_hypertext (GtkWidget *do_widget) GtkTextBuffer *buffer; GtkEventController *controller; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Hypertext"); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); diff --git a/demos/gtk-demo/iconview.c b/demos/gtk-demo/iconview.c index d650acec42..2e6c145a3d 100644 --- a/demos/gtk-demo/iconview.c +++ b/demos/gtk-demo/iconview.c @@ -250,7 +250,7 @@ do_iconview (GtkWidget *do_widget) GtkWidget *tool_bar; GtkWidget *home_button; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 650, 400); gtk_window_set_display (GTK_WINDOW (window), diff --git a/demos/gtk-demo/iconview_edit.c b/demos/gtk-demo/iconview_edit.c index 61c24563d4..a9b4f890b7 100644 --- a/demos/gtk-demo/iconview_edit.c +++ b/demos/gtk-demo/iconview_edit.c @@ -106,7 +106,7 @@ do_iconview_edit (GtkWidget *do_widget) GtkListStore *store; GtkCellRenderer *renderer; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); diff --git a/demos/gtk-demo/images.c b/demos/gtk-demo/images.c index c90de20f6d..c8e16094b1 100644 --- a/demos/gtk-demo/images.c +++ b/demos/gtk-demo/images.c @@ -331,7 +331,7 @@ do_images (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Images"); diff --git a/demos/gtk-demo/infobar.c b/demos/gtk-demo/infobar.c index e70e162334..89beca6584 100644 --- a/demos/gtk-demo/infobar.c +++ b/demos/gtk-demo/infobar.c @@ -53,7 +53,7 @@ do_infobar (GtkWidget *do_widget) { actions = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Info Bars"); diff --git a/demos/gtk-demo/links.c b/demos/gtk-demo/links.c index 0629ebfe84..feb2aafeb6 100644 --- a/demos/gtk-demo/links.c +++ b/demos/gtk-demo/links.c @@ -52,7 +52,7 @@ do_links (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Links"); diff --git a/demos/gtk-demo/list_store.c b/demos/gtk-demo/list_store.c index 4812c38efa..f0e992b87b 100644 --- a/demos/gtk-demo/list_store.c +++ b/demos/gtk-demo/list_store.c @@ -255,7 +255,7 @@ do_list_store (GtkWidget *do_widget) GtkWidget *treeview; /* create window, etc */ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "List Store"); diff --git a/demos/gtk-demo/listbox.c b/demos/gtk-demo/listbox.c index 4e70c2f979..6b9f3cf5d9 100644 --- a/demos/gtk-demo/listbox.c +++ b/demos/gtk-demo/listbox.c @@ -347,7 +347,7 @@ do_listbox (GtkWidget *do_widget) { avatar_pixbuf_other = gdk_pixbuf_new_from_resource_at_scale ("/listbox/apple-red.png", 32, 32, FALSE, NULL); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "List Box"); diff --git a/demos/gtk-demo/markup.c b/demos/gtk-demo/markup.c index a57c82fb96..a4ad195c19 100644 --- a/demos/gtk-demo/markup.c +++ b/demos/gtk-demo/markup.c @@ -54,7 +54,7 @@ do_markup (GtkWidget *do_widget) GtkWidget *header; GtkWidget *show_source; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_default_size (GTK_WINDOW (window), 450, 450); diff --git a/demos/gtk-demo/overlay.c b/demos/gtk-demo/overlay.c index 0e2f42a0e0..a663580b3b 100644 --- a/demos/gtk-demo/overlay.c +++ b/demos/gtk-demo/overlay.c @@ -31,7 +31,7 @@ do_overlay (GtkWidget *do_widget) int i, j; char *text; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 500, 510); gtk_window_set_title (GTK_WINDOW (window), "Interactive Overlay"); diff --git a/demos/gtk-demo/overlay2.c b/demos/gtk-demo/overlay2.c index f26a10dc5f..ac2b1fafa2 100644 --- a/demos/gtk-demo/overlay2.c +++ b/demos/gtk-demo/overlay2.c @@ -35,7 +35,7 @@ do_overlay2 (GtkWidget *do_widget) GtkTextIter start, end; GtkAdjustment *adjustment; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 500, 510); gtk_window_set_title (GTK_WINDOW (window), "Decorative Overlay"); diff --git a/demos/gtk-demo/paint.c b/demos/gtk-demo/paint.c index c783bee904..fa56b15d30 100644 --- a/demos/gtk-demo/paint.c +++ b/demos/gtk-demo/paint.c @@ -384,7 +384,7 @@ do_paint (GtkWidget *toplevel) { GtkWidget *draw_area, *headerbar, *colorbutton; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); draw_area = drawing_area_new (); gtk_container_add (GTK_CONTAINER (window), draw_area); diff --git a/demos/gtk-demo/paintable.c b/demos/gtk-demo/paintable.c index 3d20e99984..c4c31b61ca 100644 --- a/demos/gtk-demo/paintable.c +++ b/demos/gtk-demo/paintable.c @@ -156,7 +156,7 @@ do_paintable (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Nuclear Icon"); diff --git a/demos/gtk-demo/paintable_animated.c b/demos/gtk-demo/paintable_animated.c index b606764ca5..e81d9d2f94 100644 --- a/demos/gtk-demo/paintable_animated.c +++ b/demos/gtk-demo/paintable_animated.c @@ -188,7 +188,7 @@ do_paintable_animated (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Nuclear Animation"); diff --git a/demos/gtk-demo/paintable_mediastream.c b/demos/gtk-demo/paintable_mediastream.c index 797ccfadf5..a666b3d3e0 100644 --- a/demos/gtk-demo/paintable_mediastream.c +++ b/demos/gtk-demo/paintable_mediastream.c @@ -288,7 +288,7 @@ do_paintable_mediastream (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Nuclear MediaStream"); diff --git a/demos/gtk-demo/panes.c b/demos/gtk-demo/panes.c index e023cd22ba..2ed08a24fc 100644 --- a/demos/gtk-demo/panes.c +++ b/demos/gtk-demo/panes.c @@ -146,7 +146,7 @@ do_panes (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); diff --git a/demos/gtk-demo/password_entry.c b/demos/gtk-demo/password_entry.c index e92e625876..e43f650e30 100644 --- a/demos/gtk-demo/password_entry.c +++ b/demos/gtk-demo/password_entry.c @@ -36,7 +36,7 @@ do_password_entry (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); header = gtk_header_bar_new (); diff --git a/demos/gtk-demo/pickers.c b/demos/gtk-demo/pickers.c index b921afb5d2..fe739f7671 100644 --- a/demos/gtk-demo/pickers.c +++ b/demos/gtk-demo/pickers.c @@ -14,7 +14,7 @@ do_pickers (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Pickers"); diff --git a/demos/gtk-demo/pixbufs.c b/demos/gtk-demo/pixbufs.c index e82dae8805..eab22a464e 100644 --- a/demos/gtk-demo/pixbufs.c +++ b/demos/gtk-demo/pixbufs.c @@ -174,7 +174,7 @@ do_pixbufs (GtkWidget *do_widget) { GError *error; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Pixbufs"); diff --git a/demos/gtk-demo/popover.c b/demos/gtk-demo/popover.c index f3d8bcf5fe..a1726f8aab 100644 --- a/demos/gtk-demo/popover.c +++ b/demos/gtk-demo/popover.c @@ -130,7 +130,7 @@ do_popover (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Popovers"); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 24); g_object_set (box, "margin", 24, NULL); diff --git a/demos/gtk-demo/rotated_text.c b/demos/gtk-demo/rotated_text.c index ce286cbcc9..798fff44fd 100644 --- a/demos/gtk-demo/rotated_text.c +++ b/demos/gtk-demo/rotated_text.c @@ -178,7 +178,7 @@ do_rotated_text (GtkWidget *do_widget) PangoLayout *layout; PangoAttrList *attrs; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Rotated Text"); diff --git a/demos/gtk-demo/search_entry.c b/demos/gtk-demo/search_entry.c index 3519a2534c..a8b9b03e6c 100644 --- a/demos/gtk-demo/search_entry.c +++ b/demos/gtk-demo/search_entry.c @@ -250,7 +250,7 @@ do_search_entry (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Search Entry"); gtk_window_set_resizable (GTK_WINDOW (window), FALSE); diff --git a/demos/gtk-demo/search_entry2.c b/demos/gtk-demo/search_entry2.c index ea4bb62151..68a9de3faa 100644 --- a/demos/gtk-demo/search_entry2.c +++ b/demos/gtk-demo/search_entry2.c @@ -68,7 +68,7 @@ do_search_entry2 (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Delayed Search Entry"); gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (do_widget)); gtk_window_set_resizable (GTK_WINDOW (window), TRUE); diff --git a/demos/gtk-demo/sidebar.c b/demos/gtk-demo/sidebar.c index 4de18c4c91..3b092eac92 100644 --- a/demos/gtk-demo/sidebar.c +++ b/demos/gtk-demo/sidebar.c @@ -35,7 +35,7 @@ do_sidebar (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_resizable (GTK_WINDOW (window), TRUE); gtk_widget_set_size_request (window, 500, 350); diff --git a/demos/gtk-demo/sizegroup.c b/demos/gtk-demo/sizegroup.c index 2f62825778..1eebdb519a 100644 --- a/demos/gtk-demo/sizegroup.c +++ b/demos/gtk-demo/sizegroup.c @@ -100,7 +100,7 @@ do_sizegroup (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Size Groups"); gtk_window_set_resizable (GTK_WINDOW (window), FALSE); diff --git a/demos/gtk-demo/sliding_puzzle.c b/demos/gtk-demo/sliding_puzzle.c index 9486004605..95cc9dc073 100644 --- a/demos/gtk-demo/sliding_puzzle.c +++ b/demos/gtk-demo/sliding_puzzle.c @@ -462,7 +462,7 @@ do_sliding_puzzle (GtkWidget *do_widget) gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE); gtk_header_bar_pack_start (GTK_HEADER_BAR (header), restart); gtk_header_bar_pack_end (GTK_HEADER_BAR (header), tweak); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Sliding Puzzle"); diff --git a/demos/gtk-demo/tabs.c b/demos/gtk-demo/tabs.c index d1f78872ed..877d1e7c58 100644 --- a/demos/gtk-demo/tabs.c +++ b/demos/gtk-demo/tabs.c @@ -18,7 +18,7 @@ do_tabs (GtkWidget *do_widget) GtkTextBuffer *buffer; PangoTabArray *tabs; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Tabs"); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); diff --git a/demos/gtk-demo/tagged_entry.c b/demos/gtk-demo/tagged_entry.c index 6c3ec44de8..132724bf05 100644 --- a/demos/gtk-demo/tagged_entry.c +++ b/demos/gtk-demo/tagged_entry.c @@ -63,7 +63,7 @@ do_tagged_entry (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); header = gtk_header_bar_new (); diff --git a/demos/gtk-demo/textmask.c b/demos/gtk-demo/textmask.c index 0bc18aa30c..6457be2857 100644 --- a/demos/gtk-demo/textmask.c +++ b/demos/gtk-demo/textmask.c @@ -59,7 +59,7 @@ do_textmask (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_resizable (GTK_WINDOW (window), TRUE); gtk_widget_set_size_request (window, 400, 200); gtk_window_set_title (GTK_WINDOW (window), "Text Mask"); diff --git a/demos/gtk-demo/textscroll.c b/demos/gtk-demo/textscroll.c index 66be4a9fcc..08afc0ede5 100644 --- a/demos/gtk-demo/textscroll.c +++ b/demos/gtk-demo/textscroll.c @@ -180,7 +180,7 @@ do_textscroll (GtkWidget *do_widget) { GtkWidget *hbox; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Automatic Scrolling"); g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window); diff --git a/demos/gtk-demo/textundo.c b/demos/gtk-demo/textundo.c index fe057f00f3..770ec1cfbb 100644 --- a/demos/gtk-demo/textundo.c +++ b/demos/gtk-demo/textundo.c @@ -23,7 +23,7 @@ do_textundo (GtkWidget *do_widget) GtkTextBuffer *buffer; GtkTextIter iter; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_default_size (GTK_WINDOW (window), diff --git a/demos/gtk-demo/textview.c b/demos/gtk-demo/textview.c index 2a2298a14c..1810251c36 100644 --- a/demos/gtk-demo/textview.c +++ b/demos/gtk-demo/textview.c @@ -474,7 +474,7 @@ do_textview (GtkWidget *do_widget) GtkWidget *sw; GtkTextBuffer *buffer; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_default_size (GTK_WINDOW (window), @@ -588,7 +588,7 @@ easter_egg_callback (GtkWidget *button, g_object_unref (buffer); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); sw = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, diff --git a/demos/gtk-demo/theming_style_classes.c b/demos/gtk-demo/theming_style_classes.c index 4868c450e4..f67660678e 100644 --- a/demos/gtk-demo/theming_style_classes.c +++ b/demos/gtk-demo/theming_style_classes.c @@ -20,7 +20,7 @@ do_theming_style_classes (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Style Classes"); diff --git a/demos/gtk-demo/transparent.c b/demos/gtk-demo/transparent.c index 9f1e989856..65373b8943 100644 --- a/demos/gtk-demo/transparent.c +++ b/demos/gtk-demo/transparent.c @@ -18,7 +18,7 @@ do_transparent (GtkWidget *do_widget) GtkWidget *label; GtkWidget *picture; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_default_size (GTK_WINDOW (window), 450, 450); diff --git a/demos/gtk-demo/tree_store.c b/demos/gtk-demo/tree_store.c index 77a2f84408..8123793d42 100644 --- a/demos/gtk-demo/tree_store.c +++ b/demos/gtk-demo/tree_store.c @@ -390,7 +390,7 @@ do_tree_store (GtkWidget *do_widget) GtkTreeModel *model; /* create window, etc */ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Tree Store"); diff --git a/demos/gtk-demo/video_player.c b/demos/gtk-demo/video_player.c index 73e659d6a9..4b9e0622fc 100644 --- a/demos/gtk-demo/video_player.c +++ b/demos/gtk-demo/video_player.c @@ -63,7 +63,7 @@ do_video_player (GtkWidget *do_widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget)); gtk_window_set_title (GTK_WINDOW (window), "Video Player"); diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c index 3f8009fbbe..8a4de10fee 100644 --- a/docs/tools/widgets.c +++ b/docs/tools/widgets.c @@ -41,7 +41,7 @@ new_widget_info (const char *name, } else { - info->window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + info->window = gtk_window_new (); info->include_decorations = FALSE; gtk_widget_show (widget); gtk_container_add (GTK_CONTAINER (info->window), widget); @@ -711,7 +711,7 @@ create_window (void) WidgetInfo *info; GtkWidget *widget; - widget = gtk_window_new (GTK_WINDOW_TOPLEVEL); + widget = gtk_window_new (); info = new_widget_info ("window", widget, MEDIUM); info->include_decorations = TRUE; gtk_window_set_title (GTK_WINDOW (info->window), "Window"); @@ -1016,7 +1016,7 @@ create_volume_button (void) GtkWidget *widget; GtkWidget *popup; - widget = gtk_window_new (GTK_WINDOW_TOPLEVEL); + widget = gtk_window_new (); gtk_widget_set_size_request (widget, 100, 250); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); @@ -1129,7 +1129,7 @@ create_headerbar (void) GtkWidget *view; GtkWidget *button; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); view = gtk_text_view_new (); gtk_widget_show (view); gtk_widget_set_size_request (window, 220, 150); diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 8fb03f784a..631c308e2d 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -68,7 +68,7 @@ * gtk_init (); * * // Create the main window - * mainwin = gtk_window_new (GTK_WINDOW_TOPLEVEL); + * mainwin = gtk_window_new (); * * // Set up our GUI elements * diff --git a/gtk/gtkprintoperation-win32.c b/gtk/gtkprintoperation-win32.c index 82e604a759..1022dbd133 100644 --- a/gtk/gtkprintoperation-win32.c +++ b/gtk/gtkprintoperation-win32.c @@ -1756,7 +1756,7 @@ gtk_print_operation_run_with_dialog (GtkPrintOperation *op, if (parent == NULL) { - invisible = gtk_window_new (GTK_WINDOW_TOPLEVEL); + invisible = gtk_window_new (); parentHWnd = get_parent_hwnd (invisible); } else diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c index 45f3cf2ab5..e853791142 100644 --- a/gtk/gtkradiobutton.c +++ b/gtk/gtkradiobutton.c @@ -97,7 +97,7 @@ * void create_radio_buttons (void) { * * GtkWidget *window, *radio1, *radio2, *box, *entry; - * window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + * window = gtk_window_new (); * box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2); * gtk_box_set_homogeneous (GTK_BOX (box), TRUE); * diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c index e199433db9..2248e7ffb4 100644 --- a/gtk/gtkspinbutton.c +++ b/gtk/gtkspinbutton.c @@ -140,7 +140,7 @@ * * adjustment = gtk_adjustment_new (50.0, 0.0, 100.0, 1.0, 5.0, 0.0); * - * window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + * window = gtk_window_new (); * * // creates the spinbutton, with no decimal places * button = gtk_spin_button_new (adjustment, 1.0, 0); @@ -171,7 +171,7 @@ * * adjustment = gtk_adjustment_new (2.500, 0.0, 5.0, 0.001, 0.1, 0.0); * - * window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + * window = gtk_window_new (); * * // creates the spinbutton, with three decimal places * button = gtk_spin_button_new (adjustment, 0.001, 3); diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c index 78c416bf3a..32e8f31223 100644 --- a/gtk/gtktogglebutton.c +++ b/gtk/gtktogglebutton.c @@ -75,7 +75,7 @@ * GtkWidget *box; * const char *text; * - * window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + * window = gtk_window_new (); * box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12); * * text = "Hi, I’m a toggle button."; diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 701cfb6f33..bd4b3424b9 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -2390,20 +2390,12 @@ gtk_window_native_interface_init (GtkNativeInterface *iface) /** * gtk_window_new: - * @type: type of window * * Creates a new #GtkWindow, which is a toplevel window that can - * contain other widgets. Nearly always, the type of the window should - * be #GTK_WINDOW_TOPLEVEL. If you’re implementing something like a - * popup menu from scratch (which is a bad idea, just use #GtkMenu), - * you might use #GTK_WINDOW_POPUP. #GTK_WINDOW_POPUP is not for - * dialogs, though in some other toolkits dialogs are called “popups”. - * In GTK+, #GTK_WINDOW_POPUP means a pop-up menu or pop-up tooltip. - * On X11, popup windows are not controlled by the - * [window manager][gtk-X11-arch]. - * - * If you simply want an undecorated window (no window borders), use - * gtk_window_set_decorated(), don’t use #GTK_WINDOW_POPUP. + * contain other widgets. + * + * To get an undecorated window (no window borders), use + * gtk_window_set_decorated(). * * All top-level windows created by gtk_window_new() are stored in * an internal top-level window list. This list can be obtained from @@ -2416,15 +2408,9 @@ gtk_window_native_interface_init (GtkNativeInterface *iface) * Returns: a new #GtkWindow. **/ GtkWidget* -gtk_window_new (GtkWindowType type) +gtk_window_new (void) { - GtkWindow *window; - - g_return_val_if_fail (type >= GTK_WINDOW_TOPLEVEL && type <= GTK_WINDOW_POPUP, NULL); - - window = g_object_new (GTK_TYPE_WINDOW, "type", type, NULL); - - return GTK_WIDGET (window); + return g_object_new (GTK_TYPE_WINDOW, NULL); } static void @@ -4539,7 +4525,7 @@ gtk_window_resize (GtkWindow *window, * way that this code: * * |[<!-- language="C" --> - * GtkWindow *window = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL)); + * GtkWindow *window = GTK_WINDOW (gtk_window_new ()); * int width = 500; * int height = 300; * gtk_window_resize (window, width, height); diff --git a/gtk/gtkwindow.h b/gtk/gtkwindow.h index 3776bfd137..82ba85e5db 100644 --- a/gtk/gtkwindow.h +++ b/gtk/gtkwindow.h @@ -112,7 +112,7 @@ typedef enum GDK_AVAILABLE_IN_ALL GType gtk_window_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL -GtkWidget* gtk_window_new (GtkWindowType type); +GtkWidget* gtk_window_new (void); GDK_AVAILABLE_IN_ALL void gtk_window_set_title (GtkWindow *window, const gchar *title); diff --git a/gtk/tools/gtk-builder-tool-preview.c b/gtk/tools/gtk-builder-tool-preview.c index a5289744cb..c1f6157570 100644 --- a/gtk/tools/gtk-builder-tool-preview.c +++ b/gtk/tools/gtk-builder-tool-preview.c @@ -127,7 +127,7 @@ preview_file (const char *filename, { GtkWidget *widget = GTK_WIDGET (object); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); if (GTK_IS_BUILDABLE (object)) id = gtk_buildable_get_name (GTK_BUILDABLE (object)); diff --git a/tests/animated-resizing.c b/tests/animated-resizing.c index ca83ff6c8d..6ec091264d 100644 --- a/tests/animated-resizing.c +++ b/tests/animated-resizing.c @@ -198,7 +198,7 @@ main(int argc, char **argv) g_print ("# Resizing?: %s\n", cb_no_resize ? "no" : "yes"); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); frame_stats_ensure (GTK_WINDOW (window)); da = gtk_drawing_area_new (); diff --git a/tests/animated-revealing.c b/tests/animated-revealing.c index e7f97832ef..a7a4d57674 100644 --- a/tests/animated-revealing.c +++ b/tests/animated-revealing.c @@ -49,7 +49,7 @@ main(int argc, char **argv) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); frame_stats_ensure (GTK_WINDOW (window)); diff --git a/tests/gdkgears.c b/tests/gdkgears.c index f5a3d53cd8..a4aa9fadbb 100644 --- a/tests/gdkgears.c +++ b/tests/gdkgears.c @@ -129,7 +129,7 @@ main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_titlebar (GTK_WINDOW (window), g_object_new (GTK_TYPE_HEADER_BAR, "visible", TRUE, "title", "GdkGears", NULL)); gtk_window_set_default_size (GTK_WINDOW (window), 640, 640); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/listmodel.c b/tests/listmodel.c index 33faecc9ff..6bd64960fe 100644 --- a/tests/listmodel.c +++ b/tests/listmodel.c @@ -189,7 +189,7 @@ main (int argc, char *argv[]) g_object_unref (obj); } - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); grid = gtk_grid_new (); gtk_container_add (GTK_CONTAINER (window), grid); sw = gtk_scrolled_window_new (NULL, NULL); diff --git a/tests/motion-compression.c b/tests/motion-compression.c index e79bb5c643..b528395bb8 100644 --- a/tests/motion-compression.c +++ b/tests/motion-compression.c @@ -58,7 +58,7 @@ main (int argc, char **argv) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 300, 300); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); diff --git a/tests/overlayscroll.c b/tests/overlayscroll.c index acd76246b6..933ab3e892 100644 --- a/tests/overlayscroll.c +++ b/tests/overlayscroll.c @@ -65,7 +65,7 @@ main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 640, 480); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/scrolling-performance.c b/tests/scrolling-performance.c index 4f195958ac..ed6d0175bf 100644 --- a/tests/scrolling-performance.c +++ b/tests/scrolling-performance.c @@ -126,7 +126,7 @@ main (int argc, char **argv) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); frame_stats_ensure (GTK_WINDOW (window)); gtk_window_set_default_size (GTK_WINDOW (window), 800, 600); diff --git a/tests/showrendernode.c b/tests/showrendernode.c index e1759cd1a1..0b30e8b462 100644 --- a/tests/showrendernode.c +++ b/tests/showrendernode.c @@ -162,7 +162,7 @@ main (int argc, char **argv) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); nodeview = g_object_new (GTK_TYPE_NODE_VIEW, NULL); gtk_window_set_decorated (GTK_WINDOW (window), FALSE); diff --git a/tests/simple.c b/tests/simple.c index 09de9915c3..495e86031e 100644 --- a/tests/simple.c +++ b/tests/simple.c @@ -44,7 +44,7 @@ main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "hello world"); gtk_window_set_resizable (GTK_WINDOW (window), FALSE); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/syncscroll.c b/tests/syncscroll.c index d33b6ab850..715fc0ae32 100644 --- a/tests/syncscroll.c +++ b/tests/syncscroll.c @@ -22,7 +22,7 @@ main (int argc, char *argv[]) gtk_init (); - win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + win = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (win), 640, 480); box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5); diff --git a/tests/testaccel.c b/tests/testaccel.c index 494eb8add0..d07048cd24 100644 --- a/tests/testaccel.c +++ b/tests/testaccel.c @@ -67,7 +67,7 @@ key_test (void) GtkWidget *box, *entry; /* create window */ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 400, 400); sw = gtk_scrolled_window_new (NULL, NULL); diff --git a/tests/testadjustsize.c b/tests/testadjustsize.c index 4d03a8ff0e..2b145c2a29 100644 --- a/tests/testadjustsize.c +++ b/tests/testadjustsize.c @@ -75,7 +75,7 @@ open_test_window (void) GtkWidget *grid; int i; - test_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + test_window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (test_window), "Tests"); g_signal_connect (test_window, "destroy", G_CALLBACK (quit_cb), &done); @@ -140,7 +140,7 @@ open_control_window (void) GtkWidget *box; GtkWidget *toggle; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Controls"); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); @@ -239,7 +239,7 @@ open_alignment_window (void) int i; GEnumClass *align_class; - test_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + test_window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (test_window), "Alignment"); g_signal_connect (test_window, "destroy", G_CALLBACK (quit_cb), &done); @@ -300,7 +300,7 @@ open_margin_window (void) "margin" }; - test_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + test_window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (test_window), "Margin"); g_signal_connect (test_window, "destroy", G_CALLBACK (quit_cb), &done); @@ -327,7 +327,7 @@ open_valigned_label_window (void) { GtkWidget *window, *box, *label, *frame; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); g_signal_connect (test_window, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/testappchooser.c b/tests/testappchooser.c index c1e7699986..82eda9d4ca 100644 --- a/tests/testappchooser.c +++ b/tests/testappchooser.c @@ -171,7 +171,7 @@ main (int argc, char **argv) gtk_init (); - toplevel = gtk_window_new (GTK_WINDOW_TOPLEVEL); + toplevel = gtk_window_new (); grid = gtk_grid_new (); w1 = gtk_label_new ("File:"); diff --git a/tests/testappchooserbutton.c b/tests/testappchooserbutton.c index 8597fcc57c..032c54855c 100644 --- a/tests/testappchooserbutton.c +++ b/tests/testappchooserbutton.c @@ -80,7 +80,7 @@ main (int argc, gtk_init (); - toplevel = gtk_window_new (GTK_WINDOW_TOPLEVEL); + toplevel = gtk_window_new (); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); gtk_container_add (GTK_CONTAINER (toplevel), box); diff --git a/tests/testassistant.c b/tests/testassistant.c index e59e29ae69..2f1c8cf7ab 100644 --- a/tests/testassistant.c +++ b/tests/testassistant.c @@ -713,7 +713,7 @@ main (int argc, gchar *argv[]) if (g_getenv ("RTL")) gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_hide_on_close (GTK_WINDOW (window), TRUE); g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/testbaseline.c b/tests/testbaseline.c index 31269db210..d4575ab678 100644 --- a/tests/testbaseline.c +++ b/tests/testbaseline.c @@ -99,7 +99,7 @@ main (int argc, GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); g_object_unref (provider); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (quit_cb), &done); notebook = gtk_notebook_new (); diff --git a/tests/testblur.c b/tests/testblur.c index e425450d9e..8c3a7a0da1 100644 --- a/tests/testblur.c +++ b/tests/testblur.c @@ -94,7 +94,7 @@ main (int argc, char **argv) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); blur_box = g_object_new (gtk_blur_box_get_type (), diff --git a/tests/testborderdrawing.c b/tests/testborderdrawing.c index b99b3aa75d..a9b0b2cd8e 100644 --- a/tests/testborderdrawing.c +++ b/tests/testborderdrawing.c @@ -106,7 +106,7 @@ main (int argc, char **argv) GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 40); top = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 40); bottom = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 40); diff --git a/tests/testbox.c b/tests/testbox.c index 6afd8a6c77..ccb6a827ac 100644 --- a/tests/testbox.c +++ b/tests/testbox.c @@ -83,7 +83,7 @@ main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_container_add (GTK_CONTAINER (window), vbox); diff --git a/tests/testbuttons.c b/tests/testbuttons.c index e34f10654a..417db54230 100644 --- a/tests/testbuttons.c +++ b/tests/testbuttons.c @@ -29,7 +29,7 @@ int main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); diff --git a/tests/testcairo.c b/tests/testcairo.c index 5732528fa1..a6d661d678 100644 --- a/tests/testcairo.c +++ b/tests/testcairo.c @@ -203,7 +203,7 @@ main (int argc, char **argv) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 400, 400); gtk_window_set_title (GTK_WINDOW (window), "cairo: Knockout Groups"); diff --git a/tests/testcalendar.c b/tests/testcalendar.c index 664498caa9..49dfc42b83 100644 --- a/tests/testcalendar.c +++ b/tests/testcalendar.c @@ -195,7 +195,7 @@ create_calendar(void) }; gboolean done = FALSE; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_hide_on_close (GTK_WINDOW (window), TRUE); gtk_window_set_title (GTK_WINDOW (window), "GtkCalendar Example"); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/testcellarea.c b/tests/testcellarea.c index 6c4f4225a7..7a4ea6b88f 100644 --- a/tests/testcellarea.c +++ b/tests/testcellarea.c @@ -180,7 +180,7 @@ simple_cell_area (void) GtkWidget *window, *widget; GtkWidget *iconview, *frame, *vbox, *hbox; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "CellArea expand and alignments"); @@ -423,7 +423,7 @@ focus_cell_area (void) GtkWidget *window, *widget; GtkWidget *iconview, *frame, *vbox, *hbox; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4); gtk_widget_show (hbox); @@ -512,7 +512,7 @@ background_area (void) GtkWidget *window, *widget, *label, *main_vbox; GtkWidget *iconview, *frame, *vbox, *hbox; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4); main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4); gtk_widget_show (hbox); diff --git a/tests/testcellrenderertext.c b/tests/testcellrenderertext.c index eaa41c47c5..eb572ff94a 100644 --- a/tests/testcellrenderertext.c +++ b/tests/testcellrenderertext.c @@ -268,7 +268,7 @@ main (int argc, char **argv) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/testcenterbox.c b/tests/testcenterbox.c index e4a1350888..9c3412795b 100644 --- a/tests/testcenterbox.c +++ b/tests/testcenterbox.c @@ -24,7 +24,7 @@ main (int argc, char *argv[]) if (g_getenv ("RTL")) gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); box = gtk_center_box_new (); gtk_container_add (GTK_CONTAINER (window), box); diff --git a/tests/testclipboard2.c b/tests/testclipboard2.c index da90653171..d09c06050f 100644 --- a/tests/testclipboard2.c +++ b/tests/testclipboard2.c @@ -449,7 +449,7 @@ main (int argc, char **argv) if (alt_display == NULL) alt_display = gdk_display_get_default (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); gtk_container_add (GTK_CONTAINER (window), get_window_contents (gtk_widget_get_display (window), diff --git a/tests/testcombo.c b/tests/testcombo.c index d6d6d95f1f..cdcb1d41a0 100644 --- a/tests/testcombo.c +++ b/tests/testcombo.c @@ -950,7 +950,7 @@ main (int argc, char **argv) if (g_getenv ("RTL")) gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); mainbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2); diff --git a/tests/testdialog.c b/tests/testdialog.c index e6053abb2c..c627f73f2d 100644 --- a/tests/testdialog.c +++ b/tests/testdialog.c @@ -323,7 +323,7 @@ main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 600, 400); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5); diff --git a/tests/testdnd.c b/tests/testdnd.c index 32a19de3c3..41a5109240 100644 --- a/tests/testdnd.c +++ b/tests/testdnd.c @@ -503,7 +503,7 @@ popup_cb (gpointer data) int i, j; GdkContentFormats *targets; - popup_window = gtk_window_new (GTK_WINDOW_POPUP); + popup_window = gtk_window_new (); grid = gtk_grid_new (); targets = gdk_content_formats_new_for_gtype (G_TYPE_STRING); @@ -615,7 +615,7 @@ main (int argc, char **argv) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/testdnd2.c b/tests/testdnd2.c index 84ba7abc6e..608c955b03 100644 --- a/tests/testdnd2.c +++ b/tests/testdnd2.c @@ -467,7 +467,7 @@ main (int argc, char *Argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Drag And Drop"); gtk_window_set_resizable (GTK_WINDOW (window), FALSE); diff --git a/tests/testdnd3.c b/tests/testdnd3.c index d1e9bfe832..c63bb0d9db 100644 --- a/tests/testdnd3.c +++ b/tests/testdnd3.c @@ -341,7 +341,7 @@ int main (int argc, char *argv[]) widget = gtk_color_button_new (); gtk_widget_destroy (widget); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 640, 480); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); diff --git a/tests/testellipsise.c b/tests/testellipsise.c index 9bae0492f8..616caf3969 100644 --- a/tests/testellipsise.c +++ b/tests/testellipsise.c @@ -114,7 +114,7 @@ main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 400, 300); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/testemblems.c b/tests/testemblems.c index 013865afda..a98193c0a4 100644 --- a/tests/testemblems.c +++ b/tests/testemblems.c @@ -10,7 +10,7 @@ int main (int argc, char **argv) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); grid = gtk_grid_new (); gtk_grid_set_row_spacing (GTK_GRID (grid), 12); diff --git a/tests/testentrycompletion.c b/tests/testentrycompletion.c index ac67928e76..c24478cf2e 100644 --- a/tests/testentrycompletion.c +++ b/tests/testentrycompletion.c @@ -310,7 +310,7 @@ main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2); diff --git a/tests/testentryicons.c b/tests/testentryicons.c index 31987b18d5..796295a61f 100644 --- a/tests/testentryicons.c +++ b/tests/testentryicons.c @@ -105,7 +105,7 @@ main (int argc, char **argv) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Gtk Entry Icons Test"); g_signal_connect (G_OBJECT (window), "destroy", diff --git a/tests/testexpand.c b/tests/testexpand.c index 2339e19db8..de69040484 100644 --- a/tests/testexpand.c +++ b/tests/testexpand.c @@ -46,7 +46,7 @@ create_box_window (void) GtkWidget *toggle; GtkWidget *colorbox; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Boxes"); box1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); @@ -107,7 +107,7 @@ create_grid_window (void) GtkWidget *toggle; GtkWidget *colorbox; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Grid"); grid = gtk_grid_new (); diff --git a/tests/testfilechooser.c b/tests/testfilechooser.c index 4ae441ef22..6086d9d917 100644 --- a/tests/testfilechooser.c +++ b/tests/testfilechooser.c @@ -711,7 +711,7 @@ main (int argc, char **argv) /* Extra controls for manipulating the test environment */ - control_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + control_window = gtk_window_new (); vbbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_container_add (GTK_CONTAINER (control_window), vbbox); diff --git a/tests/testfilechooserbutton.c b/tests/testfilechooserbutton.c index 39f5eb154c..550d625e01 100644 --- a/tests/testfilechooserbutton.c +++ b/tests/testfilechooserbutton.c @@ -110,7 +110,7 @@ tests_button_clicked_cb (GtkButton *real_button, { GtkWidget *box, *button; - tests = gtk_window_new (GTK_WINDOW_TOPLEVEL); + tests = gtk_window_new (); gtk_window_set_hide_on_close (GTK_WINDOW (tests), TRUE); gtk_window_set_title (GTK_WINDOW (tests), "Tests - TestFileChooserButton"); diff --git a/tests/testflowbox.c b/tests/testflowbox.c index 0a116cfd84..2350b64c82 100644 --- a/tests/testflowbox.c +++ b/tests/testflowbox.c @@ -379,7 +379,7 @@ create_window (void) GtkWidget *window, *hbox, *vbox, *flowbox_cntl, *items_cntl; GtkWidget *flowbox, *widget, *expander, *swindow; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); diff --git a/tests/testfontchooser.c b/tests/testfontchooser.c index fbf3bbc21f..f48651941c 100644 --- a/tests/testfontchooser.c +++ b/tests/testfontchooser.c @@ -77,7 +77,7 @@ main (int argc, char *argv[]) fontchooser = gtk_font_chooser_widget_new (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_widget_set_size_request (window, 600, 600); box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); gtk_container_add (GTK_CONTAINER (window), box); diff --git a/tests/testfontchooserdialog.c b/tests/testfontchooserdialog.c index cd35ff98c5..9468953d73 100644 --- a/tests/testfontchooserdialog.c +++ b/tests/testfontchooserdialog.c @@ -106,7 +106,7 @@ main (int argc, char *argv[]) gtk_font_button_set_use_font (GTK_FONT_BUTTON (font_button), TRUE); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_container_add (GTK_CONTAINER (window), font_button); gtk_widget_show (window); diff --git a/tests/testfontoptions.c b/tests/testfontoptions.c index 0fb225fecf..fdcd4bf6ea 100644 --- a/tests/testfontoptions.c +++ b/tests/testfontoptions.c @@ -34,7 +34,7 @@ main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); grid = gtk_grid_new (); gtk_grid_set_row_spacing (GTK_GRID (grid), 10); gtk_grid_set_column_spacing (GTK_GRID (grid), 10); diff --git a/tests/testframe.c b/tests/testframe.c index 75a16ba527..c943997440 100644 --- a/tests/testframe.c +++ b/tests/testframe.c @@ -147,7 +147,7 @@ int main (int argc, char **argv) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 300, 300); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/testfullscreen.c b/tests/testfullscreen.c index 3af779c1e3..f73a6d608f 100644 --- a/tests/testfullscreen.c +++ b/tests/testfullscreen.c @@ -46,7 +46,7 @@ main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5); gtk_widget_set_valign (vbox, GTK_ALIGN_CENTER); diff --git a/tests/testgaction.c b/tests/testgaction.c index 9a61a5af4e..872ac51fd7 100644 --- a/tests/testgaction.c +++ b/tests/testgaction.c @@ -98,7 +98,7 @@ static const char *menu_data = int main (int argc, char **argv) { gtk_init (); - GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + GtkWidget *window = gtk_window_new (); GtkWidget *box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12); GtkWidget *menubutton = gtk_menu_button_new (); GtkWidget *button1 = gtk_button_new_with_label ("Change Label Text"); diff --git a/tests/testgiconpixbuf.c b/tests/testgiconpixbuf.c index bbd1e407d8..0a52da4b4d 100644 --- a/tests/testgiconpixbuf.c +++ b/tests/testgiconpixbuf.c @@ -48,7 +48,7 @@ main (int argc, gtk_init (); pixbuf = gdk_pixbuf_new_from_file ("apple-red.png", NULL); - toplevel = gtk_window_new (GTK_WINDOW_TOPLEVEL); + toplevel = gtk_window_new (); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12); gtk_container_add (GTK_CONTAINER (toplevel), hbox); diff --git a/tests/testglarea.c b/tests/testglarea.c index c2170adb0c..637e54488d 100644 --- a/tests/testglarea.c +++ b/tests/testglarea.c @@ -415,7 +415,7 @@ main (int argc, char *argv[]) * GL context, and to check for features */ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "GtkGLArea - Triangle"); gtk_window_set_default_size (GTK_WINDOW (window), 400, 600); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/testglblending.c b/tests/testglblending.c index 7e0503537e..a20c18eb63 100644 --- a/tests/testglblending.c +++ b/tests/testglblending.c @@ -22,7 +22,7 @@ main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Test GL/gtk inter-blending"); gtk_window_set_default_size (GTK_WINDOW (window), 250, 250); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/testgmenu.c b/tests/testgmenu.c index 21f1b1250c..98d45c51f9 100644 --- a/tests/testgmenu.c +++ b/tests/testgmenu.c @@ -641,7 +641,7 @@ main (int argc, char *argv[]) exit (1); } - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); gtk_container_add (GTK_CONTAINER (window), box); diff --git a/tests/testgrid.c b/tests/testgrid.c index 733c858327..6f05e7b66e 100644 --- a/tests/testgrid.c +++ b/tests/testgrid.c @@ -50,7 +50,7 @@ simple_grid (void) GtkWidget *test1, *test2, *test3, *test4, *test5, *test6; GtkGesture *gesture; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Orientation"); grid = gtk_grid_new (); gtk_container_add (GTK_CONTAINER (window), grid); @@ -95,7 +95,7 @@ text_grid (void) GtkWidget *box; GtkWidget *label; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Height-for-Width"); paned1 = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL); gtk_container_add (GTK_CONTAINER (window), paned1); @@ -137,7 +137,7 @@ box_comparison (void) GtkWidget *label; GtkWidget *grid; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Grid vs. Box"); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5); gtk_container_add (GTK_CONTAINER (window), vbox); @@ -200,7 +200,7 @@ empty_line (void) GtkWidget *grid; GtkWidget *child; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Empty row"); grid = gtk_grid_new (); gtk_container_add (GTK_CONTAINER (window), grid); @@ -228,7 +228,7 @@ empty_grid (void) GtkWidget *grid; GtkWidget *child; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Empty grid"); grid = gtk_grid_new (); gtk_container_add (GTK_CONTAINER (window), grid); @@ -256,7 +256,7 @@ scrolling (void) GtkWidget *child; gint i; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Scrolling"); sw = gtk_scrolled_window_new (NULL, NULL); viewport = gtk_viewport_new (NULL, NULL); @@ -352,7 +352,7 @@ insert (void) GtkWidget *child; GtkWidget *button; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Insertion / Removal"); g = gtk_grid_new (); @@ -417,7 +417,7 @@ spanning_grid (void) * child need to stay collapsed */ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Spanning"); g = gtk_grid_new (); diff --git a/tests/testgridbaseline.c b/tests/testgridbaseline.c index 40016ca696..db4e01b9d6 100644 --- a/tests/testgridbaseline.c +++ b/tests/testgridbaseline.c @@ -15,7 +15,7 @@ main (int argc, char *argv[]) g_setenv ("GTK_DEBUG", "baselines,layout", TRUE); gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); grid = gtk_grid_new (); gtk_grid_set_row_spacing (GTK_GRID (grid), 30); gtk_grid_set_column_spacing (GTK_GRID (grid), 30); diff --git a/tests/testgrouping.c b/tests/testgrouping.c index 20a08b35ae..b522a439e9 100644 --- a/tests/testgrouping.c +++ b/tests/testgrouping.c @@ -121,7 +121,7 @@ main (int argc, char **argv) model = create_model (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); gtk_window_set_default_size (GTK_WINDOW (window), 320, 480); diff --git a/tests/testgtk.c b/tests/testgtk.c index f5695c55d1..5a503b44d3 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -268,7 +268,7 @@ create_buttons (GtkWidget *widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (widget)); @@ -343,7 +343,7 @@ create_toggle_buttons (GtkWidget *widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (widget)); @@ -714,7 +714,7 @@ create_statusbar (GtkWidget *widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (widget)); @@ -927,7 +927,7 @@ void create_labels (GtkWidget *widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (widget)); @@ -1223,7 +1223,7 @@ create_pixbuf (GtkWidget *widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (widget)); @@ -1404,7 +1404,7 @@ create_image (GtkWidget *widget) GtkWidget *vbox; GdkPixbuf *pixbuf; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (widget)); @@ -1534,7 +1534,7 @@ create_listbox (GtkWidget *widget) GdkDisplay *display = gtk_widget_get_display (widget); int i; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_hide_on_close (GTK_WINDOW (window), TRUE); gtk_window_set_display (GTK_WINDOW (window), display); @@ -1765,7 +1765,7 @@ create_modal_window (GtkWidget *widget) GtkWidget *btnColor,*btnFile,*btnClose; /* Create modal window (Here you can use any window descendent )*/ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (widget)); @@ -1927,7 +1927,7 @@ scrolled_windows_remove (GtkWidget *dialog, gint response, GtkWidget *scrollwin) else { sw_parent = gtk_widget_get_parent (scrollwin); - sw_float_parent = gtk_window_new (GTK_WINDOW_TOPLEVEL); + sw_float_parent = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (sw_float_parent), gtk_widget_get_display (dialog)); @@ -2119,7 +2119,7 @@ create_entry (GtkWidget *widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (widget)); @@ -2216,7 +2216,7 @@ create_expander (GtkWidget *widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (widget)); @@ -2611,7 +2611,7 @@ create_spins (GtkWidget *widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (widget)); @@ -3053,7 +3053,7 @@ create_cursors (GtkWidget *widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (widget)); @@ -3180,7 +3180,7 @@ create_color_selection (GtkWidget *widget) GtkWidget *hbox; GtkWidget *label; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (widget)); @@ -3357,7 +3357,7 @@ create_font_selection (GtkWidget *widget) GtkWidget *hbox; GtkWidget *label; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (widget)); @@ -3623,7 +3623,7 @@ create_range_controls (GtkWidget *widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (widget)); @@ -4003,7 +4003,7 @@ create_notebook (GtkWidget *widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (widget)); @@ -4201,7 +4201,7 @@ create_panes (GtkWidget *widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (widget)); @@ -4290,7 +4290,7 @@ paned_keyboard_window1 (GtkWidget *widget) GtkWidget *button3; GtkWidget *button4; - window1 = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window1 = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window1), "Basic paned navigation"); gtk_window_set_display (GTK_WINDOW (window1), gtk_widget_get_display (widget)); @@ -4373,7 +4373,7 @@ paned_keyboard_window2 (GtkWidget *widget) GtkWidget *button11; GtkWidget *button10; - window2 = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window2 = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window2), "\"button 10\" is not inside the horisontal pane"); gtk_window_set_display (GTK_WINDOW (window2), @@ -4433,7 +4433,7 @@ paned_keyboard_window3 (GtkWidget *widget) GtkWidget *frame12; GtkWidget *button17; - window3 = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window3 = gtk_window_new (); g_object_set_data (G_OBJECT (window3), "window3", window3); gtk_window_set_title (GTK_WINDOW (window3), "Nested panes"); @@ -4508,7 +4508,7 @@ paned_keyboard_window4 (GtkWidget *widget) GtkWidget *button25; GtkWidget *button24; - window4 = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window4 = gtk_window_new (); g_object_set_data (G_OBJECT (window4), "window4", window4); gtk_window_set_title (GTK_WINDOW (window4), "window4"); @@ -4657,7 +4657,7 @@ create_wmhints (GtkWidget *widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (widget)); @@ -4968,7 +4968,7 @@ create_surface_states (GtkWidget *widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (widget)); @@ -4981,7 +4981,7 @@ create_surface_states (GtkWidget *widget) box1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_container_add (GTK_CONTAINER (window), box1); - iconified = gtk_window_new (GTK_WINDOW_TOPLEVEL); + iconified = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (iconified), gtk_widget_get_display (widget)); @@ -4995,7 +4995,7 @@ create_surface_states (GtkWidget *widget) controls = get_state_controls (iconified); gtk_container_add (GTK_CONTAINER (iconified), controls); - normal = gtk_window_new (GTK_WINDOW_TOPLEVEL); + normal = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (normal), gtk_widget_get_display (widget)); @@ -5135,7 +5135,7 @@ window_controls (GtkWidget *window) GtkWidget *spin; GtkAdjustment *adjustment; - control_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + control_window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (control_window), gtk_widget_get_display (window)); @@ -5257,7 +5257,7 @@ create_window_sizing (GtkWidget *widget) { GtkWidget *label; - target_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + target_window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (target_window), gtk_widget_get_display (widget)); label = gtk_label_new (NULL); @@ -5964,7 +5964,7 @@ create_native_dialogs (GtkWidget *widget) if (!window) { - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (widget)); @@ -6144,7 +6144,7 @@ create_main_window (void) GtkWidget *separator; int i; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_widget_set_name (window, "main_window"); gtk_window_set_default_size (GTK_WINDOW (window), -1, 400); @@ -6285,7 +6285,7 @@ do_bench (char* what, int num) GtkWidget *widget; void (* fn) (GtkWidget *widget); fn = NULL; - widget = gtk_window_new (GTK_WINDOW_TOPLEVEL); + widget = gtk_window_new (); if (g_ascii_strcasecmp (what, "ALL") == 0) { diff --git a/tests/testheaderbar.c b/tests/testheaderbar.c index d366ab1766..5cd92fb0f7 100644 --- a/tests/testheaderbar.c +++ b/tests/testheaderbar.c @@ -140,7 +140,7 @@ main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_style_context_add_class (gtk_widget_get_style_context (window), "main"); provider = gtk_css_provider_new (); diff --git a/tests/testheightforwidth.c b/tests/testheightforwidth.c index 2ae275cf2d..6239831960 100644 --- a/tests/testheightforwidth.c +++ b/tests/testheightforwidth.c @@ -808,7 +808,7 @@ create_window (void) GtkWidget *window, *vbox, *button; gint i; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); g_object_set (vbox, "margin", 8, NULL); diff --git a/tests/testicontheme.c b/tests/testicontheme.c index 1dd6fec4c5..cc9f988dca 100644 --- a/tests/testicontheme.c +++ b/tests/testicontheme.c @@ -104,7 +104,7 @@ main (int argc, char *argv[]) return 1; } - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); image = gtk_image_new (); gtk_image_set_from_paintable (GTK_IMAGE (image), GDK_PAINTABLE (icon)); g_object_unref (icon); diff --git a/tests/testiconview-keynav.c b/tests/testiconview-keynav.c index 2a653ce083..5443c6da6c 100644 --- a/tests/testiconview-keynav.c +++ b/tests/testiconview-keynav.c @@ -232,7 +232,7 @@ main (int argc, char *argv[]) set_styles (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_container_add (GTK_CONTAINER (window), vbox); diff --git a/tests/testiconview.c b/tests/testiconview.c index 0398f11bf6..bd5eeae3cb 100644 --- a/tests/testiconview.c +++ b/tests/testiconview.c @@ -416,7 +416,7 @@ main (gint argc, gchar **argv) if (g_getenv ("RTL")) gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 700, 400); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); diff --git a/tests/testinfobar.c b/tests/testinfobar.c index 0fa3163410..cb78f3f82d 100644 --- a/tests/testinfobar.c +++ b/tests/testinfobar.c @@ -85,7 +85,7 @@ on_activate (GApplication *application, g_signal_connect (info_bar, "response", G_CALLBACK (on_info_bar_response), widget); - widget = gtk_window_new (GTK_WINDOW_TOPLEVEL); + widget = gtk_window_new (); gtk_container_add (GTK_CONTAINER (widget), box); gtk_widget_show (widget); gtk_application_add_window (GTK_APPLICATION (application), diff --git a/tests/testkineticscrolling.c b/tests/testkineticscrolling.c index 46365bd271..eaac76cbe0 100644 --- a/tests/testkineticscrolling.c +++ b/tests/testkineticscrolling.c @@ -37,7 +37,7 @@ kinetic_scrolling (void) GdkContentFormats *targets; gint i; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 400, 400); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/testlevelbar.c b/tests/testlevelbar.c index 9a94e7dbd2..ffe6710784 100644 --- a/tests/testlevelbar.c +++ b/tests/testlevelbar.c @@ -89,7 +89,7 @@ main (int argc, char *argv[]) add_custom_css (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 500, 100); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10); g_object_set (box, "margin", 20, NULL); diff --git a/tests/testlist.c b/tests/testlist.c index 340afbd133..9a432fdd87 100644 --- a/tests/testlist.c +++ b/tests/testlist.c @@ -256,7 +256,7 @@ main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_container_add (GTK_CONTAINER (window), hbox); diff --git a/tests/testlist2.c b/tests/testlist2.c index 601567ac68..244974b969 100644 --- a/tests/testlist2.c +++ b/tests/testlist2.c @@ -115,7 +115,7 @@ int main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 300, 300); list = gtk_list_box_new (); diff --git a/tests/testlist3.c b/tests/testlist3.c index a9063eff17..1550f13592 100644 --- a/tests/testlist3.c +++ b/tests/testlist3.c @@ -150,7 +150,7 @@ main (int argc, char *argv[]) provider = gtk_css_provider_new (); gtk_css_provider_load_from_data (provider, css, -1); gtk_style_context_add_provider_for_display (gdk_display_get_default (), GTK_STYLE_PROVIDER (provider), 800); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), -1, 300); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12); diff --git a/tests/testlockbutton.c b/tests/testlockbutton.c index d954b6731a..75d1bc657f 100644 --- a/tests/testlockbutton.c +++ b/tests/testlockbutton.c @@ -222,7 +222,7 @@ main (int argc, char *argv[]) permission = g_object_new (G_TYPE_TEST_PERMISSION, NULL); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_resizable (GTK_WINDOW (window), FALSE); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5); diff --git a/tests/testlogout.c b/tests/testlogout.c index 78236e82ff..f0435cad7d 100644 --- a/tests/testlogout.c +++ b/tests/testlogout.c @@ -79,7 +79,7 @@ activate (GtkApplication *app, GtkWidget *button; GtkWidget *label; - win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + win = gtk_window_new (); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12); g_object_set (box, "margin", 12, NULL); diff --git a/tests/testmenubutton.c b/tests/testmenubutton.c index 35e6dc9bc9..b5a2404e97 100644 --- a/tests/testmenubutton.c +++ b/tests/testmenubutton.c @@ -47,7 +47,7 @@ int main (int argc, char **argv) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_resize (GTK_WINDOW (window), 400, 300); grid = gtk_grid_new (); diff --git a/tests/testmodelbutton.c b/tests/testmodelbutton.c index bea494faa6..523de0db26 100644 --- a/tests/testmodelbutton.c +++ b/tests/testmodelbutton.c @@ -75,7 +75,7 @@ on_application_activate (GApplication *gapplication, G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL); gtk_container_add (GTK_CONTAINER (box), widget); - widget = gtk_window_new (GTK_WINDOW_TOPLEVEL); + widget = gtk_window_new (); gtk_container_add (GTK_CONTAINER (widget), box); gtk_widget_show (widget); gtk_application_add_window (GTK_APPLICATION (application), GTK_WINDOW (widget)); diff --git a/tests/testnoscreen.c b/tests/testnoscreen.c index 8428e66497..e213277a3e 100644 --- a/tests/testnoscreen.c +++ b/tests/testnoscreen.c @@ -33,7 +33,7 @@ int main (int argc, char *argv[]) has_display = gtk_init_check (); g_assert (!has_display); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); button = gtk_button_new (); gtk_container_add (GTK_CONTAINER (window), button); diff --git a/tests/testnotebookdnd.c b/tests/testnotebookdnd.c index 2c23816541..042a6a4ce3 100644 --- a/tests/testnotebookdnd.c +++ b/tests/testnotebookdnd.c @@ -68,7 +68,7 @@ window_creation_function (GtkNotebook *source_notebook, { GtkWidget *window, *notebook; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); notebook = gtk_notebook_new (); g_signal_connect (notebook, "create-window", G_CALLBACK (window_creation_function), NULL); @@ -327,7 +327,7 @@ main (gint argc, gchar *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); grid = gtk_grid_new (); gtk_grid_attach (GTK_GRID (grid), diff --git a/tests/testorientable.c b/tests/testorientable.c index 152336810e..f0f98627e6 100644 --- a/tests/testorientable.c +++ b/tests/testorientable.c @@ -65,7 +65,7 @@ main (int argc, char **argv) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); grid= gtk_grid_new (); gtk_grid_set_row_spacing (GTK_GRID (grid), 12); gtk_grid_set_column_spacing (GTK_GRID (grid), 12); diff --git a/tests/testoutsetshadowdrawing.c b/tests/testoutsetshadowdrawing.c index 959a5a0ca7..6f221375cc 100644 --- a/tests/testoutsetshadowdrawing.c +++ b/tests/testoutsetshadowdrawing.c @@ -103,7 +103,7 @@ main (int argc, char **argv) GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_decorated (GTK_WINDOW (window), FALSE); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 120); top = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 120); diff --git a/tests/testoverlay.c b/tests/testoverlay.c index 4e93a32f43..ea84ab96d2 100644 --- a/tests/testoverlay.c +++ b/tests/testoverlay.c @@ -41,7 +41,7 @@ test_nonzerox (void) GtkWidget *text; GtkWidget *child; - win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + win = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (win), "Non-zero X"); grid = gtk_grid_new (); @@ -120,7 +120,7 @@ test_relative (void) GtkWidget *text; GtkWidget *child; - win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + win = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (win), "Custom positioning"); overlay = gtk_overlay_new (); @@ -166,7 +166,7 @@ test_fullwidth (void) GtkWidget *text; GtkWidget *child; - win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + win = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (win), "Full-width"); overlay = gtk_overlay_new (); @@ -200,7 +200,7 @@ test_scrolling (void) gchar *contents; gsize len; - win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + win = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (win), "Scrolling"); overlay = gtk_overlay_new (); @@ -343,7 +343,7 @@ test_chase (void) gsize len; GtkEventController *controller; - win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + win = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (win), "Chase"); overlay = gtk_overlay_new (); @@ -394,7 +394,7 @@ test_stacking (void) GtkWidget *check1; GtkWidget *check2; - win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + win = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (win), "Stacking"); grid = gtk_grid_new (); @@ -439,7 +439,7 @@ test_input_stacking (void) GtkWidget *vbox; int i,j; - win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + win = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (win), "Input Stacking"); overlay = gtk_overlay_new (); diff --git a/tests/testoverlaystyleclass.c b/tests/testoverlaystyleclass.c index a400e54812..92e861e7d4 100644 --- a/tests/testoverlaystyleclass.c +++ b/tests/testoverlaystyleclass.c @@ -60,7 +60,7 @@ main (int argc, char *argv[]) GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); - win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + win = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (win), 600, 600); grid = gtk_grid_new (); diff --git a/tests/testpixbuf-scale.c b/tests/testpixbuf-scale.c index ae2bde9fd5..69ae4be6a5 100644 --- a/tests/testpixbuf-scale.c +++ b/tests/testpixbuf-scale.c @@ -99,7 +99,7 @@ main(int argc, char **argv) if (creator) g_print ("%s was created by '%s'\n", argv[1], creator); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/testplacesview.c b/tests/testplacesview.c index bd93224524..84974ee36e 100644 --- a/tests/testplacesview.c +++ b/tests/testplacesview.c @@ -22,7 +22,7 @@ main (int argc, char *argv[]) gtk_init (); - win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + win = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (win), 400, 600); view = gtk_places_view_new (); diff --git a/tests/testpopover.c b/tests/testpopover.c index 3b87341eb7..69207784f6 100644 --- a/tests/testpopover.c +++ b/tests/testpopover.c @@ -70,7 +70,7 @@ main (int argc, char *argv[]) gtk_init (); - win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + win = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (win), 400, 600); header_bar = gtk_header_bar_new (); gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header_bar), TRUE); diff --git a/tests/testrevealer.c b/tests/testrevealer.c index d4e653fa71..81e4d8bd2f 100644 --- a/tests/testrevealer.c +++ b/tests/testrevealer.c @@ -8,7 +8,7 @@ main (gint argc, gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_widget_set_size_request (window, 300, 300); box = gtk_grid_new (); diff --git a/tests/testscale.c b/tests/testscale.c index 4c7bc652e7..cc93076002 100644 --- a/tests/testscale.c +++ b/tests/testscale.c @@ -128,7 +128,7 @@ int main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Ranges with marks"); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); box1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5); diff --git a/tests/testscrolledge.c b/tests/testscrolledge.c index 6c0f7c5298..2d76eb8f0d 100644 --- a/tests/testscrolledge.c +++ b/tests/testscrolledge.c @@ -98,7 +98,7 @@ main (int argc, char *argv[]) gtk_init (); - win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + win = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (win), 600, 400); overlay = gtk_overlay_new (); diff --git a/tests/testscrolledwindow.c b/tests/testscrolledwindow.c index e045f7c0ea..eb3fe224e0 100644 --- a/tests/testscrolledwindow.c +++ b/tests/testscrolledwindow.c @@ -83,7 +83,7 @@ scrollable_policy (void) GtkWidget *window, *swindow, *hbox, *vbox, *frame, *cntl, *listbox; GtkWidget *viewport, *label, *expander, *widget, *popover; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); diff --git a/tests/testsensitive.c b/tests/testsensitive.c index 6619340dbb..a7badb9aaf 100644 --- a/tests/testsensitive.c +++ b/tests/testsensitive.c @@ -60,7 +60,7 @@ int main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5); gtk_container_add (GTK_CONTAINER (window), box); diff --git a/tests/testspinbutton.c b/tests/testspinbutton.c index 4b9df504af..9ba8d23148 100644 --- a/tests/testspinbutton.c +++ b/tests/testspinbutton.c @@ -41,7 +41,7 @@ prepare_window_for_orientation (GtkOrientation orientation) GtkWidget *window, *mainbox, *wrap_button; int max; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); g_signal_connect (window, "close-request", G_CALLBACK (on_delete), NULL); mainbox = gtk_box_new (GTK_ORIENTATION_VERTICAL ^ orientation, 2); diff --git a/tests/teststack.c b/tests/teststack.c index ef53d67ebc..b0eee9668f 100644 --- a/tests/teststack.c +++ b/tests/teststack.c @@ -122,7 +122,7 @@ main (gint argc, gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_widget_set_size_request (window, 300, 300); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); diff --git a/tests/testswitch.c b/tests/testswitch.c index e54ad9522d..ec6bab4619 100644 --- a/tests/testswitch.c +++ b/tests/testswitch.c @@ -166,7 +166,7 @@ int main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "GtkSwitch"); gtk_window_set_default_size (GTK_WINDOW (window), 400, -1); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/testtexture.c b/tests/testtexture.c index 1389d30841..dff9626fd0 100644 --- a/tests/testtexture.c +++ b/tests/testtexture.c @@ -138,7 +138,7 @@ main (int argc, char **argv) return -1; } - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); view = g_object_new (GTK_TYPE_TEXTURE_VIEW, NULL); ((GtkTextureView*)view)->texture = g_steal_pointer (&texture); diff --git a/tests/testtextview.c b/tests/testtextview.c index 6ffe1b3b60..2711a8fd52 100644 --- a/tests/testtextview.c +++ b/tests/testtextview.c @@ -175,7 +175,7 @@ main (int argc, char **argv) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); sw = gtk_scrolled_window_new (NULL, NULL); textview = g_object_new (my_text_view_get_type (), NULL); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview)); diff --git a/tests/testtextview2.c b/tests/testtextview2.c index 36e037887f..5e0c4d4453 100644 --- a/tests/testtextview2.c +++ b/tests/testtextview2.c @@ -190,7 +190,7 @@ main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 600, 400); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/testtoolbar2.c b/tests/testtoolbar2.c index 47174d9b49..f17880c44e 100644 --- a/tests/testtoolbar2.c +++ b/tests/testtoolbar2.c @@ -11,7 +11,7 @@ int main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 600, 400); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_container_add (GTK_CONTAINER (window), box); diff --git a/tests/testtooltips.c b/tests/testtooltips.c index 3ae905ed9c..9b48d6e5a2 100644 --- a/tests/testtooltips.c +++ b/tests/testtooltips.c @@ -296,7 +296,7 @@ main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Tooltips test"); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/testtreechanging.c b/tests/testtreechanging.c index f651bf07ee..23d24cdfa1 100644 --- a/tests/testtreechanging.c +++ b/tests/testtreechanging.c @@ -491,7 +491,7 @@ main (int argc, if (g_getenv ("RTL")) gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); gtk_window_set_default_size (GTK_WINDOW (window), 430, 400); diff --git a/tests/testtreecolumns.c b/tests/testtreecolumns.c index 7f44f7f18c..c71f2c912a 100644 --- a/tests/testtreecolumns.c +++ b/tests/testtreecolumns.c @@ -755,7 +755,7 @@ main (int argc, char *argv[]) } /* Set up the test windows. */ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); gtk_window_set_default_size (GTK_WINDOW (window), 300, 300); gtk_window_set_title (GTK_WINDOW (window), "Top Window"); @@ -764,7 +764,7 @@ main (int argc, char *argv[]) gtk_container_add (GTK_CONTAINER (swindow), sample_tree_view_top); gtk_widget_show (window); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); gtk_window_set_default_size (GTK_WINDOW (window), 300, 300); gtk_window_set_title (GTK_WINDOW (window), "Bottom Window"); @@ -774,7 +774,7 @@ main (int argc, char *argv[]) gtk_widget_show (window); /* Set up the main window */ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); gtk_window_set_default_size (GTK_WINDOW (window), 500, 300); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8); diff --git a/tests/testtreecolumnsizing.c b/tests/testtreecolumnsizing.c index 00e347b456..5432002b73 100644 --- a/tests/testtreecolumnsizing.c +++ b/tests/testtreecolumnsizing.c @@ -185,7 +185,7 @@ main (int argc, char **argv) gtk_init (); /* Window and box */ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 640, 480); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/testtreednd.c b/tests/testtreednd.c index 16cabbba01..89e72bf202 100644 --- a/tests/testtreednd.c +++ b/tests/testtreednd.c @@ -142,7 +142,7 @@ main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_container_add (GTK_CONTAINER (window), box); diff --git a/tests/testtreeedit.c b/tests/testtreeedit.c index 825bb9fef9..374e16e48a 100644 --- a/tests/testtreeedit.c +++ b/tests/testtreeedit.c @@ -245,7 +245,7 @@ main (gint argc, gchar **argv) if (g_getenv ("RTL")) gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "GtkTreeView editing sample"); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/testtreeflow.c b/tests/testtreeflow.c index ee77e73fa5..11fd65e774 100644 --- a/tests/testtreeflow.c +++ b/tests/testtreeflow.c @@ -142,7 +142,7 @@ main (int argc, char *argv[]) gtk_init (); path = gtk_tree_path_new_from_string ("80"); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Reflow test"); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8); diff --git a/tests/testtreefocus.c b/tests/testtreefocus.c index 1088082796..8941d09841 100644 --- a/tests/testtreefocus.c +++ b/tests/testtreefocus.c @@ -360,7 +360,7 @@ main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Card planning sheet"); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8); @@ -475,7 +475,7 @@ main (int argc, char *argv[]) 650, 400); gtk_widget_show (window); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Model"); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8); diff --git a/tests/testtreelistmodel.c b/tests/testtreelistmodel.c index 199af7cb75..621cb00c58 100644 --- a/tests/testtreelistmodel.c +++ b/tests/testtreelistmodel.c @@ -322,7 +322,7 @@ main (int argc, char *argv[]) gtk_init (); - win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + win = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (win), 400, 600); g_signal_connect (win, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/testtreepos.c b/tests/testtreepos.c index 564eb4902b..fcd1590060 100644 --- a/tests/testtreepos.c +++ b/tests/testtreepos.c @@ -93,7 +93,7 @@ int main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); sw = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (window), sw); tv = gtk_tree_view_new (); diff --git a/tests/testtreesort.c b/tests/testtreesort.c index b24f5cd61b..68d5de3728 100644 --- a/tests/testtreesort.c +++ b/tests/testtreesort.c @@ -130,7 +130,7 @@ main (int argc, char *argv[]) * First window - Just a GtkTreeStore */ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Words, words, words - Window 1"); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8); @@ -257,7 +257,7 @@ main (int argc, char *argv[]) if (smodel) { - window2 = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window2 = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window2), "Words, words, words - window 2"); g_signal_connect (window2, "destroy", G_CALLBACK (quit_cb), &done); @@ -326,7 +326,7 @@ main (int argc, char *argv[]) if (ssmodel) { - window3 = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window3 = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window3), "Words, words, words - Window 3"); g_signal_connect (window3, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/testtreeview.c b/tests/testtreeview.c index 903af9fa61..ffa06867e2 100644 --- a/tests/testtreeview.c +++ b/tests/testtreeview.c @@ -698,7 +698,7 @@ main (int argc, run_automated_tests (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); gtk_window_set_default_size (GTK_WINDOW (window), 430, 400); diff --git a/tests/testverticalcells.c b/tests/testverticalcells.c index 6946987e04..c498154df2 100644 --- a/tests/testverticalcells.c +++ b/tests/testverticalcells.c @@ -316,7 +316,7 @@ main (gint argc, gchar **argv) if (g_getenv ("RTL")) gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Vertical cells in GtkTreeViewColumn example"); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/testvolumebutton.c b/tests/testvolumebutton.c index f35f31f139..252ab96ecf 100644 --- a/tests/testvolumebutton.c +++ b/tests/testvolumebutton.c @@ -84,7 +84,7 @@ main (int argc, gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 400, 300); button = gtk_volume_button_new (); button2 = gtk_volume_button_new (); diff --git a/tests/testwidgetfocus.c b/tests/testwidgetfocus.c index 08b92add02..1a76f25490 100644 --- a/tests/testwidgetfocus.c +++ b/tests/testwidgetfocus.c @@ -292,7 +292,7 @@ main() GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); widget = g_object_new (GTK_TYPE_FOCUS_WIDGET, NULL); gtk_window_set_decorated (GTK_WINDOW (window), FALSE); diff --git a/tests/testwidgettransforms.c b/tests/testwidgettransforms.c index f5a6f0aa78..4d690b54fc 100644 --- a/tests/testwidgettransforms.c +++ b/tests/testwidgettransforms.c @@ -308,7 +308,7 @@ main (int argc, char **argv) GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); matrix_chooser = g_object_new (GTK_TYPE_MATRIX_CHOOSER, NULL); transform_tester = g_object_new (GTK_TYPE_TRANSFORM_TESTER, NULL); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12); diff --git a/tests/testwindowdrag.c b/tests/testwindowdrag.c index 527684ea97..578462f705 100644 --- a/tests/testwindowdrag.c +++ b/tests/testwindowdrag.c @@ -98,7 +98,7 @@ main (int argc, char *argv[]) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_titlebar (GTK_WINDOW (window), gtk_header_bar_new ()); grid = gtk_grid_new (); diff --git a/tests/testwindowsize.c b/tests/testwindowsize.c index 038c66887f..620a5c3b47 100644 --- a/tests/testwindowsize.c +++ b/tests/testwindowsize.c @@ -80,7 +80,7 @@ create_window (void) GtkWidget *label; GtkWidget *button; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_title (GTK_WINDOW (window), "Window size"); gtk_window_set_resizable (GTK_WINDOW (window), FALSE); diff --git a/tests/treestoretest.c b/tests/treestoretest.c index 32684b78ba..0b2c933665 100644 --- a/tests/treestoretest.c +++ b/tests/treestoretest.c @@ -303,7 +303,7 @@ make_window (gint view_type) GObject *selection; /* Make the Widgets/Objects */ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); switch (view_type) { case 0: diff --git a/tests/video-timer.c b/tests/video-timer.c index 14fcbfc0ba..84744bfee9 100644 --- a/tests/video-timer.c +++ b/tests/video-timer.c @@ -392,7 +392,7 @@ main(int argc, char **argv) gtk_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_default_size (GTK_WINDOW (window), 300, 300); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); diff --git a/tests/visuals/visuals.c b/tests/visuals/visuals.c index 85de8b8cbd..2aa83d7930 100644 --- a/tests/visuals/visuals.c +++ b/tests/visuals/visuals.c @@ -36,7 +36,7 @@ dark_button_toggled_cb (GtkToggleButton *button, static void create_dark_popup (GtkWidget *parent) { - GtkWidget *popup = gtk_window_new (GTK_WINDOW_TOPLEVEL); + GtkWidget *popup = gtk_window_new (); GtkWidget *button = gtk_toggle_button_new_with_label ("Dark"); gtk_window_set_decorated (GTK_WINDOW (popup), FALSE); diff --git a/testsuite/a11y/children.c b/testsuite/a11y/children.c index cc186c3259..debbca5b1e 100644 --- a/testsuite/a11y/children.c +++ b/testsuite/a11y/children.c @@ -248,7 +248,7 @@ main (int argc, char *argv[]) add_child_tests (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0)); add_child_tests (gtk_paned_new (GTK_ORIENTATION_HORIZONTAL)); add_child_tests (gtk_grid_new ()); - add_child_tests (gtk_window_new (GTK_WINDOW_TOPLEVEL)); + add_child_tests (gtk_window_new ()); add_child_tests (gtk_assistant_new ()); add_child_tests (gtk_frame_new ("frame")); add_child_tests (gtk_expander_new ("expander")); diff --git a/testsuite/gtk/action.c b/testsuite/gtk/action.c index 50882c36d6..056e60fc80 100644 --- a/testsuite/gtk/action.c +++ b/testsuite/gtk/action.c @@ -54,7 +54,7 @@ test_action (void) { "action", box_activate, NULL, NULL, NULL }, }; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); button = gtk_button_new (); @@ -207,7 +207,7 @@ test_overlap (void) GSimpleActionGroup *win_actions; GSimpleActionGroup *box_actions; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_container_add (GTK_CONTAINER (window), box); diff --git a/testsuite/gtk/displayclose.c b/testsuite/gtk/displayclose.c index b1f66e2a32..e5e33c880c 100644 --- a/testsuite/gtk/displayclose.c +++ b/testsuite/gtk/displayclose.c @@ -23,7 +23,7 @@ main (int argc, char **argv) gdk_display_manager_set_default_display (gdk_display_manager_get (), display); - win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + win = gtk_window_new (); but = gtk_button_new_with_label ("Try to Exit"); g_signal_connect_swapped (but, "clicked", diff --git a/testsuite/gtk/filtermodel.c b/testsuite/gtk/filtermodel.c index cb07ee2a23..16036137e2 100644 --- a/testsuite/gtk/filtermodel.c +++ b/testsuite/gtk/filtermodel.c @@ -4688,7 +4688,7 @@ specific_append_after_collapse (void) sort = gtk_tree_model_sort_new_with_model (filter); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); tree_view = gtk_tree_view_new_with_model (sort); gtk_container_add (GTK_CONTAINER (window), tree_view); gtk_widget_realize (tree_view); @@ -4808,7 +4808,7 @@ specific_sort_filter_remove_node (void) filter, NULL); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); tree_view = gtk_tree_view_new_with_model (filter); gtk_container_add (GTK_CONTAINER (window), tree_view); gtk_widget_realize (tree_view); @@ -5823,7 +5823,7 @@ specific_bug_311955 (void) specific_bug_311955_filter_func, NULL, NULL); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); tree_view = gtk_tree_view_new_with_model (filter); g_object_unref (store); diff --git a/testsuite/gtk/focus.c b/testsuite/gtk/focus.c index 73b777a05f..584a2c557e 100644 --- a/testsuite/gtk/focus.c +++ b/testsuite/gtk/focus.c @@ -94,7 +94,7 @@ test_window_focus (void) * [entry1] label2 [entry2] */ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_widget_set_name (window, "window"); add_controller (window, s); box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); diff --git a/testsuite/gtk/gestures.c b/testsuite/gtk/gestures.c index 6b2c649d1a..5a34320b64 100644 --- a/testsuite/gtk/gestures.c +++ b/testsuite/gtk/gestures.c @@ -411,7 +411,7 @@ test_phases (void) GString *str; GtkAllocation allocation; - A = gtk_window_new (GTK_WINDOW_TOPLEVEL); + A = gtk_window_new (); gtk_widget_set_name (A, "A"); B = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_widget_set_name (B, "B"); @@ -463,7 +463,7 @@ test_mixed (void) GString *str; GtkAllocation allocation; - A = gtk_window_new (GTK_WINDOW_TOPLEVEL); + A = gtk_window_new (); gtk_widget_set_name (A, "A"); B = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_widget_set_name (B, "B"); @@ -522,7 +522,7 @@ test_early_exit (void) GString *str; GtkAllocation allocation; - A = gtk_window_new (GTK_WINDOW_TOPLEVEL); + A = gtk_window_new (); gtk_widget_set_name (A, "A"); B = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_widget_set_name (B, "B"); @@ -577,7 +577,7 @@ test_claim_capture (void) GString *str; GtkAllocation allocation; - A = gtk_window_new (GTK_WINDOW_TOPLEVEL); + A = gtk_window_new (); gtk_widget_set_name (A, "A"); B = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_widget_set_name (B, "B"); @@ -624,7 +624,7 @@ test_claim_target (void) GString *str; GtkAllocation allocation; - A = gtk_window_new (GTK_WINDOW_TOPLEVEL); + A = gtk_window_new (); gtk_widget_set_name (A, "A"); B = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_widget_set_name (B, "B"); @@ -671,7 +671,7 @@ test_claim_bubble (void) GString *str; GtkAllocation allocation; - A = gtk_window_new (GTK_WINDOW_TOPLEVEL); + A = gtk_window_new (); gtk_widget_set_name (A, "A"); B = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_widget_set_name (B, "B"); @@ -725,7 +725,7 @@ test_early_claim_capture (void) GString *str; GtkAllocation allocation; - A = gtk_window_new (GTK_WINDOW_TOPLEVEL); + A = gtk_window_new (); gtk_widget_set_name (A, "A"); B = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_widget_set_name (B, "B"); @@ -782,7 +782,7 @@ test_late_claim_capture (void) GString *str; GtkAllocation allocation; - A = gtk_window_new (GTK_WINDOW_TOPLEVEL); + A = gtk_window_new (); gtk_widget_set_name (A, "A"); B = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_widget_set_name (B, "B"); @@ -841,7 +841,7 @@ test_group (void) GtkGesture *g1, *g2; GtkAllocation allocation; - A = gtk_window_new (GTK_WINDOW_TOPLEVEL); + A = gtk_window_new (); gtk_widget_set_name (A, "A"); B = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_widget_set_name (B, "B"); @@ -892,7 +892,7 @@ test_gestures_outside_grab (void) GString *str; GtkAllocation allocation; - A = gtk_window_new (GTK_WINDOW_TOPLEVEL); + A = gtk_window_new (); gtk_widget_set_name (A, "A"); B = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_widget_set_name (B, "B"); @@ -906,7 +906,7 @@ test_gestures_outside_grab (void) gtk_widget_show (A); - D = gtk_window_new (GTK_WINDOW_TOPLEVEL); + D = gtk_window_new (); gtk_widget_show (D); str = g_string_new (""); @@ -952,7 +952,7 @@ test_gestures_inside_grab (void) GString *str; GtkAllocation allocation; - A = gtk_window_new (GTK_WINDOW_TOPLEVEL); + A = gtk_window_new (); gtk_widget_set_name (A, "A"); B = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_widget_set_name (B, "B"); @@ -1012,7 +1012,7 @@ test_multitouch_on_single (void) GString *str; GtkAllocation allocation; - A = gtk_window_new (GTK_WINDOW_TOPLEVEL); + A = gtk_window_new (); gtk_widget_set_name (A, "A"); B = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_widget_set_name (B, "B"); @@ -1063,7 +1063,7 @@ test_multitouch_activation (void) GString *str; GtkAllocation allocation; - A = gtk_window_new (GTK_WINDOW_TOPLEVEL); + A = gtk_window_new (); gtk_widget_set_name (A, "A"); B = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_widget_set_name (B, "B"); @@ -1139,7 +1139,7 @@ test_multitouch_interaction (void) GString *str; GtkAllocation allocation; - A = gtk_window_new (GTK_WINDOW_TOPLEVEL); + A = gtk_window_new (); gtk_widget_set_name (A, "A"); B = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_widget_set_name (B, "B"); diff --git a/testsuite/gtk/grid-layout.c b/testsuite/gtk/grid-layout.c index 58747914e7..9ef07e1ea0 100644 --- a/testsuite/gtk/grid-layout.c +++ b/testsuite/gtk/grid-layout.c @@ -112,7 +112,7 @@ test_simple_row (void) GtkLayoutChild *lc; int minimum, natural; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); parent = g_object_new (GTK_TYPE_GIZMO, NULL); gtk_container_add (GTK_CONTAINER (window), parent); @@ -205,7 +205,7 @@ test_simple_column (void) GtkLayoutChild *lc; int minimum, natural; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); parent = g_object_new (GTK_TYPE_GIZMO, NULL); gtk_container_add (GTK_CONTAINER (window), parent); @@ -309,7 +309,7 @@ test_spans (void) GtkLayoutChild *lc; int minimum, natural; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); parent = g_object_new (GTK_TYPE_GIZMO, NULL); gtk_container_add (GTK_CONTAINER (window), parent); @@ -425,7 +425,7 @@ test_homogeneous (void) GtkLayoutChild *lc; int minimum, natural; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); parent = g_object_new (GTK_TYPE_GIZMO, NULL); gtk_container_add (GTK_CONTAINER (window), parent); @@ -550,7 +550,7 @@ test_simple_layout (void) GtkGizmo *child3; int minimum, natural; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); parent = g_object_new (GTK_TYPE_GIZMO, NULL); gtk_container_add (GTK_CONTAINER (window), parent); diff --git a/testsuite/gtk/popover.c b/testsuite/gtk/popover.c index d23b2da34f..7c30708198 100644 --- a/testsuite/gtk/popover.c +++ b/testsuite/gtk/popover.c @@ -41,7 +41,7 @@ test_show_popover (void) GtkWidget *popover; gboolean done; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); button = gtk_menu_button_new (); popover = gtk_popover_new (NULL); gtk_container_add (GTK_CONTAINER (popover), gtk_label_new ("Nu?")); diff --git a/testsuite/gtk/propertylookuplistmodel.c b/testsuite/gtk/propertylookuplistmodel.c index 21fa26445d..4e8092e06f 100644 --- a/testsuite/gtk/propertylookuplistmodel.c +++ b/testsuite/gtk/propertylookuplistmodel.c @@ -108,7 +108,7 @@ create_widget_tree (void) { GtkWidget *window, *box, *grid, *label; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); widgets = g_slist_prepend (widgets, window); box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); diff --git a/testsuite/gtk/regression-tests.c b/testsuite/gtk/regression-tests.c index f0c74374d1..6b64e863da 100644 --- a/testsuite/gtk/regression-tests.c +++ b/testsuite/gtk/regression-tests.c @@ -24,7 +24,7 @@ test_9d6da33ff5c5e41e3521e1afd63d2d67bc915753 (void) { GtkWidget *window, *label; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); label = gtk_label_new ("I am sensitive."); gtk_container_add (GTK_CONTAINER (window), label); @@ -43,7 +43,7 @@ test_94f00eb04dd1433cf1cc9a3341f485124e38abd1 (void) { GtkWidget *window, *label; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); label = gtk_label_new ("I am insensitive."); gtk_container_add (GTK_CONTAINER (window), label); diff --git a/testsuite/gtk/treeview.c b/testsuite/gtk/treeview.c index 13dc43785a..016f1a8357 100644 --- a/testsuite/gtk/treeview.c +++ b/testsuite/gtk/treeview.c @@ -193,7 +193,7 @@ test_row_separator_height (void) gtk_list_store_insert_with_values (store, &iter, 4, 0, "Row content", -1); /*window = gtk_invisible_new ();*/ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store)); gtk_tree_view_set_row_separator_func (GTK_TREE_VIEW (tree_view), diff --git a/testsuite/gtk/window.c b/testsuite/gtk/window.c index 74e488e958..d0d3dc27b4 100644 --- a/testsuite/gtk/window.c +++ b/testsuite/gtk/window.c @@ -67,7 +67,7 @@ test_default_size (void) gint w, h; gboolean done; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); if (interactive) { GtkEventController *controller = gtk_event_controller_key_new (); @@ -155,7 +155,7 @@ test_resize (void) gint w, h; gboolean done; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); if (interactive) { GtkEventController *controller = gtk_event_controller_key_new (); @@ -218,7 +218,7 @@ test_resize_popup (void) gboolean done; /* testcase for the dnd window */ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_window_set_decorated (GTK_WINDOW (window), FALSE); gtk_window_resize (GTK_WINDOW (window), 1, 1); gtk_window_get_size (GTK_WINDOW (window), &w, &h); @@ -251,7 +251,7 @@ test_show_hide (void) /* test that hide/show does not affect the size */ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + window = gtk_window_new (); gtk_widget_show (window); |