+/* Ensure that the range "first" and "last" spinbuttons are self consistent */
+static void
+sample_consistent (GtkSpinButton *spin, PsppireDialogActionSelect *act)
+{
+ gdouble size = gtk_spin_button_get_value (GTK_SPIN_BUTTON (act->spin_sample_size));
+ gdouble limit = gtk_spin_button_get_value (GTK_SPIN_BUTTON (act->spin_sample_limit));
+
+ if (limit < size)
+ {
+ if (spin == GTK_SPIN_BUTTON (act->spin_sample_size))
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (act->spin_sample_limit), size);
+ if (spin == GTK_SPIN_BUTTON (act->spin_sample_limit))
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (act->spin_sample_size), limit);
+ }
+}
+
+