X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dialog-action-select.c;h=51767430235bae4419987d1abcf960105abad5ac;hb=f1ae4ee2876bee191b1bf79672d4bf834750c227;hp=e5d777dadac61363493c3801121fd00f57ddb9f3;hpb=e1c4d5d0f0c63ef20927ac2cd7f9ff4e7e4cf5c5;p=pspp diff --git a/src/ui/gui/psppire-dialog-action-select.c b/src/ui/gui/psppire-dialog-action-select.c index e5d777dada..5176743023 100644 --- a/src/ui/gui/psppire-dialog-action-select.c +++ b/src/ui/gui/psppire-dialog-action-select.c @@ -172,7 +172,7 @@ sample_subdialog (GtkButton *b, gpointer data) response = psppire_dialog_run (PSPPIRE_DIALOG (scd->rsample_dialog)); - if ( response != PSPPIRE_RESPONSE_CONTINUE) + if (response != PSPPIRE_RESPONSE_CONTINUE) { g_signal_handlers_disconnect_by_func (G_OBJECT (scd->percent), @@ -192,7 +192,7 @@ sample_subdialog (GtkButton *b, gpointer data) { gchar *text; - if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->percent))) + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->percent))) { text = widget_printf (gettext(label1), scd->spinbutton); gtk_label_set_text (GTK_LABEL (scd->l0), text); @@ -231,7 +231,7 @@ range_subdialog (GtkButton *b, gpointer data) GTK_WINDOW (pda->dialog)); response = psppire_dialog_run (PSPPIRE_DIALOG (scd->range_subdialog)); - if ( response == PSPPIRE_RESPONSE_CONTINUE) + if (response == PSPPIRE_RESPONSE_CONTINUE) { gchar *text = widget_printf (_("%d thru %d"), scd->first, scd->last); gtk_label_set_text (GTK_LABEL (scd->l1), text); @@ -260,8 +260,8 @@ psppire_dialog_action_select_activate (PsppireDialogAction *a, GVariant *param) { PsppireDialogActionSelect *act = PSPPIRE_DIALOG_ACTION_SELECT (a); PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); - - GtkBuilder *xml = builder_new ( "select-cases.ui"); + + GtkBuilder *xml = builder_new ("select-cases.ui"); pda->dialog = get_widget_assert (xml, "select-cases-dialog"); pda->source = get_widget_assert (xml, "select-cases-treeview"); @@ -281,7 +281,7 @@ psppire_dialog_action_select_activate (PsppireDialogAction *a, GVariant *param) act->sample_n_cases = get_widget_assert (xml, "radiobutton-sample-n-cases"); act->table = get_widget_assert (xml, "select-cases-random-sample-table"); - act->l0 = get_widget_assert (xml, "random-sample-label");; + act->l0 = get_widget_assert (xml, "random-sample-label"); act->radiobutton_range = get_widget_assert (xml, "radiobutton-range"); act->range_subdialog = get_widget_assert (xml, "select-cases-range-dialog"); @@ -379,10 +379,10 @@ generate_syntax_filter (const PsppireDialogAction *a) ds_put_cstr (&dss, "EXECUTE.\n"); } - else if ( gtk_toggle_button_get_active + else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->radiobutton_sample))) { - if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->percent))) + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->percent))) { const double percentage = gtk_spin_button_get_value (GTK_SPIN_BUTTON (scd->spinbutton)); @@ -390,7 +390,7 @@ generate_syntax_filter (const PsppireDialogAction *a) ds_put_c_format (&dss, "COMPUTE %s = RV.UNIFORM (0,1) < %.*g.\n", filter, - DBL_DIG + 1, percentage / 100.0 ); + DBL_DIG + 1, percentage / 100.0); } else { @@ -414,7 +414,7 @@ generate_syntax_filter (const PsppireDialogAction *a) ranvar); ds_put_c_format (&dss, - "SORT BY %s, %s.\n", + "SORT CASES BY %s, %s.\n", filter, ranvar); ds_put_cstr (&dss, "EXECUTE.\n"); @@ -422,19 +422,19 @@ generate_syntax_filter (const PsppireDialogAction *a) ds_put_c_format (&dss, "COMPUTE %s = $CASENUM.\n", - filter ); + filter); ds_put_c_format (&dss, "COMPUTE %s = %s <= %d\n", filter, filter, - n_cases ); + n_cases); ds_put_cstr (&dss, "EXECUTE.\n"); ds_put_c_format (&dss, - "SORT BY %s.\n", + "SORT CASES BY %s.\n", key); ds_put_c_format (&dss, @@ -466,7 +466,7 @@ generate_syntax_delete (const PsppireDialogAction *a) gchar *text = NULL; struct string dss; - if ( gtk_toggle_button_get_active + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->radiobutton_all))) { return xstrdup ("\n"); @@ -474,12 +474,12 @@ generate_syntax_delete (const PsppireDialogAction *a) ds_init_empty (&dss); - if ( gtk_toggle_button_get_active + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->radiobutton_sample))) { ds_put_cstr (&dss, "SAMPLE "); - if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->percent))) + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->percent))) { const double percentage = gtk_spin_button_get_value (GTK_SPIN_BUTTON (scd->spinbutton)); @@ -496,7 +496,7 @@ generate_syntax_delete (const PsppireDialogAction *a) } } - else if ( gtk_toggle_button_get_active + else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->radiobutton_range))) { ds_put_c_format (&dss, @@ -532,13 +532,13 @@ generate_syntax (const PsppireDialogAction *a) PsppireDialogActionSelect *scd = PSPPIRE_DIALOG_ACTION_SELECT (a); /* In the simple case, all we need to do is cancel any existing filter */ - if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->radiobutton_all))) + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->radiobutton_all))) { return g_strdup ("FILTER OFF.\n"); } /* Are we filtering or deleting ? */ - if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->radiobutton_delete))) + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->radiobutton_delete))) { return generate_syntax_delete (a); }