mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
Use gtk_scrollbar_new() instead gtk_[v|h]scrollbar_new()
This commit is contained in:
parent
234553c093
commit
6c301d4b0a
@ -128,7 +128,7 @@ static void create_range_controls( void )
|
||||
gtk_widget_show (hscale);
|
||||
|
||||
/* Reuse the same adjustment again */
|
||||
scrollbar = gtk_hscrollbar_new (GTK_ADJUSTMENT (adj1));
|
||||
scrollbar = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_ADJUSTMENT (adj1));
|
||||
/* Notice how this causes the scales to always be updated
|
||||
* continuously when the scrollbar is moved */
|
||||
gtk_range_set_update_policy (GTK_RANGE (scrollbar),
|
||||
|
@ -2171,7 +2171,7 @@ gtk_menu_set_tearoff_state (GtkMenu *menu,
|
||||
g_object_connect (menu->tearoff_adjustment,
|
||||
"signal::value-changed", gtk_menu_scrollbar_changed, menu,
|
||||
NULL);
|
||||
menu->tearoff_scrollbar = gtk_vscrollbar_new (menu->tearoff_adjustment);
|
||||
menu->tearoff_scrollbar = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, menu->tearoff_adjustment);
|
||||
|
||||
gtk_box_pack_end (GTK_BOX (menu->tearoff_hbox),
|
||||
menu->tearoff_scrollbar,
|
||||
|
@ -551,7 +551,7 @@ gtk_scrolled_window_set_hadjustment (GtkScrolledWindow *scrolled_window,
|
||||
if (!priv->hscrollbar)
|
||||
{
|
||||
gtk_widget_push_composite_child ();
|
||||
priv->hscrollbar = gtk_hscrollbar_new (hadjustment);
|
||||
priv->hscrollbar = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, hadjustment);
|
||||
gtk_widget_set_composite_name (priv->hscrollbar, "hscrollbar");
|
||||
gtk_widget_pop_composite_child ();
|
||||
|
||||
@ -614,7 +614,7 @@ gtk_scrolled_window_set_vadjustment (GtkScrolledWindow *scrolled_window,
|
||||
if (!priv->vscrollbar)
|
||||
{
|
||||
gtk_widget_push_composite_child ();
|
||||
priv->vscrollbar = gtk_vscrollbar_new (vadjustment);
|
||||
priv->vscrollbar = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, vadjustment);
|
||||
gtk_widget_set_composite_name (priv->vscrollbar, "vscrollbar");
|
||||
gtk_widget_pop_composite_child ();
|
||||
|
||||
|
@ -9567,7 +9567,7 @@ gtk_widget_get_composite_name (GtkWidget *widget)
|
||||
* Here is a simple example:
|
||||
* |[
|
||||
* gtk_widget_push_composite_child ();
|
||||
* scrolled_window->hscrollbar = gtk_hscrollbar_new (hadjustment);
|
||||
* scrolled_window->hscrollbar = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, hadjustment);
|
||||
* gtk_widget_set_composite_name (scrolled_window->hscrollbar, "hscrollbar");
|
||||
* gtk_widget_pop_composite_child ();
|
||||
* gtk_widget_set_parent (scrolled_window->hscrollbar,
|
||||
|
@ -630,13 +630,13 @@ create_big_windows (GtkWidget *widget)
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (eventbox), darea);
|
||||
|
||||
scrollbar = gtk_hscrollbar_new (hadj);
|
||||
scrollbar = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, hadj);
|
||||
gtk_table_attach (GTK_TABLE (table), scrollbar,
|
||||
0, 1, 1, 2,
|
||||
GTK_FILL | GTK_EXPAND, GTK_FILL,
|
||||
0, 0);
|
||||
|
||||
scrollbar = gtk_vscrollbar_new (vadj);
|
||||
scrollbar = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, vadj);
|
||||
gtk_table_attach (GTK_TABLE (table), scrollbar,
|
||||
1, 2, 0, 1,
|
||||
GTK_FILL, GTK_EXPAND | GTK_FILL,
|
||||
@ -5837,7 +5837,7 @@ create_range_controls (GtkWidget *widget)
|
||||
gtk_box_pack_start (GTK_BOX (box2), scale, TRUE, TRUE, 0);
|
||||
gtk_widget_show (scale);
|
||||
|
||||
scrollbar = gtk_hscrollbar_new (GTK_ADJUSTMENT (adjustment));
|
||||
scrollbar = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_ADJUSTMENT (adjustment));
|
||||
gtk_range_set_update_policy (GTK_RANGE (scrollbar),
|
||||
GTK_UPDATE_CONTINUOUS);
|
||||
gtk_box_pack_start (GTK_BOX (box2), scrollbar, TRUE, TRUE, 0);
|
||||
@ -9206,7 +9206,7 @@ create_scroll_test (GtkWidget *widget)
|
||||
adj = gtk_adjustment_new (0.0, 0.0, 1000.0, 1.0, 180.0, 200.0);
|
||||
scroll_test_pos = 0.0;
|
||||
|
||||
scrollbar = gtk_vscrollbar_new (adj);
|
||||
scrollbar = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, adj);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), scrollbar, FALSE, FALSE, 0);
|
||||
gtk_widget_show (scrollbar);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user