forked from AuroraMiddleware/gtk
scrolledwindow: Don't take adjustments in new()
In 99.9% of all cases, these are just NULL, NULL. So just do away with these arguments, people can use the setters for the rare cases where they want the scrolled window to use a different adjustment.
This commit is contained in:
parent
2cfeb1048c
commit
386b63b85d
@ -94,7 +94,7 @@ do_css_basics (GtkWidget *do_widget)
|
||||
|
||||
provider = GTK_STYLE_PROVIDER (gtk_css_provider_new ());
|
||||
|
||||
container = gtk_scrolled_window_new (NULL, NULL);
|
||||
container = gtk_scrolled_window_new ();
|
||||
gtk_window_set_child (GTK_WINDOW (window), container);
|
||||
child = gtk_text_view_new_with_buffer (text);
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (container), child);
|
||||
|
@ -132,7 +132,7 @@ do_css_multiplebgs (GtkWidget *do_widget)
|
||||
|
||||
provider = GTK_STYLE_PROVIDER (gtk_css_provider_new ());
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_paned_set_end_child (GTK_PANED (paned), sw);
|
||||
child = gtk_text_view_new_with_buffer (text);
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), child);
|
||||
|
@ -101,7 +101,7 @@ do_css_pixbufs (GtkWidget *do_widget)
|
||||
|
||||
provider = GTK_STYLE_PROVIDER (gtk_css_provider_new ());
|
||||
|
||||
container = gtk_scrolled_window_new (NULL, NULL);
|
||||
container = gtk_scrolled_window_new ();
|
||||
gtk_paned_set_end_child (GTK_PANED (paned), container);
|
||||
child = gtk_text_view_new_with_buffer (text);
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (container), child);
|
||||
|
@ -119,7 +119,7 @@ do_css_shadows (GtkWidget *do_widget)
|
||||
|
||||
provider = GTK_STYLE_PROVIDER (gtk_css_provider_new ());
|
||||
|
||||
container = gtk_scrolled_window_new (NULL, NULL);
|
||||
container = gtk_scrolled_window_new ();
|
||||
gtk_paned_set_end_child (GTK_PANED (paned), container);
|
||||
child = gtk_text_view_new_with_buffer (text);
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (container), child);
|
||||
|
@ -659,7 +659,7 @@ do_dnd (GtkWidget *do_widget)
|
||||
y += 100;
|
||||
}
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_NEVER);
|
||||
|
@ -364,7 +364,7 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
gtk_box_append (GTK_BOX (vbox),
|
||||
gtk_label_new ("Shopping list (you can edit the cells!)"));
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_has_frame (GTK_SCROLLED_WINDOW (sw), TRUE);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
|
@ -57,7 +57,7 @@ do_expander (GtkWidget *do_widget)
|
||||
|
||||
expander = gtk_expander_new ("Details:");
|
||||
gtk_widget_set_vexpand (expander, TRUE);
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (sw), 100);
|
||||
gtk_scrolled_window_set_has_frame (GTK_SCROLLED_WINDOW (sw), TRUE);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
|
@ -130,7 +130,7 @@ create_demo_window (GtkWidget *do_widget)
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (close_window), NULL);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_window_set_child (GTK_WINDOW (window), sw);
|
||||
|
||||
fixed = gtk_fixed_new ();
|
||||
|
@ -727,7 +727,7 @@ do_flowbox (GtkWidget *do_widget)
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 400, 600);
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
|
||||
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
flowbox = gtk_flow_box_new ();
|
||||
gtk_widget_set_valign (flowbox, GTK_ALIGN_START);
|
||||
|
@ -260,7 +260,7 @@ do_hypertext (GtkWidget *do_widget)
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
|
||||
gtk_text_buffer_set_enable_undo (buffer, TRUE);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
@ -276,7 +276,7 @@ do_iconview (GtkWidget *do_widget)
|
||||
gtk_box_append (GTK_BOX (tool_bar), home_button);
|
||||
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_has_frame (GTK_SCROLLED_WINDOW (sw), TRUE);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
|
@ -269,7 +269,7 @@ do_list_store (GtkWidget *do_widget)
|
||||
label = gtk_label_new ("This is the bug list (note: not based on real data, it would be nice to have a nice ODBC interface to bugzilla or so, though).");
|
||||
gtk_box_append (GTK_BOX (vbox), label);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_has_frame (GTK_SCROLLED_WINDOW (sw), TRUE);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_NEVER,
|
||||
|
@ -358,7 +358,7 @@ do_listbox (GtkWidget *do_widget)
|
||||
gtk_window_set_child (GTK_WINDOW (window), vbox);
|
||||
label = gtk_label_new ("Messages from GTK and friends");
|
||||
gtk_box_append (GTK_BOX (vbox), label);
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
gtk_widget_set_vexpand (scrolled, TRUE);
|
||||
gtk_box_append (GTK_BOX (vbox), scrolled);
|
||||
|
@ -188,7 +188,7 @@ do_listview_applauncher (GtkWidget *do_widget)
|
||||
* because otherwise they might get too large or they might not
|
||||
* be scrollable.
|
||||
*/
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_window_set_child (GTK_WINDOW (window), sw);
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), list);
|
||||
}
|
||||
|
@ -474,7 +474,7 @@ do_listview_clocks (GtkWidget *do_widget)
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *) &window);
|
||||
|
||||
/* List widgets go into a scrolled window. Always. */
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_window_set_child (GTK_WINDOW (window), sw);
|
||||
|
||||
/* Create the factory that creates the listitems. Because we
|
||||
|
@ -785,7 +785,7 @@ do_listview_colors (GtkWidget *do_widget)
|
||||
gtk_widget_get_display (do_widget));
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer*)&window);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_window_set_child (GTK_WINDOW (window), sw);
|
||||
|
||||
gridview = create_color_grid ();
|
||||
|
@ -313,7 +313,7 @@ do_listview_weather (GtkWidget *do_widget)
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Weather");
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *) &window);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_window_set_child (GTK_WINDOW (window), sw);
|
||||
listview = create_weather_view ();
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), listview);
|
||||
|
@ -602,7 +602,7 @@ display_image (const char *resource)
|
||||
image = gtk_picture_new_for_resource (resource);
|
||||
gtk_widget_set_halign (image, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (image, GTK_ALIGN_CENTER);
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), image);
|
||||
|
||||
return sw;
|
||||
@ -642,7 +642,7 @@ display_text (const char *resource)
|
||||
|
||||
g_bytes_unref (bytes);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
@ -81,7 +81,7 @@ do_markup (GtkWidget *do_widget)
|
||||
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 10);
|
||||
gtk_text_view_set_right_margin (GTK_TEXT_VIEW (view), 10);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
@ -94,7 +94,7 @@ do_markup (GtkWidget *do_widget)
|
||||
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view2), 10);
|
||||
gtk_text_view_set_right_margin (GTK_TEXT_VIEW (view2), 10);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
@ -40,7 +40,7 @@ do_overlay2 (GtkWidget *do_widget)
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Decorative Overlay");
|
||||
|
||||
overlay = gtk_overlay_new ();
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
@ -443,7 +443,7 @@ do_sliding_puzzle (GtkWidget *do_widget)
|
||||
gtk_media_stream_set_muted (media, TRUE);
|
||||
gtk_media_stream_play (media);
|
||||
add_choice (choices, GDK_PAINTABLE (media));
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), choices);
|
||||
gtk_grid_attach (GTK_GRID (tweaks), sw, 0, 0, 2, 1);
|
||||
|
||||
|
@ -40,7 +40,7 @@ do_tabs (GtkWidget *do_widget)
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
|
||||
gtk_text_buffer_set_text (buffer, "one\ttwo\tthree\nfour\tfive\tsix\nseven\teight\tnine", -1);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
@ -156,7 +156,7 @@ create_text_view (GtkWidget *hbox,
|
||||
GtkWidget *textview;
|
||||
guint timeout;
|
||||
|
||||
swindow = gtk_scrolled_window_new (NULL, NULL);
|
||||
swindow = gtk_scrolled_window_new ();
|
||||
gtk_box_append (GTK_BOX (hbox), swindow);
|
||||
textview = gtk_text_view_new ();
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (swindow), textview);
|
||||
|
@ -46,7 +46,7 @@ do_textundo (GtkWidget *do_widget)
|
||||
-1);
|
||||
gtk_text_buffer_end_irreversible_action (buffer);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
@ -494,7 +494,7 @@ do_textview (GtkWidget *do_widget)
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view1));
|
||||
view2 = gtk_text_view_new_with_buffer (buffer);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
@ -504,7 +504,7 @@ do_textview (GtkWidget *do_widget)
|
||||
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), view1);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
@ -590,7 +590,7 @@ easter_egg_callback (GtkWidget *button,
|
||||
g_object_unref (buffer);
|
||||
|
||||
window = gtk_window_new ();
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
@ -406,7 +406,7 @@ do_tree_store (GtkWidget *do_widget)
|
||||
gtk_box_append (GTK_BOX (vbox),
|
||||
gtk_label_new ("Jonathan's Holiday Card Planning Sheet"));
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_has_frame (GTK_SCROLLED_WINDOW (sw), TRUE);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
|
@ -768,7 +768,7 @@ activate (GApplication *app)
|
||||
gtk_window_set_child (GTK_WINDOW (main_window), box);
|
||||
|
||||
/* Create document */
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
|
@ -881,7 +881,7 @@ create_scrolledwindow (void)
|
||||
{
|
||||
GtkWidget *scrolledwin, *label;
|
||||
|
||||
scrolledwin = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolledwin = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwin),
|
||||
GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
|
||||
label = gtk_label_new ("Scrolled Window");
|
||||
|
@ -258,7 +258,7 @@ example_app_window_open (ExampleAppWindow *win,
|
||||
|
||||
basename = g_file_get_basename (file);
|
||||
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (scrolled, TRUE);
|
||||
gtk_widget_set_vexpand (scrolled, TRUE);
|
||||
view = gtk_text_view_new ();
|
||||
|
@ -43,7 +43,7 @@ example_app_window_open (ExampleAppWindow *win,
|
||||
|
||||
basename = g_file_get_basename (file);
|
||||
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (scrolled, TRUE);
|
||||
gtk_widget_set_vexpand (scrolled, TRUE);
|
||||
view = gtk_text_view_new ();
|
||||
|
@ -53,7 +53,7 @@ example_app_window_open (ExampleAppWindow *win,
|
||||
|
||||
basename = g_file_get_basename (file);
|
||||
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (scrolled, TRUE);
|
||||
gtk_widget_set_vexpand (scrolled, TRUE);
|
||||
view = gtk_text_view_new ();
|
||||
|
@ -76,7 +76,7 @@ example_app_window_open (ExampleAppWindow *win,
|
||||
|
||||
basename = g_file_get_basename (file);
|
||||
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (scrolled, TRUE);
|
||||
gtk_widget_set_vexpand (scrolled, TRUE);
|
||||
view = gtk_text_view_new ();
|
||||
|
@ -77,7 +77,7 @@ example_app_window_open (ExampleAppWindow *win,
|
||||
|
||||
basename = g_file_get_basename (file);
|
||||
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (scrolled, TRUE);
|
||||
gtk_widget_set_vexpand (scrolled, TRUE);
|
||||
view = gtk_text_view_new ();
|
||||
|
@ -130,7 +130,7 @@ example_app_window_open (ExampleAppWindow *win,
|
||||
|
||||
basename = g_file_get_basename (file);
|
||||
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (scrolled, TRUE);
|
||||
gtk_widget_set_vexpand (scrolled, TRUE);
|
||||
view = gtk_text_view_new ();
|
||||
|
@ -222,7 +222,7 @@ example_app_window_open (ExampleAppWindow *win,
|
||||
|
||||
basename = g_file_get_basename (file);
|
||||
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (scrolled, TRUE);
|
||||
gtk_widget_set_vexpand (scrolled, TRUE);
|
||||
view = gtk_text_view_new ();
|
||||
|
@ -256,7 +256,7 @@ example_app_window_open (ExampleAppWindow *win,
|
||||
|
||||
basename = g_file_get_basename (file);
|
||||
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (scrolled, TRUE);
|
||||
gtk_widget_set_vexpand (scrolled, TRUE);
|
||||
view = gtk_text_view_new ();
|
||||
|
@ -252,7 +252,7 @@ new_window (GApplication *app,
|
||||
|
||||
gtk_grid_attach (GTK_GRID (grid), toolbar, 0, 0, 1, 1);
|
||||
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (scrolled, TRUE);
|
||||
gtk_widget_set_vexpand (scrolled, TRUE);
|
||||
view = gtk_text_view_new ();
|
||||
|
@ -86,7 +86,7 @@ new_window (GApplication *app,
|
||||
grid = gtk_grid_new ();
|
||||
gtk_window_set_child (GTK_WINDOW (window), grid);
|
||||
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (scrolled, TRUE);
|
||||
gtk_widget_set_vexpand (scrolled, TRUE);
|
||||
view = gtk_text_view_new ();
|
||||
|
@ -21,7 +21,7 @@ new_window (GApplication *app,
|
||||
overlay = gtk_overlay_new ();
|
||||
gtk_window_set_child (GTK_WINDOW (window), overlay);
|
||||
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (scrolled, TRUE);
|
||||
gtk_widget_set_vexpand (scrolled, TRUE);
|
||||
view = gtk_text_view_new ();
|
||||
|
@ -888,7 +888,7 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog)
|
||||
gtk_box_append (GTK_BOX (hbox), vbox);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_vexpand (scrolled, TRUE);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
|
||||
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
|
@ -497,7 +497,7 @@ gtk_entry_completion_constructed (GObject *object)
|
||||
completion->column = gtk_tree_view_column_new_with_area (completion->cell_area);
|
||||
gtk_tree_view_append_column (GTK_TREE_VIEW (completion->tree_view), completion->column);
|
||||
|
||||
completion->scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
completion->scrolled_window = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (completion->scrolled_window),
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
@ -1598,7 +1598,7 @@ create_show_processes_dialog (GtkMountOperation *op,
|
||||
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (tree_view), FALSE);
|
||||
|
||||
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled_window = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
@ -3758,7 +3758,7 @@ gtk_places_sidebar_init (GtkPlacesSidebar *sidebar)
|
||||
sidebar->trash_monitor_changed_id = g_signal_connect_swapped (sidebar->trash_monitor, "trash-state-changed",
|
||||
G_CALLBACK (update_trash_icon), sidebar);
|
||||
|
||||
sidebar->swin = gtk_scrolled_window_new (NULL, NULL);
|
||||
sidebar->swin = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_parent (sidebar->swin, GTK_WIDGET (sidebar));
|
||||
gtk_widget_set_size_request (sidebar->swin, 140, 280);
|
||||
|
||||
|
@ -80,7 +80,7 @@
|
||||
* from the GtkScrolledWindow, like this:
|
||||
*
|
||||
* |[<!-- language="C" -->
|
||||
* GtkWidget *scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
* GtkWidget *scrolled_window = gtk_scrolled_window_new ();
|
||||
* GtkWidget *child_widget = gtk_button_new ();
|
||||
*
|
||||
* // GtkButton is not a GtkScrollable, so GtkScrolledWindow will automatically
|
||||
@ -2082,36 +2082,15 @@ gtk_scrolled_window_init (GtkScrolledWindow *scrolled_window)
|
||||
|
||||
/**
|
||||
* gtk_scrolled_window_new:
|
||||
* @hadjustment: (nullable): horizontal adjustment
|
||||
* @vadjustment: (nullable): vertical adjustment
|
||||
*
|
||||
* Creates a new scrolled window.
|
||||
*
|
||||
* The two arguments are the scrolled window’s adjustments; these will be
|
||||
* shared with the scrollbars and the child widget to keep the bars in sync
|
||||
* with the child. Usually you want to pass %NULL for the adjustments, which
|
||||
* will cause the scrolled window to create them for you.
|
||||
*
|
||||
* Returns: a new scrolled window
|
||||
*/
|
||||
GtkWidget*
|
||||
gtk_scrolled_window_new (GtkAdjustment *hadjustment,
|
||||
GtkAdjustment *vadjustment)
|
||||
GtkWidget *
|
||||
gtk_scrolled_window_new (void)
|
||||
{
|
||||
GtkWidget *scrolled_window;
|
||||
|
||||
if (hadjustment)
|
||||
g_return_val_if_fail (GTK_IS_ADJUSTMENT (hadjustment), NULL);
|
||||
|
||||
if (vadjustment)
|
||||
g_return_val_if_fail (GTK_IS_ADJUSTMENT (vadjustment), NULL);
|
||||
|
||||
scrolled_window = g_object_new (GTK_TYPE_SCROLLED_WINDOW,
|
||||
"hadjustment", hadjustment,
|
||||
"vadjustment", vadjustment,
|
||||
NULL);
|
||||
|
||||
return scrolled_window;
|
||||
return g_object_new (GTK_TYPE_SCROLLED_WINDOW, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -92,8 +92,7 @@ typedef enum
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gtk_scrolled_window_get_type (void) G_GNUC_CONST;
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GtkWidget* gtk_scrolled_window_new (GtkAdjustment *hadjustment,
|
||||
GtkAdjustment *vadjustment);
|
||||
GtkWidget* gtk_scrolled_window_new (void);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_scrolled_window_set_hadjustment (GtkScrolledWindow *scrolled_window,
|
||||
GtkAdjustment *hadjustment);
|
||||
|
@ -946,7 +946,7 @@ gtk_shortcuts_window_init (GtkShortcutsWindow *self)
|
||||
self,
|
||||
G_CONNECT_SWAPPED);
|
||||
|
||||
scroller = gtk_scrolled_window_new (NULL, NULL);
|
||||
scroller = gtk_scrolled_window_new ();
|
||||
box = g_object_new (GTK_TYPE_BOX,
|
||||
"halign", GTK_ALIGN_CENTER,
|
||||
"orientation", GTK_ORIENTATION_VERTICAL,
|
||||
|
@ -157,7 +157,7 @@ gtk_stack_sidebar_init (GtkStackSidebar *self)
|
||||
{
|
||||
GtkWidget *sw;
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
@ -79,7 +79,7 @@ gtk_inspector_controllers_init (GtkInspectorControllers *self)
|
||||
|
||||
self->sizegroup = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
g_object_set (box,
|
||||
|
@ -947,7 +947,7 @@ property_editor (GObject *object,
|
||||
prop_edit = gtk_menu_button_new ();
|
||||
gtk_menu_button_set_popover (GTK_MENU_BUTTON (prop_edit), popover);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_popover_set_child (GTK_POPOVER (popover), sw);
|
||||
g_object_set (sw,
|
||||
"hexpand", TRUE,
|
||||
@ -1015,7 +1015,7 @@ property_editor (GObject *object,
|
||||
prop_edit = gtk_menu_button_new ();
|
||||
gtk_menu_button_set_popover (GTK_MENU_BUTTON (prop_edit), popover);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_popover_set_child (GTK_POPOVER (popover), sw);
|
||||
g_object_set (sw,
|
||||
"hexpand", TRUE,
|
||||
|
@ -193,7 +193,7 @@ main (int argc, char *argv[])
|
||||
window = gtk_window_new ();
|
||||
grid = gtk_grid_new ();
|
||||
gtk_window_set_child (GTK_WINDOW (window), grid);
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
@ -205,7 +205,7 @@ main (int argc, char *argv[])
|
||||
gtk_list_box_bind_model (GTK_LIST_BOX (box), G_LIST_MODEL (store), create_widget, NULL, NULL);
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), box);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
@ -72,7 +72,7 @@ main (int argc, char *argv[])
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 20);
|
||||
gtk_window_set_child (GTK_WINDOW (window), box);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
@ -128,7 +128,7 @@ main (int argc, char **argv)
|
||||
frame_stats_ensure (GTK_WINDOW (window));
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 800, 600);
|
||||
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled_window = gtk_scrolled_window_new ();
|
||||
gtk_window_set_child (GTK_WINDOW (window), scrolled_window);
|
||||
|
||||
viewport = gtk_viewport_new (NULL, NULL);
|
||||
|
@ -28,7 +28,7 @@ main (int argc, char *argv[])
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
|
||||
gtk_window_set_child (GTK_WINDOW (win), box);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_EXTERNAL);
|
||||
@ -40,7 +40,8 @@ main (int argc, char *argv[])
|
||||
|
||||
adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (sw));
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, adj);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_vadjustment (GTK_SCROLLED_WINDOW (sw), adj);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_EXTERNAL);
|
||||
@ -50,7 +51,8 @@ main (int argc, char *argv[])
|
||||
fill_text_view (tv, "Middle");
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), tv);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, adj);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_vadjustment (GTK_SCROLLED_WINDOW (sw), adj);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_EXTERNAL);
|
||||
|
@ -70,7 +70,7 @@ key_test (void)
|
||||
window = gtk_window_new ();
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 400, 400);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_vexpand (sw, TRUE);
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
gtk_window_set_child (GTK_WINDOW (window), box);
|
||||
|
@ -173,7 +173,7 @@ create_tree (gboolean rtl)
|
||||
GtkCellRenderer *renderer;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_has_frame (GTK_SCROLLED_WINDOW (sw), TRUE);
|
||||
gtk_widget_set_direction (sw, rtl ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
|
||||
|
||||
|
@ -248,7 +248,7 @@ get_formats_list (GdkClipboard *clipboard)
|
||||
{
|
||||
GtkWidget *sw, *list;
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
|
||||
list = gtk_list_box_new ();
|
||||
g_signal_connect_object (clipboard, "notify::formats", G_CALLBACK (clipboard_formats_change_cb), list, 0);
|
||||
|
@ -709,7 +709,7 @@ main (int argc, char *argv[])
|
||||
search_entry = gtk_search_entry_new ();
|
||||
gtk_box_append (GTK_BOX (vbox), search_entry);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (sw, TRUE);
|
||||
gtk_widget_set_vexpand (sw, TRUE);
|
||||
gtk_search_entry_set_key_capture_widget (GTK_SEARCH_ENTRY (search_entry), sw);
|
||||
|
@ -227,7 +227,7 @@ main (int argc, char **argv)
|
||||
gtk_widget_set_margin_start (combo, 12);
|
||||
gtk_box_append (GTK_BOX (combo_vbox), combo);
|
||||
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled_window = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (scrolled_window, TRUE);
|
||||
gtk_box_append (GTK_BOX (hbox), scrolled_window);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
|
@ -375,7 +375,7 @@ create_window (void)
|
||||
gtk_window_set_child (GTK_WINDOW (window), hbox);
|
||||
gtk_box_append (GTK_BOX (hbox), vbox);
|
||||
|
||||
swindow = gtk_scrolled_window_new (NULL, NULL);
|
||||
swindow = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (swindow, TRUE);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
|
||||
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
|
@ -262,7 +262,7 @@ scrolling (void)
|
||||
|
||||
window = gtk_window_new ();
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Scrolling");
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
viewport = gtk_viewport_new (NULL, NULL);
|
||||
grid = gtk_grid_new ();
|
||||
|
||||
|
@ -125,7 +125,7 @@ main (int argc, char **argv)
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 320, 480);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_window_set_child (GTK_WINDOW (window), sw);
|
||||
|
||||
tv = gtk_tree_view_new_with_model (model);
|
||||
|
@ -1520,7 +1520,7 @@ create_listbox (GtkWidget *widget)
|
||||
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_window_set_child (GTK_WINDOW (window), hbox);
|
||||
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
gtk_box_append (GTK_BOX (hbox), scrolled);
|
||||
|
||||
@ -1948,7 +1948,7 @@ create_scrolled_windows (GtkWidget *widget)
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (window), "dialog");
|
||||
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled_window = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (scrolled_window, TRUE);
|
||||
gtk_widget_set_vexpand (scrolled_window, TRUE);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
@ -5996,7 +5996,7 @@ create_main_window (void)
|
||||
gtk_box_append (GTK_BOX (box1), label);
|
||||
gtk_widget_set_name (label, "testgtk-version-label");
|
||||
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled_window = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_margin_top (scrolled_window, 10);
|
||||
gtk_widget_set_margin_bottom (scrolled_window, 10);
|
||||
gtk_widget_set_margin_start (scrolled_window, 10);
|
||||
|
@ -103,7 +103,7 @@ create_headerbar_overlay (GtkApplication *app)
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), header);
|
||||
load_css (header, "headerbar { background: alpha(shade(@theme_bg_color, .9), .8); }");
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
gtk_widget_set_size_request (sw, 300, 250);
|
||||
gtk_overlay_set_child (GTK_OVERLAY (overlay), sw);
|
||||
|
@ -521,14 +521,14 @@ main (gint argc, gchar **argv)
|
||||
GDK_ACTION_MOVE);
|
||||
gdk_content_formats_unref (targets);
|
||||
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled_window = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scrolled_window), icon_list);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
|
||||
gtk_paned_set_start_child (GTK_PANED (paned), scrolled_window);
|
||||
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled_window = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scrolled_window), tv);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
@ -577,7 +577,7 @@ main (gint argc, gchar **argv)
|
||||
|
||||
icon_list = gtk_icon_view_new ();
|
||||
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled_window = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scrolled_window), icon_list);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
|
@ -64,7 +64,7 @@ kinetic_scrolling (void)
|
||||
g_free (button_label);
|
||||
}
|
||||
|
||||
swindow = gtk_scrolled_window_new (NULL, NULL);
|
||||
swindow = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_kinetic_scrolling (GTK_SCROLLED_WINDOW (swindow), TRUE);
|
||||
gtk_scrolled_window_set_capture_button_press (GTK_SCROLLED_WINDOW (swindow), TRUE);
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (swindow), button_grid);
|
||||
@ -102,7 +102,7 @@ kinetic_scrolling (void)
|
||||
gtk_tree_view_set_model (GTK_TREE_VIEW (treeview), GTK_TREE_MODEL (store));
|
||||
g_object_unref (store);
|
||||
|
||||
swindow = gtk_scrolled_window_new (NULL, NULL);
|
||||
swindow = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_kinetic_scrolling (GTK_SCROLLED_WINDOW (swindow), TRUE);
|
||||
gtk_scrolled_window_set_capture_button_press (GTK_SCROLLED_WINDOW (swindow), TRUE);
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (swindow), treeview);
|
||||
@ -112,7 +112,7 @@ kinetic_scrolling (void)
|
||||
gtk_widget_set_vexpand (swindow, TRUE);
|
||||
|
||||
textview = gtk_text_view_new ();
|
||||
swindow = gtk_scrolled_window_new (NULL, NULL);
|
||||
swindow = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_kinetic_scrolling (GTK_SCROLLED_WINDOW (swindow), TRUE);
|
||||
gtk_scrolled_window_set_capture_button_press (GTK_SCROLLED_WINDOW (swindow), TRUE);
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (swindow), textview);
|
||||
|
@ -282,7 +282,7 @@ main (int argc, char *argv[])
|
||||
g_signal_connect (check, "toggled", G_CALLBACK (single_click_clicked), list);
|
||||
gtk_box_append (GTK_BOX (vbox), check);
|
||||
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scrolled), list);
|
||||
gtk_box_append (GTK_BOX (hbox), scrolled);
|
||||
|
@ -121,7 +121,7 @@ int main (int argc, char *argv[])
|
||||
list = gtk_list_box_new ();
|
||||
gtk_list_box_set_selection_mode (GTK_LIST_BOX (list), GTK_SELECTION_NONE);
|
||||
gtk_list_box_set_header_func (GTK_LIST_BOX (list), add_separator, NULL, NULL);
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_window_set_child (GTK_WINDOW (window), sw);
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), list);
|
||||
|
||||
|
@ -154,7 +154,7 @@ main (int argc, char *argv[])
|
||||
g_signal_connect (list, "selected-rows-changed", G_CALLBACK (on_selected_children_changed), NULL);
|
||||
g_signal_connect (gtk_widget_get_accessible (list), "selection-changed", G_CALLBACK (a11y_selection_changed), NULL);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (sw, TRUE);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
|
||||
gtk_box_append (GTK_BOX (hbox), sw);
|
||||
|
@ -102,7 +102,7 @@ new_window (GApplication *app)
|
||||
/* widget creation */
|
||||
grid = gtk_grid_new ();
|
||||
gtk_window_set_child (GTK_WINDOW (window), grid);
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (GTK_WIDGET (sw), true);
|
||||
gtk_widget_set_vexpand (GTK_WIDGET (sw), true);
|
||||
gtk_grid_attach (GTK_GRID (grid), sw, 0, 0, 1, 1);
|
||||
|
@ -338,7 +338,7 @@ main (int argc, char *argv[])
|
||||
gtk_box_append (GTK_BOX (box), stack);
|
||||
|
||||
/* grid */
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_has_frame (GTK_SCROLLED_WINDOW (sw), TRUE);
|
||||
gtk_stack_add_titled (GTK_STACK (stack), sw, "grid", "GtkGridView");
|
||||
|
||||
@ -361,7 +361,7 @@ main (int argc, char *argv[])
|
||||
g_object_unref (factory);
|
||||
|
||||
/* list */
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_has_frame (GTK_SCROLLED_WINDOW (sw), TRUE);
|
||||
gtk_stack_add_titled (GTK_STACK (stack), sw, "list", "GtkListView");
|
||||
|
||||
@ -381,7 +381,7 @@ main (int argc, char *argv[])
|
||||
g_object_unref (factory);
|
||||
|
||||
/* columnview */
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_has_frame (GTK_SCROLLED_WINDOW (sw), TRUE);
|
||||
gtk_stack_add_titled (GTK_STACK (stack), sw, "column", "GtkColumnView");
|
||||
|
||||
@ -411,7 +411,7 @@ main (int argc, char *argv[])
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), cv);
|
||||
|
||||
/* tree */
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_has_frame (GTK_SCROLLED_WINDOW (sw), TRUE);
|
||||
gtk_stack_add_titled (GTK_STACK (stack), sw, "tree", "Tree");
|
||||
|
||||
|
@ -140,7 +140,7 @@ main (int argc,
|
||||
label = gtk_label_new ("GtkListView");
|
||||
gtk_box_append (GTK_BOX (vbox), label);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (sw, TRUE);
|
||||
gtk_widget_set_vexpand (sw, TRUE);
|
||||
gtk_box_append (GTK_BOX (vbox), sw);
|
||||
@ -157,7 +157,7 @@ main (int argc,
|
||||
label = gtk_label_new ("GtkListBox");
|
||||
gtk_box_append (GTK_BOX (vbox), label);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (sw, TRUE);
|
||||
gtk_widget_set_vexpand (sw, TRUE);
|
||||
gtk_box_append (GTK_BOX (vbox), sw);
|
||||
|
@ -613,7 +613,7 @@ main (int argc, char *argv[])
|
||||
search_entry = gtk_search_entry_new ();
|
||||
gtk_box_append (GTK_BOX (vbox), search_entry);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_vexpand (sw, TRUE);
|
||||
gtk_search_entry_set_key_capture_widget (GTK_SEARCH_ENTRY (search_entry), sw);
|
||||
gtk_box_append (GTK_BOX (vbox), sw);
|
||||
|
@ -229,7 +229,7 @@ test_scrolling (void)
|
||||
overlay = gtk_overlay_new ();
|
||||
gtk_window_set_child (GTK_WINDOW (win), overlay);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_min_content_width (GTK_SCROLLED_WINDOW (sw), 200);
|
||||
gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (sw), 200);
|
||||
gtk_overlay_set_child (GTK_OVERLAY (overlay), sw);
|
||||
@ -378,7 +378,7 @@ test_chase (void)
|
||||
overlay = gtk_overlay_new ();
|
||||
gtk_window_set_child (GTK_WINDOW (win), overlay);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_min_content_width (GTK_SCROLLED_WINDOW (sw), 200);
|
||||
gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (sw), 200);
|
||||
gtk_overlay_set_child (GTK_OVERLAY (overlay), sw);
|
||||
|
@ -53,7 +53,7 @@ main (int argc, char *argv[])
|
||||
gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
|
||||
|
||||
overlay = gtk_overlay_new ();
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_ALWAYS,
|
||||
GTK_POLICY_ALWAYS);
|
||||
|
@ -120,7 +120,7 @@ main (int argc, char *argv[])
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), popup);
|
||||
gtk_widget_hide (popup);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
list = gtk_list_box_new ();
|
||||
gtk_list_box_set_selection_mode (GTK_LIST_BOX (list), GTK_SELECTION_NONE);
|
||||
|
@ -90,7 +90,7 @@ scrollable_policy (void)
|
||||
gtk_widget_set_hexpand (frame, TRUE);
|
||||
gtk_box_append (GTK_BOX (hbox), frame);
|
||||
|
||||
swindow = gtk_scrolled_window_new (NULL, NULL);
|
||||
swindow = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
|
||||
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
|
||||
@ -207,7 +207,7 @@ scrollable_policy (void)
|
||||
gtk_popover_set_child (GTK_POPOVER (popover), vbox);
|
||||
|
||||
/* Popover's scrolled window */
|
||||
swindow = gtk_scrolled_window_new (NULL, NULL);
|
||||
swindow = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
|
||||
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
|
||||
|
@ -10,7 +10,7 @@ int main (int argc, char *argv[])
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new ();
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_window_set_child (GTK_WINDOW (window), sw);
|
||||
viewport = gtk_viewport_new (gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (sw)),
|
||||
gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (sw)));
|
||||
|
@ -163,7 +163,7 @@ main (gint argc,
|
||||
g_object_set (page, "needs-attention", TRUE, NULL);
|
||||
|
||||
|
||||
scrolled_win = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled_win = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
@ -177,7 +177,7 @@ main (int argc, char **argv)
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new ();
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
textview = g_object_new (my_text_view_get_type (), NULL);
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview));
|
||||
button = gtk_button_new_with_label ("Fixed Child");
|
||||
|
@ -196,7 +196,7 @@ main (int argc, char *argv[])
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (sw, TRUE);
|
||||
gtk_widget_set_vexpand (sw, TRUE);
|
||||
gtk_window_set_child (GTK_WINDOW (window), box);
|
||||
|
@ -495,7 +495,7 @@ main (int argc,
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 430, 400);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (sw, TRUE);
|
||||
gtk_widget_set_vexpand (sw, TRUE);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
|
@ -761,7 +761,7 @@ main (int argc, char *argv[])
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 300, 300);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Top Window");
|
||||
swindow = gtk_scrolled_window_new (NULL, NULL);
|
||||
swindow = gtk_scrolled_window_new ();
|
||||
gtk_window_set_child (GTK_WINDOW (window), swindow);
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (swindow), sample_tree_view_top);
|
||||
gtk_widget_show (window);
|
||||
@ -770,7 +770,7 @@ main (int argc, char *argv[])
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 300, 300);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Bottom Window");
|
||||
swindow = gtk_scrolled_window_new (NULL, NULL);
|
||||
swindow = gtk_scrolled_window_new ();
|
||||
gtk_window_set_child (GTK_WINDOW (window), swindow);
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (swindow), sample_tree_view_bottom);
|
||||
gtk_widget_show (window);
|
||||
@ -788,7 +788,7 @@ main (int argc, char *argv[])
|
||||
/* Left Pane */
|
||||
cell = gtk_cell_renderer_text_new ();
|
||||
|
||||
swindow = gtk_scrolled_window_new (NULL, NULL);
|
||||
swindow = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
left_tree_view = gtk_tree_view_new_with_model (left_tree_model);
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (swindow), left_tree_view);
|
||||
@ -845,7 +845,7 @@ main (int argc, char *argv[])
|
||||
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
gtk_box_append (GTK_BOX (hbox), vbox2);
|
||||
|
||||
swindow = gtk_scrolled_window_new (NULL, NULL);
|
||||
swindow = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (top_right_tree_view), FALSE);
|
||||
cell = gtk_cell_renderer_text_new ();
|
||||
@ -860,7 +860,7 @@ main (int argc, char *argv[])
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (swindow), top_right_tree_view);
|
||||
gtk_box_append (GTK_BOX (vbox2), swindow);
|
||||
|
||||
swindow = gtk_scrolled_window_new (NULL, NULL);
|
||||
swindow = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (bottom_right_tree_view), FALSE);
|
||||
cell = gtk_cell_renderer_text_new ();
|
||||
|
@ -205,7 +205,7 @@ main (int argc, char **argv)
|
||||
gtk_box_append (GTK_BOX (vbox), combo_box);
|
||||
|
||||
/* Scrolled window and tree view */
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
@ -254,7 +254,7 @@ main (gint argc, gchar **argv)
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||
gtk_window_set_child (GTK_WINDOW (window), vbox);
|
||||
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled_window = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_has_frame (GTK_SCROLLED_WINDOW (scrolled_window), TRUE);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
|
@ -150,7 +150,7 @@ main (int argc, char *argv[])
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
gtk_box_append (GTK_BOX (vbox), gtk_label_new ("Incremental Reflow Test"));
|
||||
gtk_window_set_child (GTK_WINDOW (window), vbox);
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled_window = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
@ -367,7 +367,7 @@ main (int argc, char *argv[])
|
||||
gtk_box_append (GTK_BOX (vbox), gtk_label_new ("Jonathan's Holiday Card Planning Sheet"));
|
||||
gtk_window_set_child (GTK_WINDOW (window), vbox);
|
||||
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled_window = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_has_frame (GTK_SCROLLED_WINDOW (scrolled_window), TRUE);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
gtk_widget_set_vexpand (scrolled_window, TRUE);
|
||||
@ -482,7 +482,7 @@ main (int argc, char *argv[])
|
||||
gtk_box_append (GTK_BOX (vbox), gtk_label_new ("The model revealed"));
|
||||
gtk_window_set_child (GTK_WINDOW (window), vbox);
|
||||
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled_window = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_has_frame (GTK_SCROLLED_WINDOW (scrolled_window), TRUE);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
gtk_widget_set_vexpand (scrolled_window, TRUE);
|
||||
|
@ -94,7 +94,7 @@ int main (int argc, char *argv[])
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new ();
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_window_set_child (GTK_WINDOW (window), sw);
|
||||
tv = gtk_tree_view_new ();
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), tv);
|
||||
|
@ -131,7 +131,7 @@ main (int argc, char *argv[])
|
||||
button = gtk_button_new_with_label ("Switch search method");
|
||||
gtk_box_append (GTK_BOX (vbox), button);
|
||||
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled_window = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_has_frame (GTK_SCROLLED_WINDOW (scrolled_window), TRUE);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
gtk_widget_set_vexpand (scrolled_window, TRUE);
|
||||
@ -254,7 +254,7 @@ main (int argc, char *argv[])
|
||||
gtk_label_new ("Jonathan and Kristian's list of words.\n\nA GtkTreeModelSort wrapping the GtkTreeStore of window 1"));
|
||||
gtk_window_set_child (GTK_WINDOW (window2), vbox2);
|
||||
|
||||
scrolled_window2 = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled_window2 = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_has_frame (GTK_SCROLLED_WINDOW (scrolled_window2), TRUE);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window2),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
@ -321,7 +321,7 @@ main (int argc, char *argv[])
|
||||
gtk_label_new ("Jonathan and Kristian's list of words.\n\nA GtkTreeModelSort wrapping the GtkTreeModelSort of window 2"));
|
||||
gtk_window_set_child (GTK_WINDOW (window3), vbox3);
|
||||
|
||||
scrolled_window3 = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled_window3 = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_has_frame (GTK_SCROLLED_WINDOW (scrolled_window3), TRUE);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window3),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
|
@ -744,7 +744,7 @@ main (int argc,
|
||||
G_CALLBACK (columns_selected),
|
||||
tv);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_hexpand (sw, TRUE);
|
||||
gtk_widget_set_vexpand (sw, TRUE);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
|
@ -320,7 +320,7 @@ main (gint argc, gchar **argv)
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Vertical cells in GtkTreeViewColumn example");
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);
|
||||
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled_window = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_has_frame (GTK_SCROLLED_WINDOW (scrolled_window), TRUE);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
|
@ -318,7 +318,7 @@ make_window (gint view_type)
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 300, 350);
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolled_window = gtk_scrolled_window_new ();
|
||||
switch (view_type)
|
||||
{
|
||||
case 0:
|
||||
|
@ -36,7 +36,7 @@ test_scrolled_window_child_count (void)
|
||||
GtkWidget *sw;
|
||||
AtkObject *accessible;
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
sw = gtk_scrolled_window_new ();
|
||||
g_object_ref_sink (sw);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_ALWAYS, GTK_POLICY_ALWAYS);
|
||||
@ -242,7 +242,7 @@ main (int argc, char *argv[])
|
||||
|
||||
g_test_add_func ("/scrolledwindow/child-count", test_scrolled_window_child_count);
|
||||
|
||||
add_child_tests (gtk_scrolled_window_new (NULL, NULL));
|
||||
add_child_tests (gtk_scrolled_window_new ());
|
||||
add_child_tests (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
|
||||
add_child_tests (gtk_paned_new (GTK_ORIENTATION_HORIZONTAL));
|
||||
add_child_tests (gtk_grid_new ());
|
||||
|
@ -24,7 +24,7 @@ test_size (gboolean overlay,
|
||||
gtk_widget_set_hexpand (box, TRUE);
|
||||
gtk_widget_set_vexpand (box, TRUE);
|
||||
|
||||
scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
|
||||
scrolledwindow = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_propagate_natural_width (GTK_SCROLLED_WINDOW (scrolledwindow), TRUE);
|
||||
gtk_scrolled_window_set_propagate_natural_height (GTK_SCROLLED_WINDOW (scrolledwindow), TRUE);
|
||||
gtk_scrolled_window_set_overlay_scrolling (GTK_SCROLLED_WINDOW (scrolledwindow), overlay);
|
||||
|
Loading…
Reference in New Issue
Block a user