summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-02-14 02:51:30 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-02-14 02:51:30 +0000
commitaa7f2fcb1c8b7ada602a5a5dd64401cc11d4c189 (patch)
tree6778c2881775e660a9d2abc572a436ad11a7c001 /perl-install
parent66a82f3a9d2ade03a9b97a9adf89ebf22fbe03d4 (diff)
downloaddrakx-aa7f2fcb1c8b7ada602a5a5dd64401cc11d4c189.tar
drakx-aa7f2fcb1c8b7ada602a5a5dd64401cc11d4c189.tar.gz
drakx-aa7f2fcb1c8b7ada602a5a5dd64401cc11d4c189.tar.bz2
drakx-aa7f2fcb1c8b7ada602a5a5dd64401cc11d4c189.tar.xz
drakx-aa7f2fcb1c8b7ada602a5a5dd64401cc11d4c189.zip
break devices loop into two pass:
- first detect devices into each class - then process them for later display
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/harddrake28
1 files changed, 8 insertions, 0 deletions
diff --git a/perl-install/standalone/harddrake2 b/perl-install/standalone/harddrake2
index a825c1a78..a04a647e6 100755
--- a/perl-install/standalone/harddrake2
+++ b/perl-install/standalone/harddrake2
@@ -233,6 +233,8 @@ $tree->get_selection->signal_connect('changed' => sub {
my $index = 0;
+my @classes;
+
# Fill the graphic devices tree with a "tree branch" widget per device category
foreach (@harddrake::data::tree) {
my ($Ident, $title, $icon, $configurator, $detector) = @$_;
@@ -244,6 +246,12 @@ foreach (@harddrake::data::tree) {
my @devices = &$detector;
next unless @devices; # Skip empty class (no devices)
+ push @classes, [ $Ident, $title, $icon, $configurator, @devices ];
+}
+
+# Fill the graphic devices tree with a "tree branch" widget per device category
+foreach (@classes) {
+ my ($Ident, $title, $icon, $configurator, @devices) = @$_;
my $parent_iter = $tree_model->append_set(undef, [ 0 => gtkcreate_pixbuf($icon), 1 => $title, 2 => -1 ]);