[gtk+/treeview-refactor] Use gtk_scale_new() instead gtk_[v|h]scale_new()
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/treeview-refactor] Use gtk_scale_new() instead gtk_[v|h]scale_new()
- Date: Sat, 30 Oct 2010 08:34:17 +0000 (UTC)
commit 234553c0934aa641cf1351eb0868a2b9174904b5
Author: Javier Jardón <jjardon gnome org>
Date: Sat Oct 30 02:07:28 2010 +0200
Use gtk_scale_new() instead gtk_[v|h]scale_new()
demos/gtk-demo/textview.c | 2 +-
demos/testpixbuf-scale.c | 2 +-
examples/rangewidgets/rangewidgets.c | 8 ++++----
gtk/gtkcolorsel.c | 2 +-
tests/testgtk.c | 10 +++++-----
5 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/demos/gtk-demo/textview.c b/demos/gtk-demo/textview.c
index 235afa9..cb0af03 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 7b52161..5bca987 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 11fc08b..3f97b85 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 f8f0e0b..ef18b34 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 1665481..d47792f 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",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]