diff --git a/demos/gtk-demo/offscreen_window.c b/demos/gtk-demo/offscreen_window.c index 410f524d12..fda8d83e9b 100644 --- a/demos/gtk-demo/offscreen_window.c +++ b/demos/gtk-demo/offscreen_window.c @@ -561,7 +561,8 @@ do_offscreen_window (GtkWidget *do_widget) gtk_container_set_border_width (GTK_CONTAINER (window), 10); vbox = gtk_vbox_new (0, FALSE); - scale = gtk_hscale_new_with_range (0, G_PI/2, 0.01); + scale = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, + 0, G_PI/2, 0.01); gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE); button = gtk_button_new_with_label ("A Button"); diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c index 4c049fd67b..3227eb48ca 100644 --- a/docs/tools/widgets.c +++ b/docs/tools/widgets.c @@ -947,10 +947,12 @@ create_scales (void) vbox = gtk_vbox_new (FALSE, 3); hbox = gtk_hbox_new (TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), - gtk_hscale_new_with_range (0.0, 100.0, 1.0), + gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, + 0.0, 100.0, 1.0), TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), - gtk_vscale_new_with_range (0.0, 100.0, 1.0), + gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL, + 0.0, 100.0, 1.0), TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), diff --git a/gtk/tests/testing.c b/gtk/tests/testing.c index fc4244225c..bc002f6eef 100644 --- a/gtk/tests/testing.c +++ b/gtk/tests/testing.c @@ -76,7 +76,8 @@ test_slider_ranges (void) { GtkWidget *child; GtkWidget *window = gtk_test_create_simple_window ("Test Window", "Test: gtk_test_warp_slider"); - GtkWidget *hscale = gtk_hscale_new_with_range (-50, +50, 5); + GtkWidget *hscale = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, + -50, +50, 5); child = gtk_bin_get_child (GTK_BIN (window)); gtk_container_add (GTK_CONTAINER (child), hscale); diff --git a/tests/testellipsise.c b/tests/testellipsise.c index 973b955766..b9a92c21ec 100644 --- a/tests/testellipsise.c +++ b/tests/testellipsise.c @@ -137,7 +137,8 @@ main (int argc, char *argv[]) gtk_container_add (GTK_CONTAINER (window), vbox); combo = gtk_combo_box_text_new (); - scale = gtk_hscale_new_with_range (0, 360, 1); + scale = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, + 0, 360, 1); label = gtk_label_new ("This label may be ellipsized\nto make it fit."); gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "NONE"); diff --git a/tests/testgtk.c b/tests/testgtk.c index b621b9a59e..1665481593 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -2107,7 +2107,8 @@ create_rotated_label (GtkWidget *widget) gtk_label_set_markup (GTK_LABEL (scale_label), "Angle: "); gtk_box_pack_start (GTK_BOX (scale_hbox), scale_label, FALSE, FALSE, 0); - hscale = gtk_hscale_new_with_range (0, 360, 5); + hscale = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, + 0, 360, 5); g_signal_connect (hscale, "value-changed", G_CALLBACK (on_angle_scale_changed), label); diff --git a/tests/testoffscreen.c b/tests/testoffscreen.c index cfb285b25d..60f8ee18b7 100644 --- a/tests/testoffscreen.c +++ b/tests/testoffscreen.c @@ -310,9 +310,8 @@ main (int argc, vbox = gtk_vbox_new (0, FALSE); gtk_container_add (GTK_CONTAINER (window), vbox); - scale = gtk_hscale_new_with_range (0, - G_PI * 2, - 0.01); + scale = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, + 0, G_PI * 2, 0.01); gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0); button = gtk_button_new_with_label ("Remove child 2"); diff --git a/tests/testscale.c b/tests/testscale.c index 98e83f09ba..3ed22b2469 100755 --- a/tests/testscale.c +++ b/tests/testscale.c @@ -49,13 +49,15 @@ int main (int argc, char *argv[]) box = gtk_vbox_new (FALSE, 5); frame = gtk_frame_new ("No marks"); - scale = gtk_hscale_new_with_range (0, 100, 1); + scale = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, + 0, 100, 1); gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE); gtk_container_add (GTK_CONTAINER (frame), scale); gtk_box_pack_start (GTK_BOX (box), frame, FALSE, FALSE, 0); frame = gtk_frame_new ("Simple marks"); - scale = gtk_hscale_new_with_range (0, 100, 1); + scale = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, + 0, 100, 1); gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE); gtk_scale_add_mark (GTK_SCALE (scale), marks[0], GTK_POS_BOTTOM, NULL); gtk_scale_add_mark (GTK_SCALE (scale), marks[1], GTK_POS_BOTTOM, NULL); @@ -64,7 +66,8 @@ int main (int argc, char *argv[]) gtk_box_pack_start (GTK_BOX (box), frame, FALSE, FALSE, 0); frame = gtk_frame_new ("Labeled marks"); - scale = gtk_hscale_new_with_range (0, 100, 1); + scale = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, + 0, 100, 1); gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE); gtk_scale_add_mark (GTK_SCALE (scale), marks[0], GTK_POS_BOTTOM, labels[0]); gtk_scale_add_mark (GTK_SCALE (scale), marks[1], GTK_POS_BOTTOM, labels[1]); @@ -73,7 +76,8 @@ int main (int argc, char *argv[]) gtk_box_pack_start (GTK_BOX (box), frame, FALSE, FALSE, 0); frame = gtk_frame_new ("Some labels"); - scale = gtk_hscale_new_with_range (0, 100, 1); + scale = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, + 0, 100, 1); gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE); gtk_scale_add_mark (GTK_SCALE (scale), marks[0], GTK_POS_BOTTOM, labels[0]); gtk_scale_add_mark (GTK_SCALE (scale), marks[1], GTK_POS_BOTTOM, NULL); @@ -82,7 +86,8 @@ int main (int argc, char *argv[]) gtk_box_pack_start (GTK_BOX (box), frame, FALSE, FALSE, 0); frame = gtk_frame_new ("Above and below"); - scale = gtk_hscale_new_with_range (0, 100, 1); + scale = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, + 0, 100, 1); gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE); gtk_scale_add_mark (GTK_SCALE (scale), bath_marks[0], GTK_POS_TOP, bath_labels[0]); gtk_scale_add_mark (GTK_SCALE (scale), bath_marks[1], GTK_POS_BOTTOM, bath_labels[1]); @@ -95,13 +100,15 @@ int main (int argc, char *argv[]) gtk_box_pack_start (GTK_BOX (box), box2, TRUE, TRUE, 0); frame = gtk_frame_new ("No marks"); - scale = gtk_vscale_new_with_range (0, 100, 1); + scale = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL, + 0, 100, 1); gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE); gtk_container_add (GTK_CONTAINER (frame), scale); gtk_box_pack_start (GTK_BOX (box2), frame, FALSE, FALSE, 0); frame = gtk_frame_new ("Simple marks"); - scale = gtk_vscale_new_with_range (0, 100, 1); + scale = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL, + 0, 100, 1); gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE); gtk_scale_add_mark (GTK_SCALE (scale), marks[0], GTK_POS_LEFT, NULL); gtk_scale_add_mark (GTK_SCALE (scale), marks[1], GTK_POS_LEFT, NULL); @@ -110,7 +117,8 @@ int main (int argc, char *argv[]) gtk_box_pack_start (GTK_BOX (box2), frame, FALSE, FALSE, 0); frame = gtk_frame_new ("Labeled marks"); - scale = gtk_vscale_new_with_range (0, 100, 1); + scale = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL, + 0, 100, 1); gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE); gtk_scale_add_mark (GTK_SCALE (scale), marks[0], GTK_POS_LEFT, labels[0]); gtk_scale_add_mark (GTK_SCALE (scale), marks[1], GTK_POS_LEFT, labels[1]); @@ -119,7 +127,8 @@ int main (int argc, char *argv[]) gtk_box_pack_start (GTK_BOX (box2), frame, FALSE, FALSE, 0); frame = gtk_frame_new ("Some labels"); - scale = gtk_vscale_new_with_range (0, 100, 1); + scale = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL, + 0, 100, 1); gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE); gtk_scale_add_mark (GTK_SCALE (scale), marks[0], GTK_POS_LEFT, labels[0]); gtk_scale_add_mark (GTK_SCALE (scale), marks[1], GTK_POS_LEFT, NULL); @@ -128,7 +137,8 @@ int main (int argc, char *argv[]) gtk_box_pack_start (GTK_BOX (box2), frame, FALSE, FALSE, 0); frame = gtk_frame_new ("Right and left"); - scale = gtk_vscale_new_with_range (0, 100, 1); + scale = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL, + 0, 100, 1); gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE); gtk_scale_add_mark (GTK_SCALE (scale), bath_marks[0], GTK_POS_RIGHT, bath_labels[0]); gtk_scale_add_mark (GTK_SCALE (scale), bath_marks[1], GTK_POS_LEFT, bath_labels[1]);