Remove unneded casts

As gtk_adjustment_new() returns a GtkAdjustment* now

https://bugzilla.gnome.org/show_bug.cgi?id=630731
This commit is contained in:
Javier Jardón 2010-09-27 15:10:12 +02:00
parent 42f480a537
commit b072ea220c
18 changed files with 86 additions and 101 deletions

View File

@ -123,7 +123,7 @@ main(int argc, char **argv)
label = gtk_label_new ("Overall Alpha:");
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
adjustment = GTK_ADJUSTMENT (gtk_adjustment_new (overall_alpha, 0, 255, 1, 10, 0));
adjustment = gtk_adjustment_new (overall_alpha, 0, 255, 1, 10, 0);
g_signal_connect (adjustment, "value_changed",
G_CALLBACK (overall_changed_cb), NULL);

View File

@ -34,8 +34,8 @@ void create_integer_spin_button (void) {
GtkWidget *window, *spinner;
GtkAdjustment *spinner_adj;
spinner_adj = (GtkAdjustment *) gtk_adjustment_new (50.0, 0.0, 100.0, 1.0, 5.0, 5.0);
spinner_adj = gtk_adjustment_new (50.0, 0.0, 100.0, 1.0, 5.0, 5.0);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_set_border_width (GTK_CONTAINER (window), 5);
@ -69,8 +69,8 @@ void create_floating_spin_button (void) {
GtkWidget *window, *spinner;
GtkAdjustment *spinner_adj;
spinner_adj = (GtkAdjustment *) gtk_adjustment_new (2.500, 0.0, 5.0, 0.001, 0.1, 0.1);
spinner_adj = gtk_adjustment_new (2.500, 0.0, 5.0, 0.001, 0.1, 0.1);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_set_border_width (GTK_CONTAINER (window), 5);

View File

@ -43,7 +43,7 @@ int main( int argc,
gtk_container_add (GTK_CONTAINER (vbox), frame);
gtk_widget_show (frame);
adjustment = GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 100, 0.01, 0.1, 0));
adjustment = gtk_adjustment_new (0, 0, 100, 0.01, 0.1, 0);
dial = gtk_dial_new (adjustment);
gtk_dial_set_update_policy (GTK_DIAL (dial), GTK_UPDATE_DELAYED);

View File

@ -129,7 +129,7 @@ gtk_dial_new (GtkAdjustment *adjustment)
dial = g_object_new (gtk_dial_get_type (), NULL);
if (!adjustment)
adjustment = (GtkAdjustment*) gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
adjustment = gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
gtk_dial_set_adjustment (dial, adjustment);

View File

@ -92,8 +92,7 @@ int main( int argc,
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, TRUE, 0);
adj = (GtkAdjustment *) gtk_adjustment_new (1.0, 1.0, 31.0, 1.0,
5.0, 0.0);
adj = gtk_adjustment_new (1.0, 1.0, 31.0, 1.0, 5.0, 0.0);
spinner = gtk_spin_button_new (adj, 0, 0);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spinner), TRUE);
gtk_box_pack_start (GTK_BOX (vbox2), spinner, FALSE, TRUE, 0);
@ -105,8 +104,7 @@ int main( int argc,
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, TRUE, 0);
adj = (GtkAdjustment *) gtk_adjustment_new (1.0, 1.0, 12.0, 1.0,
5.0, 0.0);
adj = gtk_adjustment_new (1.0, 1.0, 12.0, 1.0, 5.0, 0.0);
spinner = gtk_spin_button_new (adj, 0, 0);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spinner), TRUE);
gtk_box_pack_start (GTK_BOX (vbox2), spinner, FALSE, TRUE, 0);
@ -118,8 +116,7 @@ int main( int argc,
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, TRUE, 0);
adj = (GtkAdjustment *) gtk_adjustment_new (1998.0, 0.0, 2100.0,
1.0, 100.0, 0.0);
adj = gtk_adjustment_new (1998.0, 0.0, 2100.0, 1.0, 100.0, 0.0);
spinner = gtk_spin_button_new (adj, 0, 0);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spinner), FALSE);
gtk_widget_set_size_request (spinner, 55, -1);
@ -142,8 +139,7 @@ int main( int argc,
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, TRUE, 0);
adj = (GtkAdjustment *) gtk_adjustment_new (0.0, -10000.0, 10000.0,
0.5, 100.0, 0.0);
adj = gtk_adjustment_new (0.0, -10000.0, 10000.0, 0.5, 100.0, 0.0);
spinner1 = gtk_spin_button_new (adj, 1.0, 2);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spinner1), TRUE);
gtk_widget_set_size_request (spinner1, 100, -1);
@ -156,7 +152,7 @@ int main( int argc,
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, TRUE, 0);
adj = (GtkAdjustment *) gtk_adjustment_new (2, 1, 5, 1, 1, 0);
adj = gtk_adjustment_new (2, 1, 5, 1, 1, 0);
spinner2 = gtk_spin_button_new (adj, 0.0, 0);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spinner2), TRUE);
g_signal_connect (adj, "value-changed",

View File

@ -432,7 +432,7 @@ gtk_color_selection_init (GtkColorSelection *colorsel)
priv->opacity_label = gtk_label_new_with_mnemonic (_("Op_acity:"));
gtk_misc_set_alignment (GTK_MISC (priv->opacity_label), 0.0, 0.5);
gtk_table_attach_defaults (GTK_TABLE (table), priv->opacity_label, 0, 1, 4, 5);
adjust = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 255.0, 1.0, 1.0, 0.0));
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);
gtk_widget_set_tooltip_text (priv->opacity_slider,
@ -2102,16 +2102,16 @@ make_label_spinbutton (GtkColorSelection *colorsel,
if (channel_type == COLORSEL_HUE)
{
adjust = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 360.0, 1.0, 1.0, 0.0));
adjust = gtk_adjustment_new (0.0, 0.0, 360.0, 1.0, 1.0, 0.0);
}
else if (channel_type == COLORSEL_SATURATION ||
channel_type == COLORSEL_VALUE)
{
adjust = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 100.0, 1.0, 1.0, 0.0));
adjust = gtk_adjustment_new (0.0, 0.0, 100.0, 1.0, 1.0, 0.0);
}
else
{
adjust = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 255.0, 1.0, 1.0, 0.0));
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);
*spinbutton = gtk_spin_button_new (adjust, 10.0, 0);

