summaryrefslogtreecommitdiff
path: root/tests/testscale.c
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2010-10-30 02:01:27 +0200
committerJavier Jardón <jjardon@gnome.org>2010-10-30 02:26:23 +0200
commit8177ad320e19a5800ccb2d9d0b79dfe7dc334486 (patch)
treec6a9498a64a6d495eacfe5bf8395a1f85471481d /tests/testscale.c
parentb3a7d401a155a3cfeee61b4b094124f2ea97e6ac (diff)
downloadgtk+-8177ad320e19a5800ccb2d9d0b79dfe7dc334486.tar.gz
Use gtk_scale_new_with_range() instead gtk_[v|h]scale_new_with_range()
Diffstat (limited to 'tests/testscale.c')
-rwxr-xr-xtests/testscale.c30
1 files changed, 20 insertions, 10 deletions
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]);