window: Remove type argument from gtk_window_new()

This commit is contained in:
Benjamin Otte 2020-02-14 20:55:36 +01:00
parent c2bd4bc3cb
commit a278edab22
190 changed files with 283 additions and 297 deletions

View File

@ -400,7 +400,7 @@ edit_constraint (ConstraintEditorWindow *win,
ConstraintEditor *editor; ConstraintEditor *editor;
GListModel *model; 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_transient_for (GTK_WINDOW (window), GTK_WINDOW (win));
gtk_window_set_resizable (GTK_WINDOW (window), FALSE); gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
if (constraint) if (constraint)
@ -440,7 +440,7 @@ edit_guide (ConstraintEditorWindow *win,
GtkWidget *window; GtkWidget *window;
GuideEditor *editor; GuideEditor *editor;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_resizable (GTK_WINDOW (window), FALSE); gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (win)); gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (win));
gtk_window_set_title (GTK_WINDOW (window), "Edit Guide"); gtk_window_set_title (GTK_WINDOW (window), "Edit Guide");

View File

@ -280,7 +280,7 @@ do_clipboard (GtkWidget *do_widget)
GtkDropTarget *dest; GtkDropTarget *dest;
GdkContentFormats *formats; GdkContentFormats *formats;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Clipboard"); gtk_window_set_title (GTK_WINDOW (window), "Clipboard");

View File

@ -69,7 +69,7 @@ do_colorsel (GtkWidget *do_widget)
color.green = 0; color.green = 0;
color.alpha = 1; color.alpha = 1;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Color Chooser"); gtk_window_set_title (GTK_WINDOW (window), "Color Chooser");

View File

@ -310,7 +310,7 @@ do_combobox (GtkWidget *do_widget)
if (!window) if (!window)
{ {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Combo Boxes"); gtk_window_set_title (GTK_WINDOW (window), "Combo Boxes");

View File

@ -255,7 +255,7 @@ do_constraints (GtkWidget *do_widget)
{ {
GtkWidget *header, *box, *grid, *button; 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)); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget));
header = gtk_header_bar_new (); header = gtk_header_bar_new ();

View File

@ -211,7 +211,7 @@ do_constraints2 (GtkWidget *do_widget)
{ {
GtkWidget *header, *box, *grid, *button; 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)); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget));
header = gtk_header_bar_new (); header = gtk_header_bar_new ();

View File

@ -131,7 +131,7 @@ do_constraints3 (GtkWidget *do_widget)
{ {
GtkWidget *header, *box, *grid, *button; 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)); gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget));
header = gtk_header_bar_new (); header = gtk_header_bar_new ();

View File

@ -24,7 +24,7 @@ do_css_accordion (GtkWidget *do_widget)
GtkWidget *container, *child; GtkWidget *container, *child;
GtkStyleProvider *provider; 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_title (GTK_WINDOW (window), "CSS Accordion");
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (do_widget)); gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (do_widget));
gtk_window_set_default_size (GTK_WINDOW (window), 600, 300); gtk_window_set_default_size (GTK_WINDOW (window), 600, 300);

View File

@ -72,7 +72,7 @@ do_css_basics (GtkWidget *do_widget)
GtkTextBuffer *text; GtkTextBuffer *text;
GBytes *bytes; 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_title (GTK_WINDOW (window), "CSS Basics");
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (do_widget)); gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (do_widget));
gtk_window_set_default_size (GTK_WINDOW (window), 400, 300); gtk_window_set_default_size (GTK_WINDOW (window), 400, 300);

View File

@ -86,7 +86,7 @@ do_css_multiplebgs (GtkWidget *do_widget)
GtkTextBuffer *text; GtkTextBuffer *text;
GBytes *bytes; 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_title (GTK_WINDOW (window), "Multiple Backgrounds");
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (do_widget)); gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (do_widget));
gtk_window_set_default_size (GTK_WINDOW (window), 400, 300); gtk_window_set_default_size (GTK_WINDOW (window), 400, 300);

View File

@ -72,7 +72,7 @@ do_css_pixbufs (GtkWidget *do_widget)
GtkTextBuffer *text; GtkTextBuffer *text;
GBytes *bytes; 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_title (GTK_WINDOW (window), "Animated Backgrounds");
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (do_widget)); gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (do_widget));
gtk_window_set_default_size (GTK_WINDOW (window), 400, 300); gtk_window_set_default_size (GTK_WINDOW (window), 400, 300);

View File

@ -91,7 +91,7 @@ do_css_shadows (GtkWidget *do_widget)
GtkTextBuffer *text; GtkTextBuffer *text;
GBytes *bytes; GBytes *bytes;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_title (GTK_WINDOW (window), "Shadows"); gtk_window_set_title (GTK_WINDOW (window), "Shadows");
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (do_widget)); gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (do_widget));
gtk_window_set_default_size (GTK_WINDOW (window), 400, 300); gtk_window_set_default_size (GTK_WINDOW (window), 400, 300);

