diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-06-18 00:42:36 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-06-18 00:42:36 +0000 |
commit | 77f3daa23dd2e5eb45aeda66598d2675606658f7 (patch) | |
tree | fec61ea761ed4bd8d04453efeeba6dd400be69aa /perl-install | |
parent | 8beaa87ba67d11e8e46c3f136df3045e3d9c7cd0 (diff) | |
download | drakx-backup-do-not-use-77f3daa23dd2e5eb45aeda66598d2675606658f7.tar drakx-backup-do-not-use-77f3daa23dd2e5eb45aeda66598d2675606658f7.tar.gz drakx-backup-do-not-use-77f3daa23dd2e5eb45aeda66598d2675606658f7.tar.bz2 drakx-backup-do-not-use-77f3daa23dd2e5eb45aeda66598d2675606658f7.tar.xz drakx-backup-do-not-use-77f3daa23dd2e5eb45aeda66598d2675606658f7.zip |
- simplify item grouping
- always show identification first
Diffstat (limited to 'perl-install')
-rwxr-xr-x | perl-install/standalone/harddrake2 | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/perl-install/standalone/harddrake2 b/perl-install/standalone/harddrake2 index ffd0bc81b..d4a332f44 100755 --- a/perl-install/standalone/harddrake2 +++ b/perl-install/standalone/harddrake2 @@ -284,16 +284,14 @@ $tree->get_selection->signal_connect('changed' => sub { member($field, map { @$_ } map { values %$_ } @groups{$current_class, 'generic'}); } keys %device_fields; my @formated; - foreach my $class ($current_class, 'generic') { - my $class_groups = $groups{$class}; - foreach my $group (keys %$class_groups) { - my @fields = @{$class_groups->{$group}}; - # have we at least a member in that group? - next unless any { member($_, @fields) } @$grouped; - - push @formated, titleFormat($group); - push @formated, map { if_(ref $_, @$_) } $device_fields{$_} foreach @fields; - }; + my %groups = map { if_(ref $groups{$_}, %{$groups{$_}}) } $current_class, 'generic'; + foreach my $group (sort { $a eq N("Connection") } keys %groups) { + my @fields = @{$groups{$group}}; + # have we at least a member in that group? + next unless any { member($_, @fields) } @$grouped; + + push @formated, titleFormat($group); + push @formated, map { if_(ref $_, @$_) } $device_fields{$_} foreach @fields; }; push @formated, if_(@formated && @$ungrouped, titleFormat(N("Misc"))), map { @{$device_fields{$_}} } @$ungrouped; gtktext_insert($text, \@formated); |