X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dialog-action-k-related.c;h=16f0f721c3703a3544fd4566a7758caab45bf0cc;hb=fc6620099bbc53762095569d5356b67a81a85402;hp=387dbd30487dba35e85e99274bd6545572c6a83a;hpb=d6cbbc8d634fa91f050661355139a4e4697e99ab;p=pspp diff --git a/src/ui/gui/psppire-dialog-action-k-related.c b/src/ui/gui/psppire-dialog-action-k-related.c index 387dbd3048..16f0f721c3 100644 --- a/src/ui/gui/psppire-dialog-action-k-related.c +++ b/src/ui/gui/psppire-dialog-action-k-related.c @@ -110,7 +110,14 @@ psppire_dialog_action_k_related_activate (GtkAction *a) PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionKRelated *act = PSPPIRE_DIALOG_ACTION_K_RELATED (a); - GtkBuilder *xml = builder_new ("k-related.ui"); + GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GtkBuilder *xml = g_hash_table_lookup (thing, a); + if (!xml) + { + xml = builder_new ("k-related.ui"); + g_hash_table_insert (thing, a, xml); + } + pda->dialog = get_widget_assert (xml, "k-related-dialog"); pda->source = get_widget_assert (xml, "dict-view"); @@ -126,8 +133,6 @@ psppire_dialog_action_k_related_activate (GtkAction *a) "predicate", var_is_numeric, NULL); - g_object_unref (xml); - if (PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_k_related_parent_class)->activate) PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_k_related_parent_class)->activate (pda); }