X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dialog-action-regression.c;h=fd168c435057c401f0bf36410b285d3fdbfe5440;hb=870b099b7272c4440f9df2a0741902f035af3f51;hp=5a64162993231405f85a672d79df514638a93bc5;hpb=83310cb45d7d8eddd9d2016baedf42ec00fe31c7;p=pspp diff --git a/src/ui/gui/psppire-dialog-action-regression.c b/src/ui/gui/psppire-dialog-action-regression.c index 5a64162993..fd168c4350 100644 --- a/src/ui/gui/psppire-dialog-action-regression.c +++ b/src/ui/gui/psppire-dialog-action-regression.c @@ -147,7 +147,14 @@ psppire_dialog_action_regression_activate (GtkAction *a) PsppireDialogActionRegression *act = PSPPIRE_DIALOG_ACTION_REGRESSION (a); PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); - GtkBuilder *xml = builder_new ("regression.ui"); + GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GtkBuilder *xml = g_hash_table_lookup (thing, a); + if (!xml) + { + xml = builder_new ("regression.ui"); + g_hash_table_insert (thing, a, xml); + } + GtkWidget *stat_button = get_widget_assert (xml, "stat-button"); GtkWidget *save_button = get_widget_assert (xml, "save-button"); @@ -162,8 +169,6 @@ psppire_dialog_action_regression_activate (GtkAction *a) act->pred_button = get_widget_assert (xml, "pred-button"); act->resid_button = get_widget_assert (xml, "resid-button"); - g_object_unref (xml); - psppire_checkbox_treeview_populate (PSPPIRE_CHECKBOX_TREEVIEW (act->stat_view), B_RG_STATS_DEFAULT, N_REGRESSION_STATS,