X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dialog-action-regression.c;h=78aafc5775b6872ebb7ced7d039646fa356df27f;hb=13ca98079f4cb3cd80deb10b173813548b1f3ddc;hp=0cfadb14012188922071185ee19a71d73a7024b9;hpb=6e097c89af440da90b43ce90864394c4d0c843d5;p=pspp diff --git a/src/ui/gui/psppire-dialog-action-regression.c b/src/ui/gui/psppire-dialog-action-regression.c index 0cfadb1401..78aafc5775 100644 --- a/src/ui/gui/psppire-dialog-action-regression.c +++ b/src/ui/gui/psppire-dialog-action-regression.c @@ -41,7 +41,8 @@ RG (CI, N_("Conf. Interval"), N_("Show the confidence interval for the regression coefficients")) \ RG (R, N_("R"), N_("Show the correlation between observed and predicted values")) \ RG (ANOVA, N_("Anova"), N_("Show the analysis of variance table")) \ - RG (BCOV, N_("Bcov"), N_("Show the variance coefficient matrix")) + RG (BCOV, N_("Bcov"), N_("Show the variance coefficient matrix")) \ + RG (TOL, N_("Tol"), N_("Show the variance inflation factor and its reciprocal")) enum { @@ -108,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)); @@ -131,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; @@ -141,19 +142,13 @@ on_save_clicked (PsppireDialogActionRegression *rd) } -static void -psppire_dialog_action_regression_activate (PsppireDialogAction *a) +static GtkBuilder * +psppire_dialog_action_regression_activate (PsppireDialogAction *a, GVariant *param) { PsppireDialogActionRegression *act = PSPPIRE_DIALOG_ACTION_REGRESSION (a); PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); - GHashTable *thing = psppire_dialog_action_get_hash_table (pda); - GtkBuilder *xml = g_hash_table_lookup (thing, a); - if (!xml) - { - xml = builder_new ("regression.ui"); - g_hash_table_insert (thing, a, xml); - } + GtkBuilder *xml = builder_new ("regression.ui"); GtkWidget *stat_button = get_widget_assert (xml, "stat-button"); GtkWidget *save_button = get_widget_assert (xml, "save-button"); @@ -185,7 +180,7 @@ psppire_dialog_action_regression_activate (PsppireDialogAction *a) g_signal_connect_swapped (save_button, "clicked", G_CALLBACK (on_save_clicked), act); - + return xml; } @@ -259,7 +254,7 @@ generate_syntax (const PsppireDialogAction *a) static void psppire_dialog_action_regression_class_init (PsppireDialogActionRegressionClass *class) { - psppire_dialog_action_set_activation (class, psppire_dialog_action_regression_activate); + PSPPIRE_DIALOG_ACTION_CLASS (class)->initial_activate = psppire_dialog_action_regression_activate; PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax; }