… | |
… | |
113 | |
113 | |
114 | sub set_arch { |
114 | sub set_arch { |
115 | my ($self, $arch) = @_; |
115 | my ($self, $arch) = @_; |
116 | |
116 | |
117 | $self->{arch} = $arch; |
117 | $self->{arch} = $arch; |
|
|
118 | |
|
|
119 | my $ar = Crossfire::arch_attr $arch; |
|
|
120 | warn "FO:" . Data::Dumper::Dumper ($ar) . ">\n"; |
118 | |
121 | |
119 | $self->{liststore}->clear; |
122 | $self->{liststore}->clear; |
120 | |
123 | |
121 | # these are all attribute keys that will be _displayed_ |
124 | # these are all attribute keys that will be _displayed_ |
122 | my @attrib_keys = |
125 | my @attrib_keys = |
… | |
… | |
143 | ); |
146 | ); |
144 | |
147 | |
145 | # construct the sorted list of displayed attributes |
148 | # construct the sorted list of displayed attributes |
146 | my @list = |
149 | my @list = |
147 | sort { |
150 | sort { |
148 | |
|
|
149 | $a->[0] cmp $b->[0] |
151 | $a->[0] cmp $b->[0] |
150 | |
|
|
151 | } map { [$_, $arch->{$_}] } @attrib_keys; |
152 | } map { [$_, $arch->{$_}] } @attrib_keys; |
152 | |
153 | |
153 | for (@list) { |
154 | for (@list) { |
154 | |
155 | |
155 | my $it = $self->{liststore}->append; # append |
156 | my $it = $self->{liststore}->append; # append |