X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dialog-action-regression.c;h=c3f2234c1cf30559a935d1e5367378fcfd472d1b;hb=c4bc3574d974d3aaf4d291097c995a31515a308a;hp=f862e731f8a8e392e7ee9e49600b63977c21965c;hpb=5a9ba397926090eca1fbef3f004def23c3f1f1c7;p=pspp diff --git a/src/ui/gui/psppire-dialog-action-regression.c b/src/ui/gui/psppire-dialog-action-regression.c index f862e731f8..c3f2234c1c 100644 --- a/src/ui/gui/psppire-dialog-action-regression.c +++ b/src/ui/gui/psppire-dialog-action-regression.c @@ -109,7 +109,7 @@ on_statistics_clicked (PsppireDialogActionRegression *rd) ret = psppire_dialog_run (PSPPIRE_DIALOG (rd->stat_dialog)); - if ( ret != PSPPIRE_RESPONSE_CONTINUE ) + if (ret != PSPPIRE_RESPONSE_CONTINUE) { /* If the user chose to abandon his changes, then replace the model, from the backup */ gtk_tree_view_set_model (GTK_TREE_VIEW (rd->stat_view) , GTK_TREE_MODEL (backup_model)); @@ -132,7 +132,7 @@ on_save_clicked (PsppireDialogActionRegression *rd) ret = psppire_dialog_run (PSPPIRE_DIALOG (rd->save_dialog)); - if ( ret == PSPPIRE_RESPONSE_CONTINUE ) + if (ret == PSPPIRE_RESPONSE_CONTINUE) { rd->pred = (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rd->pred_button)) == TRUE) ? TRUE : FALSE; @@ -148,8 +148,8 @@ psppire_dialog_action_regression_activate (PsppireDialogAction *a, GVariant *par PsppireDialogActionRegression *act = PSPPIRE_DIALOG_ACTION_REGRESSION (a); PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); - GtkBuilder *xml = builder_new ( "regression.ui"); - + GtkBuilder *xml = builder_new ("regression.ui"); + GtkWidget *stat_button = get_widget_assert (xml, "stat-button"); GtkWidget *save_button = get_widget_assert (xml, "save-button"); @@ -191,11 +191,8 @@ generate_syntax (const PsppireDialogAction *a) PsppireDialogActionRegression *rd = PSPPIRE_DIALOG_ACTION_REGRESSION (a); gchar *text = NULL; - gint i; - int n; guint selected; GtkTreeIter iter; - gboolean ok; GString *string = g_string_new ("REGRESSION"); @@ -208,7 +205,7 @@ generate_syntax (const PsppireDialogAction *a) g_string_append (string, "\n\t/METHOD=ENTER"); selected = 0; - for (i = 0, ok = gtk_tree_model_get_iter_first (model, &iter); ok; + for (gint i = 0, ok = gtk_tree_model_get_iter_first (model, &iter); ok; i++, ok = gtk_tree_model_iter_next (model, &iter)) { gboolean toggled; @@ -223,8 +220,8 @@ generate_syntax (const PsppireDialogAction *a) if (selected) { g_string_append (string, "\n\t/STATISTICS="); - n = 0; - for (i = 0; i < N_REGRESSION_STATS; i++) + int n = 0; + for (gint i = 0; i < N_REGRESSION_STATS; i++) if (selected & (1u << i)) { if (n++)