/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009, 2010, 2011, 2014 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
#include "select-cases-dialog.h"
+#include <float.h>
#include <gtk/gtk.h>
#include "executor.h"
#include "psppire-dialog.h"
static gchar * generate_syntax (const struct select_cases_dialog *scd);
-static const gchar label1[]=N_("Approximately %3d%% of all cases.");
-static const gchar label2[]=N_("Exactly %3d cases from the first %3d cases.");
+static const gchar label1[] = N_("Approximately %3d%% of all cases.");
+static const gchar label2[] = N_("Exactly %3d cases from the first %3d cases.");
static void
gtk_widget_show (scd->hbox1);
- gtk_table_attach_defaults (GTK_TABLE (table),
- scd->hbox1, 1, 2, 0, 1);
+ gtk_grid_attach (GTK_GRID (table),
+ scd->hbox1,
+ 1, 0,
+ 1, 1);
g_signal_connect (percent, "toggled",
G_CALLBACK (set_sensitivity_from_toggle), scd->hbox1);
gtk_widget_show (scd->hbox2);
gtk_widget_set_sensitive (scd->hbox2, FALSE);
- gtk_table_attach_defaults (GTK_TABLE (table),
- scd->hbox2, 1, 2, 1, 2);
+ gtk_grid_attach (GTK_GRID (table),
+ scd->hbox2,
+ 1, 1, 1, 1);
g_signal_connect (sample_n_cases, "toggled",
G_CALLBACK (set_sensitivity_from_toggle), scd->hbox2);
gtk_spin_button_get_value (GTK_SPIN_BUTTON (scd->spinbutton));
ds_put_c_format (&dss,
- "COMPUTE %s = RV.UNIFORM (0,1) < %g.\n",
+ "COMPUTE %s = RV.UNIFORM (0,1) < %.*g.\n",
filter,
- percentage / 100.0 );
+ DBL_DIG + 1, percentage / 100.0 );
}
else
{