View File

@ -2522,11 +2522,11 @@ gtk_icon_view_set_adjustments (GtkIconView *icon_view,
if (hadj)
g_return_if_fail (GTK_IS_ADJUSTMENT (hadj));
else
hadj = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
hadj = gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
if (vadj)
g_return_if_fail (GTK_IS_ADJUSTMENT (vadj));
else
vadj = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
vadj = gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
if (icon_view->priv->hadjustment && (icon_view->priv->hadjustment != hadj))
{

View File

@ -227,7 +227,7 @@ gtk_layout_get_vadjustment (GtkLayout *layout)
static GtkAdjustment *
new_default_adjustment (void)
{
return GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
return gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
}
static void

View File

@ -2190,13 +2190,11 @@ gtk_menu_set_tearoff_state (GtkMenu *menu,
gtk_container_add (GTK_CONTAINER (menu->tearoff_window), menu->tearoff_hbox);
height = gdk_window_get_height (gtk_widget_get_window (GTK_WIDGET (menu)));
menu->tearoff_adjustment =
GTK_ADJUSTMENT (gtk_adjustment_new (0,
0,
priv->requested_height,
MENU_SCROLL_STEP2,
height/2,
height));
menu->tearoff_adjustment = gtk_adjustment_new (0,
0, priv->requested_height,
MENU_SCROLL_STEP2,
height/2,
height);
g_object_connect (menu->tearoff_adjustment,
"signal::value-changed", gtk_menu_scrollbar_changed, menu,
NULL);

View File

@ -822,7 +822,7 @@ gtk_range_set_adjustment (GtkRange *range,
priv = range->priv;
if (!adjustment)
adjustment = (GtkAdjustment*) gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
adjustment = gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
else
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));

View File

@ -411,7 +411,7 @@ gtk_scale_button_init (GtkScaleButton *button)
G_CALLBACK (cb_button_release), button);
gtk_box_pack_end (GTK_BOX (priv->box), priv->minus_button, FALSE, FALSE, 0);
priv->adjustment = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 100.0, 2, 20, 0));
priv->adjustment = gtk_adjustment_new (0.0, 0.0, 100.0, 2, 20, 0);
g_object_ref_sink (priv->adjustment);
/* the scale */
@ -704,8 +704,9 @@ gtk_scale_button_set_adjustment (GtkScaleButton *button,
GtkAdjustment *adjustment)
{
g_return_if_fail (GTK_IS_SCALE_BUTTON (button));
if (!adjustment)
adjustment = (GtkAdjustment*) gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
adjustment = gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
else
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));

