diff options
author | Daniel Boles <dboles@src.gnome.org> | 2017-03-06 22:53:15 +0000 |
---|---|---|
committer | Daniel Boles <dboles@src.gnome.org> | 2017-03-07 00:16:37 +0000 |
commit | 9e5cac07b80c0d8ae1b1fc544ab2c78f91e6dc8b (patch) | |
tree | 1724fb75a7b97d039834e4672c8f9eadfbd28b40 /tests | |
parent | ec5ebf82b661b7cf8e997cc7ddc23d2d87e60d5a (diff) | |
download | gtk+-9e5cac07b80c0d8ae1b1fc544ab2c78f91e6dc8b.tar.gz |
testframe: Set value before connecting callbacks
The value comes from the widget, and we were setting this after
connecting the callback, which applies the value to the widget…
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testframe.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/testframe.c b/tests/testframe.c index f9c6982f43..e0fbce9396 100644 --- a/tests/testframe.c +++ b/tests/testframe.c @@ -165,8 +165,8 @@ int main (int argc, char **argv) gtk_grid_attach (GTK_GRID (grid), widget, 0, 0, 1, 1); widget = gtk_spin_button_new_with_range (0, 250, 1); - g_signal_connect (G_OBJECT (widget), "value-changed", G_CALLBACK (spin_xthickness_cb), frame); gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), pad.left); + g_signal_connect (G_OBJECT (widget), "value-changed", G_CALLBACK (spin_xthickness_cb), frame); gtk_grid_attach (GTK_GRID (grid), widget, 1, 0, 1, 1); /* Spin to control ythickness */ @@ -174,8 +174,8 @@ int main (int argc, char **argv) gtk_grid_attach (GTK_GRID (grid), widget, 0, 1, 1, 1); widget = gtk_spin_button_new_with_range (0, 250, 1); - g_signal_connect (G_OBJECT (widget), "value-changed", G_CALLBACK (spin_ythickness_cb), frame); gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), pad.top); + g_signal_connect (G_OBJECT (widget), "value-changed", G_CALLBACK (spin_ythickness_cb), frame); gtk_grid_attach (GTK_GRID (grid), widget, 1, 1, 1, 1); gtk_frame_get_label_align (GTK_FRAME (frame), &xalign, &yalign); @@ -185,8 +185,8 @@ int main (int argc, char **argv) gtk_grid_attach (GTK_GRID (grid), widget, 0, 2, 1, 1); widget = gtk_spin_button_new_with_range (0.0, 1.0, 0.1); - g_signal_connect (G_OBJECT (widget), "value-changed", G_CALLBACK (spin_xalign_cb), frame); gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), xalign); + g_signal_connect (G_OBJECT (widget), "value-changed", G_CALLBACK (spin_xalign_cb), frame); gtk_grid_attach (GTK_GRID (grid), widget, 1, 2, 1, 1); /* Spin to control label yalign */ @@ -194,8 +194,8 @@ int main (int argc, char **argv) gtk_grid_attach (GTK_GRID (grid), widget, 0, 3, 1, 1); widget = gtk_spin_button_new_with_range (0.0, 1.0, 0.1); - g_signal_connect (G_OBJECT (widget), "value-changed", G_CALLBACK (spin_yalign_cb), frame); gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), yalign); + g_signal_connect (G_OBJECT (widget), "value-changed", G_CALLBACK (spin_yalign_cb), frame); gtk_grid_attach (GTK_GRID (grid), widget, 1, 3, 1, 1); gtk_widget_show (window); |