summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2010-10-30 02:07:28 +0200
committerJavier Jardón <jjardon@gnome.org>2010-10-30 02:26:24 +0200
commit217036975a1305c734e912e7c87394ee874bc6ee (patch)
tree1109c6ab1b216a6340337ba16925d389199eed43
parent8177ad320e19a5800ccb2d9d0b79dfe7dc334486 (diff)
downloadgtk+-217036975a1305c734e912e7c87394ee874bc6ee.tar.gz
Use gtk_scale_new() instead gtk_[v|h]scale_new()
-rw-r--r--demos/gtk-demo/textview.c2
-rw-r--r--demos/testpixbuf-scale.c2
-rw-r--r--examples/rangewidgets/rangewidgets.c8
-rw-r--r--gtk/gtkcolorsel.c2
-rw-r--r--tests/testgtk.c10
5 files changed, 12 insertions, 12 deletions
diff --git a/demos/gtk-demo/textview.c b/demos/gtk-demo/textview.c
index 235afa9ca9..cb0af037b5 100644
--- a/demos/gtk-demo/textview.c
+++ b/demos/gtk-demo/textview.c
@@ -379,7 +379,7 @@ attach_widgets (GtkTextView *text_view)
}
else if (i == 2)
{
- widget = gtk_hscale_new (NULL);
+ widget = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, NULL);
gtk_range_set_range (GTK_RANGE (widget), 0, 100);
gtk_widget_set_size_request (widget, 70, -1);
}
diff --git a/demos/testpixbuf-scale.c b/demos/testpixbuf-scale.c
index 7b52161907..5bca987bde 100644
--- a/demos/testpixbuf-scale.c
+++ b/demos/testpixbuf-scale.c
@@ -127,7 +127,7 @@ main(int argc, char **argv)
g_signal_connect (adjustment, "value_changed",
G_CALLBACK (overall_changed_cb), NULL);
- hscale = gtk_hscale_new (adjustment);
+ hscale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, adjustment);
gtk_scale_set_digits (GTK_SCALE (hscale), 0);
gtk_box_pack_start (GTK_BOX (hbox), hscale, TRUE, TRUE, 0);
diff --git a/examples/rangewidgets/rangewidgets.c b/examples/rangewidgets/rangewidgets.c
index 11fc08b9b4..3f97b851cd 100644
--- a/examples/rangewidgets/rangewidgets.c
+++ b/examples/rangewidgets/rangewidgets.c
@@ -111,7 +111,7 @@ static void create_range_controls( void )
* (upper - page_size). */
adj1 = gtk_adjustment_new (0.0, 0.0, 101.0, 0.1, 1.0, 1.0);
- vscale = gtk_vscale_new (GTK_ADJUSTMENT (adj1));
+ vscale = gtk_scale_new (GTK_ORIENTATION_VERTICAL, GTK_ADJUSTMENT (adj1));
scale_set_default_values (GTK_SCALE (vscale));
gtk_box_pack_start (GTK_BOX (box2), vscale, TRUE, TRUE, 0);
gtk_widget_show (vscale);
@@ -121,7 +121,7 @@ static void create_range_controls( void )
gtk_widget_show (box3);
/* Reuse the same adjustment */
- hscale = gtk_hscale_new (GTK_ADJUSTMENT (adj1));
+ hscale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, GTK_ADJUSTMENT (adj1));
gtk_widget_set_size_request (GTK_WIDGET (hscale), 200, -1);
scale_set_default_values (GTK_SCALE (hscale));
gtk_box_pack_start (GTK_BOX (box3), hscale, TRUE, TRUE, 0);
@@ -230,7 +230,7 @@ static void create_range_controls( void )
adj2 = gtk_adjustment_new (1.0, 0.0, 5.0, 1.0, 1.0, 0.0);
g_signal_connect (adj2, "value_changed",
G_CALLBACK (cb_digits_scale), NULL);
- scale = gtk_hscale_new (GTK_ADJUSTMENT (adj2));
+ scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, GTK_ADJUSTMENT (adj2));
gtk_scale_set_digits (GTK_SCALE (scale), 0);
gtk_box_pack_start (GTK_BOX (box2), scale, TRUE, TRUE, 0);
gtk_widget_show (scale);
@@ -250,7 +250,7 @@ static void create_range_controls( void )
adj2 = gtk_adjustment_new (1.0, 1.0, 101.0, 1.0, 1.0, 0.0);
g_signal_connect (adj2, "value-changed",
G_CALLBACK (cb_page_size), (gpointer) adj1);
- scale = gtk_hscale_new (GTK_ADJUSTMENT (adj2));
+ scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, GTK_ADJUSTMENT (adj2));
gtk_scale_set_digits (GTK_SCALE (scale), 0);
gtk_box_pack_start (GTK_BOX (box2), scale, TRUE, TRUE, 0);
gtk_widget_show (scale);
diff --git a/gtk/gtkcolorsel.c b/gtk/gtkcolorsel.c
index f8f0e0b1cb..ef18b34813 100644
--- a/gtk/gtkcolorsel.c
+++ b/gtk/gtkcolorsel.c
@@ -445,7 +445,7 @@ gtk_color_selection_init (GtkColorSelection *colorsel)
gtk_table_attach_defaults (GTK_TABLE (table), priv->opacity_label, 0, 1, 4, 5);
adjust = gtk_adjustment_new (0.0, 0.0, 255.0, 1.0, 1.0, 0.0);
g_object_set_data (G_OBJECT (adjust), I_("COLORSEL"), colorsel);
- priv->opacity_slider = gtk_hscale_new (adjust);
+ priv->opacity_slider = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, adjust);
gtk_widget_set_tooltip_text (priv->opacity_slider,
_("Transparency of the color."));
gtk_label_set_mnemonic_widget (GTK_LABEL (priv->opacity_label),
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 1665481593..d47792ff8d 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -5829,7 +5829,7 @@ create_range_controls (GtkWidget *widget)
adjustment = gtk_adjustment_new (0.0, 0.0, 101.0, 0.1, 1.0, 1.0);
- scale = gtk_hscale_new (GTK_ADJUSTMENT (adjustment));
+ scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, GTK_ADJUSTMENT (adjustment));
gtk_widget_set_size_request (GTK_WIDGET (scale), 150, -1);
gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_DELAYED);
gtk_scale_set_digits (GTK_SCALE (scale), 1);
@@ -5843,7 +5843,7 @@ create_range_controls (GtkWidget *widget)
gtk_box_pack_start (GTK_BOX (box2), scrollbar, TRUE, TRUE, 0);
gtk_widget_show (scrollbar);
- scale = gtk_hscale_new (GTK_ADJUSTMENT (adjustment));
+ scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, GTK_ADJUSTMENT (adjustment));
gtk_scale_set_draw_value (GTK_SCALE (scale), TRUE);
g_signal_connect (scale,
"format_value",
@@ -5854,14 +5854,14 @@ create_range_controls (GtkWidget *widget)
hbox = gtk_hbox_new (FALSE, 0);
- scale = gtk_vscale_new (GTK_ADJUSTMENT (adjustment));
+ scale = gtk_scale_new (GTK_ORIENTATION_VERTICAL, GTK_ADJUSTMENT (adjustment));
gtk_widget_set_size_request (scale, -1, 200);
gtk_scale_set_digits (GTK_SCALE (scale), 2);
gtk_scale_set_draw_value (GTK_SCALE (scale), TRUE);
gtk_box_pack_start (GTK_BOX (hbox), scale, TRUE, TRUE, 0);
gtk_widget_show (scale);
- scale = gtk_vscale_new (GTK_ADJUSTMENT (adjustment));
+ scale = gtk_scale_new (GTK_ORIENTATION_VERTICAL, GTK_ADJUSTMENT (adjustment));
gtk_widget_set_size_request (scale, -1, 200);
gtk_scale_set_digits (GTK_SCALE (scale), 2);
gtk_scale_set_draw_value (GTK_SCALE (scale), TRUE);
@@ -5869,7 +5869,7 @@ create_range_controls (GtkWidget *widget)
gtk_box_pack_start (GTK_BOX (hbox), scale, TRUE, TRUE, 0);
gtk_widget_show (scale);
- scale = gtk_vscale_new (GTK_ADJUSTMENT (adjustment));
+ scale = gtk_scale_new (GTK_ORIENTATION_VERTICAL, GTK_ADJUSTMENT (adjustment));
gtk_scale_set_draw_value (GTK_SCALE (scale), TRUE);
g_signal_connect (scale,
"format_value",