- ta_table.resize(1, ncolumns);
- ta_label.set_text(ta_label_prefix + none);
- ta_table.attach(ta_label, 0, 1, 0, 1,
- fill_and_expand, fill_and_expand, 0, 0);
+ if (result)
+ {
+ clear_trust_anchor = true;
+
+ // Clearing the trust_anchor_box's children, and then re-packing
+ // a label into it, doesn't seem to work. Instead, let's clear out
+ // the table's children, and then re-insert a label into it.
+ var children = ta_table.get_children();
+ foreach (var child in children) {
+ ta_table.remove(child);
+ }
+
+ ta_table.resize(1, ncolumns);
+ ta_label.set_text(ta_label_prefix + none);
+ ta_table.attach(ta_label, 0, 1, 0, 1,
+ fill_and_expand, fill_and_expand, 0, 0);
+
+ }