View File

@ -422,7 +422,7 @@ gtk_spin_button_set_property (GObject *object,
case PROP_ADJUSTMENT:
adjustment = GTK_ADJUSTMENT (g_value_get_object (value));
if (!adjustment)
adjustment = (GtkAdjustment*) gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
adjustment = gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
gtk_spin_button_set_adjustment (spin_button, adjustment);
break;
case PROP_CLIMB_RATE:
@ -526,7 +526,7 @@ gtk_spin_button_init (GtkSpinButton *spin_button)
priv->snap_to_ticks = FALSE;
gtk_spin_button_set_adjustment (spin_button,
(GtkAdjustment*) gtk_adjustment_new (0, 0, 0, 0, 0, 0));
gtk_adjustment_new (0, 0, 0, 0, 0, 0));
}
static void

View File

@ -7408,11 +7408,11 @@ gtk_text_view_set_scroll_adjustments (GtkTextView *text_view,
if (hadj)
g_return_if_fail (GTK_IS_ADJUSTMENT (hadj));
else
hadj = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
hadj = gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
if (vadj)
g_return_if_fail (GTK_IS_ADJUSTMENT (vadj));
else
vadj = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
vadj = gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
if (priv->hadjustment && (priv->hadjustment != hadj))
{

View File

@ -8090,11 +8090,11 @@ gtk_tree_view_set_adjustments (GtkTreeView *tree_view,
if (hadj)
g_return_if_fail (GTK_IS_ADJUSTMENT (hadj));
else
hadj = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
hadj = gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
if (vadj)
g_return_if_fail (GTK_IS_ADJUSTMENT (vadj));
else
vadj = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
vadj = gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
if (tree_view->priv->hadjustment && (tree_view->priv->hadjustment != hadj))
{

View File

@ -509,8 +509,7 @@ viewport_set_adjustment (GtkViewport *viewport,
return;
if (!adjustment)
adjustment = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0,
0.0, 0.0, 0.0));
adjustment = gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
viewport_disconnect_adjustment (viewport, orientation);
*adjustmentp = adjustment;
g_object_ref_sink (adjustment);

View File

@ -715,14 +715,13 @@ property_widget (GObject *object,
if (type == G_TYPE_PARAM_INT)
{
adj = GTK_ADJUSTMENT (gtk_adjustment_new (G_PARAM_SPEC_INT (spec)->default_value,
G_PARAM_SPEC_INT (spec)->minimum,
G_PARAM_SPEC_INT (spec)->maximum,
1,
MAX ((G_PARAM_SPEC_INT (spec)->maximum -
G_PARAM_SPEC_INT (spec)->minimum) / 10, 1),
0.0));
adj = gtk_adjustment_new (G_PARAM_SPEC_INT (spec)->default_value,
G_PARAM_SPEC_INT (spec)->minimum,
G_PARAM_SPEC_INT (spec)->maximum,
1,
MAX ((G_PARAM_SPEC_INT (spec)->maximum - G_PARAM_SPEC_INT (spec)->minimum) / 10, 1),
0.0);
prop_edit = gtk_spin_button_new (adj, 1.0, 0);
g_object_connect_property (object, spec,
@ -735,15 +734,13 @@ property_widget (GObject *object,
}
else if (type == G_TYPE_PARAM_UINT)
{
adj = GTK_ADJUSTMENT (
gtk_adjustment_new (G_PARAM_SPEC_UINT (spec)->default_value,
G_PARAM_SPEC_UINT (spec)->minimum,
G_PARAM_SPEC_UINT (spec)->maximum,
1,
MAX ((G_PARAM_SPEC_UINT (spec)->maximum -
G_PARAM_SPEC_UINT (spec)->minimum) / 10, 1),
0.0));
adj = gtk_adjustment_new (G_PARAM_SPEC_UINT (spec)->default_value,
G_PARAM_SPEC_UINT (spec)->minimum,
G_PARAM_SPEC_UINT (spec)->maximum,
1,
MAX ((G_PARAM_SPEC_UINT (spec)->maximum - G_PARAM_SPEC_UINT (spec)->minimum) / 10, 1),
0.0);
prop_edit = gtk_spin_button_new (adj, 1.0, 0);
g_object_connect_property (object, spec,
@ -756,15 +753,13 @@ property_widget (GObject *object,
}
else if (type == G_TYPE_PARAM_FLOAT)
{
adj = gtk_adjustment_new (G_PARAM_SPEC_FLOAT (spec)->default_value,
G_PARAM_SPEC_FLOAT (spec)->minimum,
G_PARAM_SPEC_FLOAT (spec)->maximum,
0.1,
MAX ((G_PARAM_SPEC_FLOAT (spec)->maximum - G_PARAM_SPEC_FLOAT (spec)->minimum) / 10, 0.1),
0.0);
adj = GTK_ADJUSTMENT (gtk_adjustment_new (G_PARAM_SPEC_FLOAT (spec)->default_value,
G_PARAM_SPEC_FLOAT (spec)->minimum,
G_PARAM_SPEC_FLOAT (spec)->maximum,
0.1,
MAX ((G_PARAM_SPEC_FLOAT (spec)->maximum -
G_PARAM_SPEC_FLOAT (spec)->minimum) / 10, 0.1),
0.0));
prop_edit = gtk_spin_button_new (adj, 0.1, 2);
g_object_connect_property (object, spec,
@ -777,14 +772,13 @@ property_widget (GObject *object,
}
else if (type == G_TYPE_PARAM_DOUBLE)
{
adj = GTK_ADJUSTMENT (gtk_adjustment_new (G_PARAM_SPEC_DOUBLE (spec)->default_value,
G_PARAM_SPEC_DOUBLE (spec)->minimum,
G_PARAM_SPEC_DOUBLE (spec)->maximum,
0.1,
MAX ((G_PARAM_SPEC_DOUBLE (spec)->maximum -
G_PARAM_SPEC_DOUBLE (spec)->minimum) / 10, 0.1),
0.0));
adj = gtk_adjustment_new (G_PARAM_SPEC_DOUBLE (spec)->default_value,
G_PARAM_SPEC_DOUBLE (spec)->minimum,
G_PARAM_SPEC_DOUBLE (spec)->maximum,
0.1,
MAX ((G_PARAM_SPEC_DOUBLE (spec)->maximum - G_PARAM_SPEC_DOUBLE (spec)->minimum) / 10, 0.1),
0.0);
prop_edit = gtk_spin_button_new (adj, 0.1, 2);
g_object_connect_property (object, spec,

View File

@ -608,12 +608,12 @@ create_big_windows (GtkWidget *widget)
darea = gtk_drawing_area_new ();
hadj = (GtkAdjustment *)gtk_adjustment_new (0, 0, PATTERN_SIZE, 10, 100, 100);
hadj = gtk_adjustment_new (0, 0, PATTERN_SIZE, 10, 100, 100);
g_signal_connect (hadj, "value_changed",
G_CALLBACK (pattern_hadj_changed), darea);
g_object_set_data (G_OBJECT (hadj), "old-value", &current_x);
vadj = (GtkAdjustment *)gtk_adjustment_new (0, 0, PATTERN_SIZE, 10, 100, 100);
vadj = gtk_adjustment_new (0, 0, PATTERN_SIZE, 10, 100, 100);
g_signal_connect (vadj, "value_changed",
G_CALLBACK (pattern_vadj_changed), darea);
g_object_set_data (G_OBJECT (vadj), "old-value", &current_y);
@ -4779,8 +4779,8 @@ create_spins (GtkWidget *widget)
label = gtk_label_new ("Time :");
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, TRUE, 0);
adj = (GtkAdjustment *) gtk_adjustment_new (0, 0, 1410, 30, 60, 0);
adj = gtk_adjustment_new (0, 0, 1410, 30, 60, 0);
spinner = gtk_spin_button_new (adj, 0, 0);
gtk_editable_set_editable (GTK_EDITABLE (spinner), FALSE);
g_signal_connect (spinner,
@ -4797,8 +4797,8 @@ create_spins (GtkWidget *widget)
label = gtk_label_new ("Month :");
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, TRUE, 0);
adj = (GtkAdjustment *) gtk_adjustment_new (1.0, 1.0, 12.0, 1.0,
adj = gtk_adjustment_new (1.0, 1.0, 12.0, 1.0,
5.0, 0.0);
spinner = gtk_spin_button_new (adj, 0, 0);
gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (spinner),
@ -4822,7 +4822,7 @@ create_spins (GtkWidget *widget)
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, TRUE, 0);
adj = (GtkAdjustment *) gtk_adjustment_new (0, 0, 255, 1, 16, 0);
adj = gtk_adjustment_new (0, 0, 255, 1, 16, 0);
spinner = gtk_spin_button_new (adj, 0, 0);
gtk_editable_set_editable (GTK_EDITABLE (spinner), TRUE);
g_signal_connect (spinner,
@ -4854,7 +4854,7 @@ create_spins (GtkWidget *widget)
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, TRUE, 0);
adj = (GtkAdjustment *) gtk_adjustment_new (0.0, -10000.0, 10000.0,
adj = gtk_adjustment_new (0.0, -10000.0, 10000.0,
0.5, 100.0, 0.0);
spinner1 = gtk_spin_button_new (adj, 1.0, 2);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spinner1), TRUE);
@ -4867,7 +4867,7 @@ create_spins (GtkWidget *widget)
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, TRUE, 0);
adj = (GtkAdjustment *) gtk_adjustment_new (2, 1, 15, 1, 1, 0);
adj = gtk_adjustment_new (2, 1, 15, 1, 1, 0);
spinner2 = gtk_spin_button_new (adj, 0.0, 0);
g_signal_connect (adj, "value_changed",
G_CALLBACK (change_digits),
@ -5121,11 +5121,11 @@ create_cursors (GtkWidget *widget)
label = gtk_label_new ("Cursor Value : ");
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
adj = (GtkAdjustment *) gtk_adjustment_new (0,
0, 152,
2,
10, 0);
adj = gtk_adjustment_new (0,
0, 152,
2,
10, 0);
spinner = gtk_spin_button_new (adj, 0, 0);
gtk_box_pack_start (GTK_BOX (hbox), spinner, TRUE, TRUE, 0);
@ -8145,16 +8145,14 @@ window_controls (GtkWidget *window)
G_CALLBACK (configure_event_callback),
label);
adj = (GtkAdjustment *) gtk_adjustment_new (10.0, -2000.0, 2000.0, 1.0,
5.0, 0.0);
adj = gtk_adjustment_new (10.0, -2000.0, 2000.0, 1.0, 5.0, 0.0);
spin = gtk_spin_button_new (adj, 0, 0);
gtk_box_pack_start (GTK_BOX (vbox), spin, FALSE, FALSE, 0);
g_object_set_data (G_OBJECT (control_window), "spin1", spin);
adj = (GtkAdjustment *) gtk_adjustment_new (10.0, -2000.0, 2000.0, 1.0,
5.0, 0.0);
adj = gtk_adjustment_new (10.0, -2000.0, 2000.0, 1.0, 5.0, 0.0);
spin = gtk_spin_button_new (adj, 0, 0);
gtk_box_pack_start (GTK_BOX (vbox), spin, FALSE, FALSE, 0);
@ -9200,7 +9198,7 @@ create_scroll_test (GtkWidget *widget)
gtk_widget_set_events (drawing_area, GDK_EXPOSURE_MASK | GDK_SCROLL_MASK);
adj = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 1000.0, 1.0, 180.0, 200.0));
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);

View File

@ -35,13 +35,12 @@ main (int argc, char **argv)
gtk_container_add (GTK_CONTAINER (window), mainbox);
for (max = 9; max <= 999999999; max = max * 10 + 9) {
GtkAdjustment *adj =
GTK_ADJUSTMENT (gtk_adjustment_new (max,
1, max,
1,
(max + 1) / 10,
0.0));
GtkAdjustment *adj = gtk_adjustment_new (max,
1, max,
1,
(max + 1) / 10,
0.0);
GtkWidget *spin = gtk_spin_button_new (adj, 1.0, 0);
GtkWidget *hbox = gtk_hbox_new (FALSE, 2);