X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dialog-action-chisquare.c;h=4961a02cc062c2b0b7a0b1f3ce6f672b333402c4;hb=76f722cdfd6475f8ae2d98139ea596adfcdb47be;hp=bca99ab5750fd37fc9bb08e26059a1767041a64b;hpb=2a71889bf86463fb752bcbab248da47b25b4fd9a;p=pspp diff --git a/src/ui/gui/psppire-dialog-action-chisquare.c b/src/ui/gui/psppire-dialog-action-chisquare.c index bca99ab575..4961a02cc0 100644 --- a/src/ui/gui/psppire-dialog-action-chisquare.c +++ b/src/ui/gui/psppire-dialog-action-chisquare.c @@ -129,12 +129,18 @@ refresh (PsppireDialogAction *rd_) } static void -psppire_dialog_action_chisquare_activate (GtkAction *a) +psppire_dialog_action_chisquare_activate (PsppireDialogAction *a) { PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionChisquare *act = PSPPIRE_DIALOG_ACTION_CHISQUARE (a); - GtkBuilder *xml = builder_new ("chi-square.ui"); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); + GtkBuilder *xml = g_hash_table_lookup (thing, a); + if (!xml) + { + xml = builder_new ("chi-square.ui"); + g_hash_table_insert (thing, a, xml); + } GtkWidget *range_table = get_widget_assert (xml, "range-table"); GtkWidget *values_acr = get_widget_assert (xml, "psppire-acr1"); @@ -159,8 +165,6 @@ psppire_dialog_action_chisquare_activate (GtkAction *a) psppire_dialog_action_set_valid_predicate (pda, dialog_state_valid); psppire_dialog_action_set_refresh (pda, refresh); - g_object_unref (xml); - g_signal_connect (act->range_button, "toggled", G_CALLBACK (set_sensitivity_from_toggle), range_table);