Merge branch 'wip/otte/for-master' into 'master'

Drop GTK_WINDOW_POPUP

See merge request GNOME/gtk!1437
This commit is contained in:
Benjamin Otte 2020-02-14 20:42:11 +00:00
commit 5f7054862b
307 changed files with 755 additions and 680 deletions

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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 ();

View File

@ -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 ();

View File

@ -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 ();

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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);

View File

@ -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");

View File

@ -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",

View File

@ -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);

View File

@ -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);

View File

@ -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));

View File

@ -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),

View File

@ -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));

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

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);
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");

View File

@ -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);

View File

@ -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");

View File

@ -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");

View File

@ -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);

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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));

View File

@ -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 ();

View File

@ -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");

View File

@ -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");

View File

@ -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);

View File

@ -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");

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

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_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");

View File

@ -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));

View File

@ -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 ();

View File

@ -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");

View File

@ -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);

View File

@ -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),

View File

@ -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,

View File

@ -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");

View File

@ -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);

View File

@ -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");

View File

@ -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");

View File

@ -177,7 +177,6 @@ GdkSurfaceEdge
GdkSurfaceTypeHint
GdkSurfaceState
gdk_surface_new_toplevel
gdk_surface_new_temp
gdk_surface_new_popup
gdk_surface_get_parent
gdk_surface_destroy

View File

@ -4189,6 +4189,7 @@ gtk_widget_insert_after
gtk_widget_set_layout_manager
gtk_widget_get_layout_manager
gtk_widget_should_layout
gtk_widget_get_css_name
gtk_widget_add_css_class
gtk_widget_remove_css_class
gtk_widget_has_css_class
@ -4286,7 +4287,6 @@ gtk_requisition_get_type
<TITLE>GtkWindow</TITLE>
GtkWindow
GtkWindowClass
GtkWindowType
gtk_window_new
gtk_window_set_title
gtk_window_set_resizable
@ -4354,7 +4354,6 @@ gtk_window_get_accept_focus
gtk_window_get_focus_on_map
gtk_window_get_group
gtk_window_has_group
gtk_window_get_window_type
gtk_window_resize
gtk_window_set_default_icon_name
gtk_window_set_icon_name

View File

@ -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);

View File

@ -276,6 +276,8 @@ GdkGrabStatus gdk_seat_grab (GdkSeat *seat,
GdkSeatGrabPrepareFunc prepare_func,
gpointer prepare_func_data);
void gdk_seat_ungrab (GdkSeat *seat);
GdkSurface * gdk_surface_new_temp (GdkDisplay *display,
const GdkRectangle *position);
G_END_DECLS

View File

@ -420,9 +420,6 @@ GdkSurface * gdk_surface_new_toplevel (GdkDisplay *display,
int width,
int height);
GDK_AVAILABLE_IN_ALL
GdkSurface * gdk_surface_new_temp (GdkDisplay *display,
const GdkRectangle *position);
GDK_AVAILABLE_IN_ALL
GdkSurface * gdk_surface_new_popup (GdkDisplay *display,
GdkSurface *parent,
gboolean autohide);

View File

@ -76,22 +76,6 @@ gtk_window_accessible_notify_gtk (GObject *obj,
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_window_accessible_parent_class)->notify_gtk (obj, pspec);
}
static void
gtk_window_accessible_initialize (AtkObject *obj,
gpointer data)
{
GtkWidget *widget = GTK_WIDGET (data);
ATK_OBJECT_CLASS (gtk_window_accessible_parent_class)->initialize (obj, data);
_gtk_widget_accessible_set_layer (GTK_WIDGET_ACCESSIBLE (obj), ATK_LAYER_WINDOW);
if (gtk_window_get_window_type (GTK_WINDOW (widget)) == GTK_WINDOW_POPUP)
obj->role = ATK_ROLE_WINDOW;
else
obj->role = ATK_ROLE_FRAME;
}
static GtkWidget *
find_label_child (GtkContainer *container)
{
@ -351,7 +335,6 @@ gtk_window_accessible_class_init (GtkWindowAccessibleClass *klass)
class->get_index_in_parent = gtk_window_accessible_get_index_in_parent;
class->ref_relation_set = gtk_window_accessible_ref_relation_set;
class->ref_state_set = gtk_window_accessible_ref_state_set;
class->initialize = gtk_window_accessible_initialize;
class->focus_event = gtk_window_accessible_focus_event;
class->get_n_children = gtk_window_accessible_get_n_children;
class->ref_child = gtk_window_accessible_ref_child;

View File

@ -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
*

View File

@ -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

View File

@ -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);
*

View File

@ -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);

View File

