PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a);
PsppireDialogActionVarInfo *act = PSPPIRE_DIALOG_ACTION_VAR_INFO (pda);
- GtkBuilder *xml = builder_new ("variable-info.ui");
+ GHashTable *thing = psppire_dialog_action_get_hash_table (pda);
+ GtkBuilder *xml = g_hash_table_lookup (thing, a);
+ if (!xml)
+ {
+ xml = builder_new ("variable-info.ui");
+ g_hash_table_insert (thing, a, xml);
+ }
+
act->output = psppire_output_view_new (
GTK_LAYOUT (get_widget_assert (xml, "layout1")), NULL, NULL, NULL);
"changed", G_CALLBACK (populate_output),
act);
-
g_signal_connect (pda->dialog, "response", G_CALLBACK (jump_to),
pda);
psppire_dialog_action_set_valid_predicate (pda,
treeview_item_selected);
- g_object_unref (xml);
-
if (PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_var_info_parent_class)->activate)
PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_var_info_parent_class)->activate (pda);
}
static void
psppire_dialog_action_var_info_class_init (PsppireDialogActionVarInfoClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
-
- action_class->activate = psppire_dialog_action_var_info_activate;
+ psppire_dialog_action_set_activation (class, psppire_dialog_action_var_info_activate);
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}