View File

@ -105,7 +105,7 @@ do_dialog (GtkWidget *do_widget)
if (!window) if (!window)
{ {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Dialogs and Message Boxes"); gtk_window_set_title (GTK_WINDOW (window), "Dialogs and Message Boxes");

View File

@ -356,7 +356,7 @@ do_dnd (GtkWidget *do_widget)
GtkGesture *multipress; GtkGesture *multipress;
GtkCssProvider *provider; GtkCssProvider *provider;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Drag-and-drop"); gtk_window_set_title (GTK_WINDOW (window), "Drag-and-drop");

View File

@ -189,7 +189,7 @@ do_drawingarea (GtkWidget *do_widget)
if (!window) if (!window)
{ {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Drawing Area"); gtk_window_set_title (GTK_WINDOW (window), "Drawing Area");

View File

@ -345,7 +345,7 @@ do_editable_cells (GtkWidget *do_widget)
GtkTreeModel *items_model; GtkTreeModel *items_model;
GtkTreeModel *numbers_model; GtkTreeModel *numbers_model;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Editable Cells"); gtk_window_set_title (GTK_WINDOW (window), "Editable Cells");

View File

@ -45,7 +45,7 @@ do_entry_completion (GtkWidget *do_widget)
if (!window) if (!window)
{ {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Entry Completion"); gtk_window_set_title (GTK_WINDOW (window), "Entry Completion");

View File

@ -20,7 +20,7 @@ do_entry_undo (GtkWidget *do_widget)
if (!window) if (!window)
{ {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Entry Undo"); gtk_window_set_title (GTK_WINDOW (window), "Entry Undo");

View File

@ -124,7 +124,7 @@ create_demo_window (GtkWidget *do_widget)
{ {
GtkWidget *window, *sw, *fixed, *cube; 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_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Fixed layout"); gtk_window_set_title (GTK_WINDOW (window), "Fixed layout");
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400); gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);

View File

@ -719,7 +719,7 @@ do_flowbox (GtkWidget *do_widget)
if (!window) if (!window)
{ {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Flow Box"); gtk_window_set_title (GTK_WINDOW (window), "Flow Box");

View File

@ -146,7 +146,7 @@ do_gestures (GtkWidget *do_widget)
if (!window) 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_default_size (GTK_WINDOW (window), 400, 400);
gtk_window_set_title (GTK_WINDOW (window), "Gestures"); gtk_window_set_title (GTK_WINDOW (window), "Gestures");
g_signal_connect (window, "destroy", g_signal_connect (window, "destroy",

View File

@ -389,7 +389,7 @@ create_glarea_window (GtkWidget *do_widget)
GtkWidget *window, *box, *button, *controls; GtkWidget *window, *box, *button, *controls;
int i; 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_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "OpenGL Area"); gtk_window_set_title (GTK_WINDOW (window), "OpenGL Area");
gtk_window_set_default_size (GTK_WINDOW (window), 400, 600); gtk_window_set_default_size (GTK_WINDOW (window), 400, 600);

View File

@ -23,7 +23,7 @@ do_headerbar (GtkWidget *do_widget)
if (!window) 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_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget));
g_signal_connect (window, "destroy", g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window); G_CALLBACK (gtk_widget_destroyed), &window);

View File

@ -232,7 +232,7 @@ do_hypertext (GtkWidget *do_widget)
GtkTextBuffer *buffer; GtkTextBuffer *buffer;
GtkEventController *controller; GtkEventController *controller;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_title (GTK_WINDOW (window), "Hypertext"); gtk_window_set_title (GTK_WINDOW (window), "Hypertext");
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));

View File

@ -250,7 +250,7 @@ do_iconview (GtkWidget *do_widget)
GtkWidget *tool_bar; GtkWidget *tool_bar;
GtkWidget *home_button; 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_default_size (GTK_WINDOW (window), 650, 400);
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),

View File

@ -106,7 +106,7 @@ do_iconview_edit (GtkWidget *do_widget)
GtkListStore *store; GtkListStore *store;
GtkCellRenderer *renderer; GtkCellRenderer *renderer;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));

View File

@ -331,7 +331,7 @@ do_images (GtkWidget *do_widget)
if (!window) if (!window)
{ {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Images"); gtk_window_set_title (GTK_WINDOW (window), "Images");

View File

@ -53,7 +53,7 @@ do_infobar (GtkWidget *do_widget)
{ {
actions = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); 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_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Info Bars"); gtk_window_set_title (GTK_WINDOW (window), "Info Bars");

View File

@ -52,7 +52,7 @@ do_links (GtkWidget *do_widget)
if (!window) if (!window)
{ {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Links"); gtk_window_set_title (GTK_WINDOW (window), "Links");

View File

@ -255,7 +255,7 @@ do_list_store (GtkWidget *do_widget)
GtkWidget *treeview; GtkWidget *treeview;
/* create window, etc */ /* create window, etc */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "List Store"); gtk_window_set_title (GTK_WINDOW (window), "List Store");

View File

@ -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); 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_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "List Box"); gtk_window_set_title (GTK_WINDOW (window), "List Box");

View File

@ -54,7 +54,7 @@ do_markup (GtkWidget *do_widget)
GtkWidget *header; GtkWidget *header;
GtkWidget *show_source; GtkWidget *show_source;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_default_size (GTK_WINDOW (window), 450, 450); gtk_window_set_default_size (GTK_WINDOW (window), 450, 450);

View File

@ -31,7 +31,7 @@ do_overlay (GtkWidget *do_widget)
int i, j; int i, j;
char *text; 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_default_size (GTK_WINDOW (window), 500, 510);
gtk_window_set_title (GTK_WINDOW (window), "Interactive Overlay"); gtk_window_set_title (GTK_WINDOW (window), "Interactive Overlay");

View File

@ -35,7 +35,7 @@ do_overlay2 (GtkWidget *do_widget)
GtkTextIter start, end; GtkTextIter start, end;
GtkAdjustment *adjustment; 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_default_size (GTK_WINDOW (window), 500, 510);
gtk_window_set_title (GTK_WINDOW (window), "Decorative Overlay"); gtk_window_set_title (GTK_WINDOW (window), "Decorative Overlay");

View File

@ -384,7 +384,7 @@ do_paint (GtkWidget *toplevel)
{ {
GtkWidget *draw_area, *headerbar, *colorbutton; GtkWidget *draw_area, *headerbar, *colorbutton;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
draw_area = drawing_area_new (); draw_area = drawing_area_new ();
gtk_container_add (GTK_CONTAINER (window), draw_area); gtk_container_add (GTK_CONTAINER (window), draw_area);

View File

@ -156,7 +156,7 @@ do_paintable (GtkWidget *do_widget)
if (!window) if (!window)
{ {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Nuclear Icon"); gtk_window_set_title (GTK_WINDOW (window), "Nuclear Icon");

View File

@ -188,7 +188,7 @@ do_paintable_animated (GtkWidget *do_widget)
if (!window) if (!window)
{ {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Nuclear Animation"); gtk_window_set_title (GTK_WINDOW (window), "Nuclear Animation");

View File

@ -288,7 +288,7 @@ do_paintable_mediastream (GtkWidget *do_widget)
if (!window) if (!window)
{ {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Nuclear MediaStream"); gtk_window_set_title (GTK_WINDOW (window), "Nuclear MediaStream");

View File

@ -146,7 +146,7 @@ do_panes (GtkWidget *do_widget)
if (!window) if (!window)
{ {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));

View File

@ -36,7 +36,7 @@ do_password_entry (GtkWidget *do_widget)
if (!window) if (!window)
{ {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
header = gtk_header_bar_new (); header = gtk_header_bar_new ();

View File

@ -14,7 +14,7 @@ do_pickers (GtkWidget *do_widget)
if (!window) if (!window)
{ {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Pickers"); gtk_window_set_title (GTK_WINDOW (window), "Pickers");

View File

@ -174,7 +174,7 @@ do_pixbufs (GtkWidget *do_widget)
{ {
GError *error; GError *error;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Pixbufs"); gtk_window_set_title (GTK_WINDOW (window), "Pixbufs");

View File

@ -130,7 +130,7 @@ do_popover (GtkWidget *do_widget)
if (!window) if (!window)
{ {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_title (GTK_WINDOW (window), "Popovers"); gtk_window_set_title (GTK_WINDOW (window), "Popovers");
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 24); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 24);
g_object_set (box, "margin", 24, NULL); g_object_set (box, "margin", 24, NULL);

View File

@ -178,7 +178,7 @@ do_rotated_text (GtkWidget *do_widget)
PangoLayout *layout; PangoLayout *layout;
PangoAttrList *attrs; PangoAttrList *attrs;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Rotated Text"); gtk_window_set_title (GTK_WINDOW (window), "Rotated Text");

View File

@ -250,7 +250,7 @@ do_search_entry (GtkWidget *do_widget)
if (!window) 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_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Search Entry"); gtk_window_set_title (GTK_WINDOW (window), "Search Entry");
gtk_window_set_resizable (GTK_WINDOW (window), FALSE); gtk_window_set_resizable (GTK_WINDOW (window), FALSE);

View File

@ -68,7 +68,7 @@ do_search_entry2 (GtkWidget *do_widget)
if (!window) 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_title (GTK_WINDOW (window), "Delayed Search Entry");
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (do_widget)); gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (do_widget));
gtk_window_set_resizable (GTK_WINDOW (window), TRUE); gtk_window_set_resizable (GTK_WINDOW (window), TRUE);

View File

@ -35,7 +35,7 @@ do_sidebar (GtkWidget *do_widget)
if (!window) if (!window)
{ {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_resizable (GTK_WINDOW (window), TRUE); gtk_window_set_resizable (GTK_WINDOW (window), TRUE);
gtk_widget_set_size_request (window, 500, 350); gtk_widget_set_size_request (window, 500, 350);

View File

@ -100,7 +100,7 @@ do_sizegroup (GtkWidget *do_widget)
if (!window) 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_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Size Groups"); gtk_window_set_title (GTK_WINDOW (window), "Size Groups");
gtk_window_set_resizable (GTK_WINDOW (window), FALSE); gtk_window_set_resizable (GTK_WINDOW (window), FALSE);

View File

@ -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_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), restart); gtk_header_bar_pack_start (GTK_HEADER_BAR (header), restart);
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), tweak); 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_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Sliding Puzzle"); gtk_window_set_title (GTK_WINDOW (window), "Sliding Puzzle");

View File

@ -18,7 +18,7 @@ do_tabs (GtkWidget *do_widget)
GtkTextBuffer *buffer; GtkTextBuffer *buffer;
PangoTabArray *tabs; PangoTabArray *tabs;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_title (GTK_WINDOW (window), "Tabs"); gtk_window_set_title (GTK_WINDOW (window), "Tabs");
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));

View File

@ -63,7 +63,7 @@ do_tagged_entry (GtkWidget *do_widget)
if (!window) if (!window)
{ {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
header = gtk_header_bar_new (); header = gtk_header_bar_new ();

View File

@ -59,7 +59,7 @@ do_textmask (GtkWidget *do_widget)
if (!window) if (!window)
{ {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_resizable (GTK_WINDOW (window), TRUE); gtk_window_set_resizable (GTK_WINDOW (window), TRUE);
gtk_widget_set_size_request (window, 400, 200); gtk_widget_set_size_request (window, 400, 200);
gtk_window_set_title (GTK_WINDOW (window), "Text Mask"); gtk_window_set_title (GTK_WINDOW (window), "Text Mask");

View File

@ -180,7 +180,7 @@ do_textscroll (GtkWidget *do_widget)
{ {
GtkWidget *hbox; GtkWidget *hbox;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_title (GTK_WINDOW (window), "Automatic Scrolling"); gtk_window_set_title (GTK_WINDOW (window), "Automatic Scrolling");
g_signal_connect (window, "destroy", g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window); G_CALLBACK (gtk_widget_destroyed), &window);

View File

@ -23,7 +23,7 @@ do_textundo (GtkWidget *do_widget)
GtkTextBuffer *buffer; GtkTextBuffer *buffer;
GtkTextIter iter; GtkTextIter iter;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_default_size (GTK_WINDOW (window), gtk_window_set_default_size (GTK_WINDOW (window),

View File

@ -474,7 +474,7 @@ do_textview (GtkWidget *do_widget)
GtkWidget *sw; GtkWidget *sw;
GtkTextBuffer *buffer; GtkTextBuffer *buffer;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_default_size (GTK_WINDOW (window), gtk_window_set_default_size (GTK_WINDOW (window),
@ -588,7 +588,7 @@ easter_egg_callback (GtkWidget *button,
g_object_unref (buffer); g_object_unref (buffer);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
sw = gtk_scrolled_window_new (NULL, NULL); sw = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC,

View File

@ -20,7 +20,7 @@ do_theming_style_classes (GtkWidget *do_widget)
if (!window) if (!window)
{ {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Style Classes"); gtk_window_set_title (GTK_WINDOW (window), "Style Classes");

View File

@ -18,7 +18,7 @@ do_transparent (GtkWidget *do_widget)
GtkWidget *label; GtkWidget *label;
GtkWidget *picture; GtkWidget *picture;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_default_size (GTK_WINDOW (window), 450, 450); gtk_window_set_default_size (GTK_WINDOW (window), 450, 450);

View File

@ -390,7 +390,7 @@ do_tree_store (GtkWidget *do_widget)
GtkTreeModel *model; GtkTreeModel *model;
/* create window, etc */ /* create window, etc */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Tree Store"); gtk_window_set_title (GTK_WINDOW (window), "Tree Store");

View File

@ -63,7 +63,7 @@ do_video_player (GtkWidget *do_widget)
if (!window) if (!window)
{ {
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget)); gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Video Player"); gtk_window_set_title (GTK_WINDOW (window), "Video Player");

View File

@ -41,7 +41,7 @@ new_widget_info (const char *name,
} }
else else
{ {
info->window = gtk_window_new (GTK_WINDOW_TOPLEVEL); info->window = gtk_window_new ();
info->include_decorations = FALSE; info->include_decorations = FALSE;
gtk_widget_show (widget); gtk_widget_show (widget);
gtk_container_add (GTK_CONTAINER (info->window), widget); gtk_container_add (GTK_CONTAINER (info->window), widget);
@ -711,7 +711,7 @@ create_window (void)
WidgetInfo *info; WidgetInfo *info;
GtkWidget *widget; GtkWidget *widget;
widget = gtk_window_new (GTK_WINDOW_TOPLEVEL); widget = gtk_window_new ();
info = new_widget_info ("window", widget, MEDIUM); info = new_widget_info ("window", widget, MEDIUM);
info->include_decorations = TRUE; info->include_decorations = TRUE;
gtk_window_set_title (GTK_WINDOW (info->window), "Window"); gtk_window_set_title (GTK_WINDOW (info->window), "Window");
@ -1016,7 +1016,7 @@ create_volume_button (void)
GtkWidget *widget; GtkWidget *widget;
GtkWidget *popup; GtkWidget *popup;
widget = gtk_window_new (GTK_WINDOW_TOPLEVEL); widget = gtk_window_new ();
gtk_widget_set_size_request (widget, 100, 250); gtk_widget_set_size_request (widget, 100, 250);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
@ -1129,7 +1129,7 @@ create_headerbar (void)
GtkWidget *view; GtkWidget *view;
GtkWidget *button; GtkWidget *button;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
view = gtk_text_view_new (); view = gtk_text_view_new ();
gtk_widget_show (view); gtk_widget_show (view);
gtk_widget_set_size_request (window, 220, 150); gtk_widget_set_size_request (window, 220, 150);

View File

@ -68,7 +68,7 @@
* gtk_init (); * gtk_init ();
* *
* // Create the main window * // Create the main window
* mainwin = gtk_window_new (GTK_WINDOW_TOPLEVEL); * mainwin = gtk_window_new ();
* *
* // Set up our GUI elements * // Set up our GUI elements
* *

View File

@ -1756,7 +1756,7 @@ gtk_print_operation_run_with_dialog (GtkPrintOperation *op,
if (parent == NULL) if (parent == NULL)
{ {
invisible = gtk_window_new (GTK_WINDOW_TOPLEVEL); invisible = gtk_window_new ();
parentHWnd = get_parent_hwnd (invisible); parentHWnd = get_parent_hwnd (invisible);
} }
else else

View File

@ -97,7 +97,7 @@
* void create_radio_buttons (void) { * void create_radio_buttons (void) {
* *
* GtkWidget *window, *radio1, *radio2, *box, *entry; * 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); * box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
* gtk_box_set_homogeneous (GTK_BOX (box), TRUE); * gtk_box_set_homogeneous (GTK_BOX (box), TRUE);
* *

View File

@ -140,7 +140,7 @@
* *
* adjustment = gtk_adjustment_new (50.0, 0.0, 100.0, 1.0, 5.0, 0.0); * 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 * // creates the spinbutton, with no decimal places
* button = gtk_spin_button_new (adjustment, 1.0, 0); * 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); * 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 * // creates the spinbutton, with three decimal places
* button = gtk_spin_button_new (adjustment, 0.001, 3); * button = gtk_spin_button_new (adjustment, 0.001, 3);

View File

@ -75,7 +75,7 @@
* GtkWidget *box; * GtkWidget *box;
* const char *text; * const char *text;
* *
* window = gtk_window_new (GTK_WINDOW_TOPLEVEL); * window = gtk_window_new ();
* box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12); * box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
* *
* text = "Hi, Im a toggle button."; * text = "Hi, Im a toggle button.";

View File

@ -2390,20 +2390,12 @@ gtk_window_native_interface_init (GtkNativeInterface *iface)
/** /**
* gtk_window_new: * gtk_window_new:
* @type: type of window
* *
* Creates a new #GtkWindow, which is a toplevel window that can * Creates a new #GtkWindow, which is a toplevel window that can
* contain other widgets. Nearly always, the type of the window should * contain other widgets.
* be #GTK_WINDOW_TOPLEVEL. If youre 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 * To get an undecorated window (no window borders), use
* gtk_window_set_decorated(), dont use #GTK_WINDOW_POPUP. * gtk_window_set_decorated().
* *
* All top-level windows created by gtk_window_new() are stored in * All top-level windows created by gtk_window_new() are stored in
* an internal top-level window list. This list can be obtained from * 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. * Returns: a new #GtkWindow.
**/ **/
GtkWidget* GtkWidget*
gtk_window_new (GtkWindowType type) gtk_window_new (void)
{ {
GtkWindow *window; return g_object_new (GTK_TYPE_WINDOW, NULL);
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);
} }
static void static void
@ -4539,7 +4525,7 @@ gtk_window_resize (GtkWindow *window,
* way that this code: * way that this code:
* *
* |[<!-- language="C" --> * |[<!-- language="C" -->
* GtkWindow *window = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL)); * GtkWindow *window = GTK_WINDOW (gtk_window_new ());
* int width = 500; * int width = 500;
* int height = 300; * int height = 300;
* gtk_window_resize (window, width, height); * gtk_window_resize (window, width, height);

View File

@ -112,7 +112,7 @@ typedef enum
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
GType gtk_window_get_type (void) G_GNUC_CONST; GType gtk_window_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
GtkWidget* gtk_window_new (GtkWindowType type); GtkWidget* gtk_window_new (void);
GDK_AVAILABLE_IN_ALL GDK_AVAILABLE_IN_ALL
void gtk_window_set_title (GtkWindow *window, void gtk_window_set_title (GtkWindow *window,
const gchar *title); const gchar *title);

View File

@ -127,7 +127,7 @@ preview_file (const char *filename,
{ {
GtkWidget *widget = GTK_WIDGET (object); GtkWidget *widget = GTK_WIDGET (object);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
if (GTK_IS_BUILDABLE (object)) if (GTK_IS_BUILDABLE (object))
id = gtk_buildable_get_name (GTK_BUILDABLE (object)); id = gtk_buildable_get_name (GTK_BUILDABLE (object));

View File

@ -198,7 +198,7 @@ main(int argc, char **argv)
g_print ("# Resizing?: %s\n", g_print ("# Resizing?: %s\n",
cb_no_resize ? "no" : "yes"); cb_no_resize ? "no" : "yes");
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
frame_stats_ensure (GTK_WINDOW (window)); frame_stats_ensure (GTK_WINDOW (window));
da = gtk_drawing_area_new (); da = gtk_drawing_area_new ();

View File

@ -49,7 +49,7 @@ main(int argc, char **argv)
gtk_init (); gtk_init ();
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);
frame_stats_ensure (GTK_WINDOW (window)); frame_stats_ensure (GTK_WINDOW (window));

View File

@ -129,7 +129,7 @@ main (int argc, char *argv[])
gtk_init (); 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_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); gtk_window_set_default_size (GTK_WINDOW (window), 640, 640);
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);

View File

@ -189,7 +189,7 @@ main (int argc, char *argv[])
g_object_unref (obj); g_object_unref (obj);
} }
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
grid = gtk_grid_new (); grid = gtk_grid_new ();
gtk_container_add (GTK_CONTAINER (window), grid); gtk_container_add (GTK_CONTAINER (window), grid);
sw = gtk_scrolled_window_new (NULL, NULL); sw = gtk_scrolled_window_new (NULL, NULL);

View File

@ -58,7 +58,7 @@ main (int argc, char **argv)
gtk_init (); gtk_init ();
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_default_size (GTK_WINDOW (window), 300, 300); gtk_window_set_default_size (GTK_WINDOW (window), 300, 300);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);

View File

@ -65,7 +65,7 @@ main (int argc, char *argv[])
gtk_init (); gtk_init ();
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_default_size (GTK_WINDOW (window), 640, 480); gtk_window_set_default_size (GTK_WINDOW (window), 640, 480);
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);

View File

@ -126,7 +126,7 @@ main (int argc, char **argv)
gtk_init (); gtk_init ();
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
frame_stats_ensure (GTK_WINDOW (window)); frame_stats_ensure (GTK_WINDOW (window));
gtk_window_set_default_size (GTK_WINDOW (window), 800, 600); gtk_window_set_default_size (GTK_WINDOW (window), 800, 600);

View File

@ -162,7 +162,7 @@ main (int argc, char **argv)
gtk_init (); gtk_init ();
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
nodeview = g_object_new (GTK_TYPE_NODE_VIEW, NULL); nodeview = g_object_new (GTK_TYPE_NODE_VIEW, NULL);
gtk_window_set_decorated (GTK_WINDOW (window), FALSE); gtk_window_set_decorated (GTK_WINDOW (window), FALSE);

View File

@ -44,7 +44,7 @@ main (int argc, char *argv[])
gtk_init (); 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_title (GTK_WINDOW (window), "hello world");
gtk_window_set_resizable (GTK_WINDOW (window), FALSE); gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);

View File

@ -22,7 +22,7 @@ main (int argc, char *argv[])
gtk_init (); gtk_init ();
win = gtk_window_new (GTK_WINDOW_TOPLEVEL); win = gtk_window_new ();
gtk_window_set_default_size (GTK_WINDOW (win), 640, 480); gtk_window_set_default_size (GTK_WINDOW (win), 640, 480);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5); box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);

View File

@ -67,7 +67,7 @@ key_test (void)
GtkWidget *box, *entry; GtkWidget *box, *entry;
/* create window */ /* create 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_default_size (GTK_WINDOW (window), 400, 400);
sw = gtk_scrolled_window_new (NULL, NULL); sw = gtk_scrolled_window_new (NULL, NULL);

View File

@ -75,7 +75,7 @@ open_test_window (void)
GtkWidget *grid; GtkWidget *grid;
int i; int i;
test_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); test_window = gtk_window_new ();
gtk_window_set_title (GTK_WINDOW (test_window), "Tests"); gtk_window_set_title (GTK_WINDOW (test_window), "Tests");
g_signal_connect (test_window, "destroy", G_CALLBACK (quit_cb), &done); g_signal_connect (test_window, "destroy", G_CALLBACK (quit_cb), &done);
@ -140,7 +140,7 @@ open_control_window (void)
GtkWidget *box; GtkWidget *box;
GtkWidget *toggle; GtkWidget *toggle;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_title (GTK_WINDOW (window), "Controls"); gtk_window_set_title (GTK_WINDOW (window), "Controls");
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);
@ -239,7 +239,7 @@ open_alignment_window (void)
int i; int i;
GEnumClass *align_class; 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"); gtk_window_set_title (GTK_WINDOW (test_window), "Alignment");
g_signal_connect (test_window, "destroy", G_CALLBACK (quit_cb), &done); g_signal_connect (test_window, "destroy", G_CALLBACK (quit_cb), &done);
@ -300,7 +300,7 @@ open_margin_window (void)
"margin" "margin"
}; };
test_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); test_window = gtk_window_new ();
gtk_window_set_title (GTK_WINDOW (test_window), "Margin"); gtk_window_set_title (GTK_WINDOW (test_window), "Margin");
g_signal_connect (test_window, "destroy", G_CALLBACK (quit_cb), &done); 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; 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); g_signal_connect (test_window, "destroy", G_CALLBACK (quit_cb), &done);

View File

@ -171,7 +171,7 @@ main (int argc, char **argv)
gtk_init (); gtk_init ();
toplevel = gtk_window_new (GTK_WINDOW_TOPLEVEL); toplevel = gtk_window_new ();
grid = gtk_grid_new (); grid = gtk_grid_new ();
w1 = gtk_label_new ("File:"); w1 = gtk_label_new ("File:");

View File

@ -80,7 +80,7 @@ main (int argc,
gtk_init (); gtk_init ();
toplevel = gtk_window_new (GTK_WINDOW_TOPLEVEL); toplevel = gtk_window_new ();
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_container_add (GTK_CONTAINER (toplevel), box); gtk_container_add (GTK_CONTAINER (toplevel), box);

View File

@ -713,7 +713,7 @@ main (int argc, gchar *argv[])
if (g_getenv ("RTL")) if (g_getenv ("RTL"))
gtk_widget_set_default_direction (GTK_TEXT_DIR_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); gtk_window_set_hide_on_close (GTK_WINDOW (window), TRUE);
g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (quit_cb), &done); g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (quit_cb), &done);

View File

@ -99,7 +99,7 @@ main (int argc,
GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_object_unref (provider); 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); g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (quit_cb), &done);
notebook = gtk_notebook_new (); notebook = gtk_notebook_new ();

View File

@ -94,7 +94,7 @@ main (int argc, char **argv)
gtk_init (); gtk_init ();
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);
blur_box = g_object_new (gtk_blur_box_get_type (), blur_box = g_object_new (gtk_blur_box_get_type (),

View File

@ -106,7 +106,7 @@ main (int argc, char **argv)
GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 40); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 40);
top = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 40); top = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 40);
bottom = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 40); bottom = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 40);

View File

@ -83,7 +83,7 @@ main (int argc, char *argv[])
gtk_init (); gtk_init ();
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (window), vbox); gtk_container_add (GTK_CONTAINER (window), vbox);

View File

@ -29,7 +29,7 @@ int main (int argc, char *argv[])
gtk_init (); gtk_init ();
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);

View File

@ -203,7 +203,7 @@ main (int argc, char **argv)
gtk_init (); 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_default_size (GTK_WINDOW (window), 400, 400);
gtk_window_set_title (GTK_WINDOW (window), "cairo: Knockout Groups"); gtk_window_set_title (GTK_WINDOW (window), "cairo: Knockout Groups");

View File

@ -195,7 +195,7 @@ create_calendar(void)
}; };
gboolean done = FALSE; 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_hide_on_close (GTK_WINDOW (window), TRUE);
gtk_window_set_title (GTK_WINDOW (window), "GtkCalendar Example"); gtk_window_set_title (GTK_WINDOW (window), "GtkCalendar Example");
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);

View File

@ -180,7 +180,7 @@ simple_cell_area (void)
GtkWidget *window, *widget; GtkWidget *window, *widget;
GtkWidget *iconview, *frame, *vbox, *hbox; 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"); gtk_window_set_title (GTK_WINDOW (window), "CellArea expand and alignments");
@ -423,7 +423,7 @@ focus_cell_area (void)
GtkWidget *window, *widget; GtkWidget *window, *widget;
GtkWidget *iconview, *frame, *vbox, *hbox; GtkWidget *iconview, *frame, *vbox, *hbox;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
gtk_widget_show (hbox); gtk_widget_show (hbox);
@ -512,7 +512,7 @@ background_area (void)
GtkWidget *window, *widget, *label, *main_vbox; GtkWidget *window, *widget, *label, *main_vbox;
GtkWidget *iconview, *frame, *vbox, *hbox; GtkWidget *iconview, *frame, *vbox, *hbox;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4); main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
gtk_widget_show (hbox); gtk_widget_show (hbox);

View File

@ -268,7 +268,7 @@ main (int argc, char **argv)
gtk_init (); gtk_init ();
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
g_signal_connect (window, "destroy", g_signal_connect (window, "destroy",
G_CALLBACK (quit_cb), &done); G_CALLBACK (quit_cb), &done);

View File

@ -24,7 +24,7 @@ main (int argc, char *argv[])
if (g_getenv ("RTL")) if (g_getenv ("RTL"))
gtk_widget_set_default_direction (GTK_TEXT_DIR_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 (); box = gtk_center_box_new ();
gtk_container_add (GTK_CONTAINER (window), box); gtk_container_add (GTK_CONTAINER (window), box);

View File

@ -449,7 +449,7 @@ main (int argc, char **argv)
if (alt_display == NULL) if (alt_display == NULL)
alt_display = gdk_display_get_default (); 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); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);
gtk_container_add (GTK_CONTAINER (window), gtk_container_add (GTK_CONTAINER (window),
get_window_contents (gtk_widget_get_display (window), get_window_contents (gtk_widget_get_display (window),

View File

@ -950,7 +950,7 @@ main (int argc, char **argv)
if (g_getenv ("RTL")) if (g_getenv ("RTL"))
gtk_widget_set_default_direction (GTK_TEXT_DIR_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); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);
mainbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2); mainbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);

View File

@ -323,7 +323,7 @@ main (int argc, char *argv[])
gtk_init (); gtk_init ();
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400); gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);

View File

@ -503,7 +503,7 @@ popup_cb (gpointer data)
int i, j; int i, j;
GdkContentFormats *targets; GdkContentFormats *targets;
popup_window = gtk_window_new (GTK_WINDOW_POPUP); popup_window = gtk_window_new ();
grid = gtk_grid_new (); grid = gtk_grid_new ();
targets = gdk_content_formats_new_for_gtype (G_TYPE_STRING); targets = gdk_content_formats_new_for_gtype (G_TYPE_STRING);
@ -615,7 +615,7 @@ main (int argc, char **argv)
gtk_init (); gtk_init ();
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
g_signal_connect (window, "destroy", g_signal_connect (window, "destroy",
G_CALLBACK (quit_cb), &done); G_CALLBACK (quit_cb), &done);

View File

@ -467,7 +467,7 @@ main (int argc, char *Argv[])
gtk_init (); 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_title (GTK_WINDOW (window), "Drag And Drop");
gtk_window_set_resizable (GTK_WINDOW (window), FALSE); gtk_window_set_resizable (GTK_WINDOW (window), FALSE);

View File

@ -341,7 +341,7 @@ int main (int argc, char *argv[])
widget = gtk_color_button_new (); widget = gtk_color_button_new ();
gtk_widget_destroy (widget); 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); gtk_window_set_default_size (GTK_WINDOW (window), 640, 480);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);

View File

@ -114,7 +114,7 @@ main (int argc, char *argv[])
gtk_init (); gtk_init ();
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new ();
gtk_window_set_default_size (GTK_WINDOW (window), 400, 300); gtk_window_set_default_size (GTK_WINDOW (window), 400, 300);
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done); g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);

Some files were not shown because too many files have changed in this diff Show More