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_pointer (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");
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);
static void
psppire_dialog_action_chisquare_class_init (PsppireDialogActionChisquareClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_chisquare_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_chisquare_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}