X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dialog-action-correlation.c;h=4dd10f3b4208fd8807eb07aecdc1b447782bbe7d;hb=fc6620099bbc53762095569d5356b67a81a85402;hp=29f6e20179c03cb148ffce4df909cb13d076f1b6;hpb=d6cbbc8d634fa91f050661355139a4e4697e99ab;p=pspp diff --git a/src/ui/gui/psppire-dialog-action-correlation.c b/src/ui/gui/psppire-dialog-action-correlation.c index 29f6e20179..4dd10f3b42 100644 --- a/src/ui/gui/psppire-dialog-action-correlation.c +++ b/src/ui/gui/psppire-dialog-action-correlation.c @@ -97,9 +97,16 @@ psppire_dialog_action_correlation_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionCorrelation *act = PSPPIRE_DIALOG_ACTION_CORRELATION (a); - GtkBuilder *xml = builder_new ("correlation.ui"); - pda->dialog = get_widget_assert (xml, "correlation-dialog"); - pda->source = get_widget_assert (xml, "dict-view"); + GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GtkBuilder *xml = g_hash_table_lookup (thing, a); + if (!xml) + { + xml = builder_new ("correlation.ui"); + g_hash_table_insert (thing, a, xml); + } + + pda->dialog = get_widget_assert (xml, "correlation-dialog"); + pda->source = get_widget_assert (xml, "dict-view"); act->variables = get_widget_assert (xml, "psppire-var-view1"); act->significant = get_widget_assert (xml, "button-flag-significants"); @@ -108,8 +115,6 @@ psppire_dialog_action_correlation_activate (GtkAction *a) psppire_dialog_action_set_valid_predicate (pda, dialog_state_valid); psppire_dialog_action_set_refresh (pda, refresh); - g_object_unref (xml); - if (PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_correlation_parent_class)->activate) PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_correlation_parent_class)->activate (pda); }