@ -4118,7 +4118,7 @@ find_child_for_window_type (GtkTextView *text_view,
/**
* gtk_text_view_get_gutter:
* @text_view: a #GtkTextView
* @win: a #GtkWindowType
* @win: a #GtkTextWindowType
*
* Gets a #GtkWidget that has previously been set with
* gtk_text_view_set_gutter().

View File

@ -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, Im a toggle button.";

View File

@ -13102,6 +13102,24 @@ gtk_widget_class_query_action (GtkWidgetClass *widget_class,
return FALSE;
}
/**
* gtk_widget_get_css_name:
* @self: a #GtkWidget
*
* Returns the CSS name that is used for @self.
*
* Returns: the CSS name
**/
const char *
gtk_widget_get_css_name (GtkWidget *self)
{
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (self);
g_return_val_if_fail (GTK_IS_WIDGET (self), NULL);
return g_quark_to_string (gtk_css_node_get_name (priv->cssnode));
}
/**
* gtk_widget_add_css_class:
* @widget: a #GtkWidget

View File

@ -971,6 +971,8 @@ void gtk_widget_snapshot_child (GtkWidget *widget,
GDK_AVAILABLE_IN_ALL
gboolean gtk_widget_should_layout (GtkWidget *widget);
GDK_AVAILABLE_IN_ALL
const char * gtk_widget_get_css_name (GtkWidget *self) G_GNUC_PURE;
GDK_AVAILABLE_IN_ALL
void gtk_widget_add_css_class (GtkWidget *widget,
const char *css_class);
GDK_AVAILABLE_IN_ALL

View File

@ -249,7 +249,6 @@ typedef struct
guint resizable : 1;
guint stick_initially : 1;
guint transient_parent_group : 1;
guint type : 4; /* GtkWindowType */
guint gravity : 5; /* GdkGravity */
guint csd_requested : 1;
guint client_decorated : 1; /* Decorations drawn client-side */
@ -297,9 +296,6 @@ enum {
enum {
PROP_0,
/* Construct */
PROP_TYPE,
/* Normal Props */
PROP_TITLE,
PROP_RESIZABLE,
@ -814,14 +810,6 @@ gtk_window_class_init (GtkWindowClass *klass)
klass->enable_debugging = gtk_window_enable_debugging;
klass->close_request = gtk_window_close_request;
window_props[PROP_TYPE] =
g_param_spec_enum ("type",
P_("Window Type"),
P_("The type of the window"),
GTK_TYPE_WINDOW_TYPE,
GTK_WINDOW_TOPLEVEL,
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
window_props[PROP_TITLE] =
g_param_spec_string ("title",
P_("Window Title"),
@ -1206,6 +1194,7 @@ gtk_window_class_init (GtkWindowClass *klass)
add_tab_bindings (binding_set, GDK_CONTROL_MASK | GDK_SHIFT_MASK, GTK_DIR_TAB_BACKWARD);
gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_WINDOW_ACCESSIBLE);
gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_FRAME);
gtk_widget_class_set_css_name (widget_class, I_("window"));
}
@ -1633,8 +1622,7 @@ edge_under_coordinates (GtkWindow *window,
gboolean supports_edge_constraints;
guint constraints;
if (priv->type != GTK_WINDOW_TOPLEVEL ||
!priv->client_decorated ||
if (!priv->client_decorated ||
!priv->resizable ||
priv->fullscreen ||
priv->maximized)
@ -1794,7 +1782,6 @@ gtk_window_init (GtkWindow *window)
priv->title = NULL;
priv->geometry_info = NULL;
priv->type = GTK_WINDOW_TOPLEVEL;
priv->focus_widget = NULL;
priv->default_widget = NULL;
priv->configure_request_count = 0;
@ -1897,8 +1884,6 @@ gtk_window_constructed (GObject *object)
G_OBJECT_CLASS (gtk_window_parent_class)->constructed (object);
if (priv->type == GTK_WINDOW_TOPLEVEL)
{
priv->click_gesture = gtk_gesture_click_new ();
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (priv->click_gesture), 0);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (priv->click_gesture),
@ -1914,7 +1899,6 @@ gtk_window_constructed (GObject *object)
priv->bubble_drag_gesture = create_drag_gesture (window);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (priv->bubble_drag_gesture),
GTK_PHASE_BUBBLE);
}
g_list_store_append (toplevel_list, window);
g_object_unref (window);
@ -1927,13 +1911,9 @@ gtk_window_set_property (GObject *object,
GParamSpec *pspec)
{
GtkWindow *window = GTK_WINDOW (object);
GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
switch (prop_id)
{
case PROP_TYPE:
priv->type = g_value_get_enum (value);
break;
case PROP_TITLE:
gtk_window_set_title (window, g_value_get_string (value));
break;
@ -2025,9 +2005,6 @@ gtk_window_get_property (GObject *object,
switch (prop_id)
{
GtkWindowGeometryInfo *info;
case PROP_TYPE:
g_value_set_enum (value, priv->type);
break;
case PROP_TITLE:
g_value_set_string (value, priv->title);
break;
@ -2390,20 +2367,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 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].
* contain other widgets.
*
* If you simply want an undecorated window (no window borders), use
* gtk_window_set_decorated(), dont use #GTK_WINDOW_POPUP.
* 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 +2385,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
@ -3130,11 +3093,6 @@ gtk_window_unset_transient_for (GtkWindow *window)
*
* Passing %NULL for @parent unsets the current transient window.
*
* This function can also be used to attach a new
* #GTK_WINDOW_POPUP to a #GTK_WINDOW_TOPLEVEL parent already mapped
* on screen so that the #GTK_WINDOW_POPUP will be
* positioned relative to the #GTK_WINDOW_TOPLEVEL surface.
*
* On Windows, this function puts the child window on top of the parent,
* much as the window manager would have done on X.
*/
@ -4083,10 +4041,6 @@ gtk_window_realize_icon (GtkWindow *window)
g_return_if_fail (priv->surface != NULL);
/* no point setting an icon on override-redirect */
if (priv->type == GTK_WINDOW_POPUP)
return;
info = ensure_icon_info (window);
if (info->realized)
@ -4300,9 +4254,6 @@ gtk_window_update_csd_size (GtkWindow *window,
GtkBorder window_border = { 0 };
gint w, h;
if (priv->type != GTK_WINDOW_TOPLEVEL)
return;
if (!priv->decorated ||
priv->fullscreen)
return;
@ -4539,7 +4490,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);
@ -4843,9 +4794,6 @@ gtk_window_should_use_csd (GtkWindow *window)
if (!priv->decorated)
return FALSE;
if (priv->type == GTK_WINDOW_POPUP)
return FALSE;
csd_env = g_getenv ("GTK_CSD");
#ifdef GDK_WINDOWING_BROADWAY
@ -4882,9 +4830,6 @@ create_decoration (GtkWidget *widget)
gtk_window_enable_csd (window);
if (priv->type == GTK_WINDOW_POPUP)
return;
if (priv->title_box == NULL)
{
priv->titlebar = create_titlebar (window);
@ -4986,7 +4931,6 @@ gtk_window_map (GtkWidget *widget)
gdk_surface_set_keep_below (surface, priv->below_initially);
if (priv->type == GTK_WINDOW_TOPLEVEL)
gtk_window_set_theme_variant (window);
/* No longer use the default settings */
@ -4994,8 +4938,7 @@ gtk_window_map (GtkWidget *widget)
gdk_surface_show (surface);
if (!disable_startup_notification &&
priv->type != GTK_WINDOW_POPUP)
if (!disable_startup_notification)
{
/* Do we have a custom startup-notification id? */
if (priv->startup_id != NULL)
@ -5344,12 +5287,9 @@ get_shadow_width (GtkWindow *window,
shadows = _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BOX_SHADOW);
gtk_css_shadow_value_get_extents (shadows, &border);
if (priv->type != GTK_WINDOW_POPUP)
{
/* ... and compare it to the margin size, which we use for resize grips */
gtk_style_context_get_margin (context, &margin);
max_borders (&border, &margin);
}
sum_borders (&d, &border);
*shadow_width = d;
@ -5385,7 +5325,6 @@ update_csd_shape (GtkWindow *window)
* outside the border windows go through.
*/
if (priv->type != GTK_WINDOW_POPUP)
subtract_borders (&window_border, &border);
rect.x = window_border.left;
@ -5544,21 +5483,9 @@ gtk_window_realize (GtkWidget *widget)
gtk_widget_get_allocation (widget, &allocation);
switch (priv->type)
{
case GTK_WINDOW_TOPLEVEL:
surface = gdk_surface_new_toplevel (gtk_widget_get_display (widget),
allocation.width,
allocation.height);
break;
case GTK_WINDOW_POPUP:
surface = gdk_surface_new_temp (gtk_widget_get_display (widget), &allocation);
break;
default:
g_error (G_STRLOC": Unknown window type %d!", priv->type);
break;
}
priv->surface = surface;
gdk_surface_set_widget (surface, widget);
@ -7000,7 +6927,6 @@ gtk_window_move_resize (GtkWindow *window)
hints_changed = TRUE;
#if 0
if (priv->type == GTK_WINDOW_TOPLEVEL)
{
GtkAllocation alloc;
@ -7161,8 +7087,6 @@ gtk_window_move_resize (GtkWindow *window)
* we don't get the ConfigureNotify back, the resize queue will never be run.
*/
if (priv->type != GTK_WINDOW_POPUP)
{
/* Increment the number of have-not-yet-received-notify requests.
* This is done before gdk_surface[_move]_resize(), because
* that call might be synchronous (depending on which GDK backend
@ -7188,7 +7112,6 @@ gtk_window_move_resize (GtkWindow *window)
* FIXME: we should also dequeue the pending redraws here, since
* we handle those ourselves upon ->configure_notify_received==TRUE.
*/
}
/* Now send the configure request */
if (configure_request_pos_changed)
@ -7196,19 +7119,6 @@ gtk_window_move_resize (GtkWindow *window)
gdk_surface_resize (priv->surface,
new_request.width, new_request.height);
if (priv->type == GTK_WINDOW_POPUP)
{
GtkAllocation allocation;
/* Directly size allocate for override redirect (popup) windows. */
allocation.x = 0;
allocation.y = 0;
allocation.width = new_request.width;
allocation.height = new_request.height;
gtk_widget_size_allocate (widget, &allocation, -1);
}
}
else
{
@ -8142,9 +8052,6 @@ gtk_window_on_theme_variant_changed (GtkSettings *settings,
GParamSpec *pspec,
GtkWindow *window)
{
GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
if (priv->type == GTK_WINDOW_TOPLEVEL)
gtk_window_set_theme_variant (window);
}
#endif
@ -8581,24 +8488,6 @@ gtk_window_set_auto_startup_notification (gboolean setting)
disable_startup_notification = !setting;
}
/**
* gtk_window_get_window_type:
* @window: a #GtkWindow
*
* Gets the type of the window. See #GtkWindowType.
*
* Returns: the type of the window
**/
GtkWindowType
gtk_window_get_window_type (GtkWindow *window)
{
GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
g_return_val_if_fail (GTK_IS_WINDOW (window), GTK_WINDOW_TOPLEVEL);
return priv->type;
}
/**
* gtk_window_get_mnemonics_visible:
* @window: a #GtkWindow

View File

@ -84,35 +84,10 @@ struct _GtkWindowClass
gpointer padding[8];
};
/**
* GtkWindowType:
* @GTK_WINDOW_TOPLEVEL: A regular window, such as a dialog.
* @GTK_WINDOW_POPUP: A special window such as a tooltip.
*
* A #GtkWindow can be one of these types. Most things youd consider a
* window should have type #GTK_WINDOW_TOPLEVEL; windows with this type
* are managed by the window manager and have a frame by default (call
* gtk_window_set_decorated() to toggle the frame). Windows with type
* #GTK_WINDOW_POPUP are ignored by the window manager; window manager
* keybindings wont work on them, the window manager wont decorate the
* window with a frame, many GTK+ features that rely on the window
* manager will not work (e.g. maximization/minimization).
* #GTK_WINDOW_POPUP is used to implement
* widgets such as #GtkMenu or tooltips that you normally dont think of
* as windows per se. Nearly all windows should be #GTK_WINDOW_TOPLEVEL.
* In particular, do not use #GTK_WINDOW_POPUP just to turn off
* the window borders; use gtk_window_set_decorated() for that.
*/
typedef enum
{
GTK_WINDOW_TOPLEVEL,
GTK_WINDOW_POPUP
} GtkWindowType;
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);
@ -330,9 +305,6 @@ GtkWindowGroup *gtk_window_get_group (GtkWindow *window);
GDK_AVAILABLE_IN_ALL
gboolean gtk_window_has_group (GtkWindow *window);
GDK_AVAILABLE_IN_ALL
GtkWindowType gtk_window_get_window_type (GtkWindow *window);
GDK_AVAILABLE_IN_ALL
GtkApplication *gtk_window_get_application (GtkWindow *window);

View File

@ -1089,8 +1089,7 @@ toplevel_filter_func (gpointer item,
if (g_str_equal (G_OBJECT_TYPE_NAME (item), "GtkInspectorWindow"))
return FALSE;
return gtk_window_get_window_type (item) == GTK_WINDOW_TOPLEVEL &&
gtk_widget_get_display (item) == display;
return gtk_widget_get_display (item) == display;
}
static GListModel *

View File

@ -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));

View File

@ -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 ();

View File

@ -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));

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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:");

View File

@ -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);

View File

@ -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);

View File

@ -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 ();

View File

@ -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 (),

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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");

View File

@ -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);

View File

@ -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);

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