X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dialog-action-histogram.c;h=08ffc1ad22c5b9811c4c24d9eb4a2077fc6cc0a2;hb=fc6620099bbc53762095569d5356b67a81a85402;hp=5a57c2aece6fc46798794968305c8ada474136a8;hpb=d6cbbc8d634fa91f050661355139a4e4697e99ab;p=pspp diff --git a/src/ui/gui/psppire-dialog-action-histogram.c b/src/ui/gui/psppire-dialog-action-histogram.c index 5a57c2aece..08ffc1ad22 100644 --- a/src/ui/gui/psppire-dialog-action-histogram.c +++ b/src/ui/gui/psppire-dialog-action-histogram.c @@ -65,15 +65,20 @@ psppire_dialog_action_histogram_activate (GtkAction *a) PsppireDialogActionHistogram *act = PSPPIRE_DIALOG_ACTION_HISTOGRAM (a); PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); - GtkBuilder *xml = builder_new ("histogram.ui"); + GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GtkBuilder *xml = g_hash_table_lookup (thing, a); + if (!xml) + { + xml = builder_new ("histogram.ui"); + g_hash_table_insert (thing, a, xml); + } + pda->dialog = get_widget_assert (xml, "histogram-dialog"); pda->source = get_widget_assert (xml, "dict-view"); act->variable = get_widget_assert (xml, "entry1"); act->curve = get_widget_assert (xml, "curve"); - g_object_unref (xml); - psppire_dialog_action_set_refresh (pda, refresh); psppire_dialog_action_set_valid_predicate (pda,