summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-11-07 19:53:49 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-11-07 19:53:49 +0000
commitd93c174387bc9379025dd19b161cd2db4e4f769a (patch)
treeff54bf58384ee90048bedc9dd2f799a515d2ae20 /perl-install
parentc15a3caefc60db49b157504a221e50c5004a11b5 (diff)
downloaddrakx-d93c174387bc9379025dd19b161cd2db4e4f769a.tar
drakx-d93c174387bc9379025dd19b161cd2db4e4f769a.tar.gz
drakx-d93c174387bc9379025dd19b161cd2db4e4f769a.tar.bz2
drakx-d93c174387bc9379025dd19b161cd2db4e4f769a.tar.xz
drakx-d93c174387bc9379025dd19b161cd2db4e4f769a.zip
fix network interfaces list update:
- really remove from the Gtk+ list lost interfaces - update the intf reference list
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/drakconnect8
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect
index fa2325a63..0c5c26d43 100755
--- a/perl-install/standalone/drakconnect
+++ b/perl-install/standalone/drakconnect
@@ -338,14 +338,18 @@ sub get_intf_ip {
my %intf;
sub update_list() {
+ @all_cards = network::ethernet::conf_network_card_backend($netc, $intf);
my %new_intf = map { @$_ } @all_cards;
my @new_intf = sort keys %new_intf;
+ foreach my $interface (difference2(\@new_intf, [ keys %intf ])) {
+ $intf{$interface} = $tree_model->append(undef);
+ }
foreach my $interface (@new_intf) {
my ($ip, $state) = get_intf_ip($interface);
- $intf{$interface}{iter} ||= $tree_model->append(undef);
- $tree_model->set($intf{$interface}{iter}, map_index { $::i => $_ } (gtkcreate_pixbuf("eth_card_mini2.png"), $interface, $ip , $intf->{$interface}{BOOTPROTO}, $new_intf{$interface}, $state));
+ $tree_model->set($intf{$interface}, map_index { $::i => $_ } (gtkcreate_pixbuf("eth_card_mini2.png"), $interface, $ip , $intf->{$interface}{BOOTPROTO}, $new_intf{$interface}, $state));
}
foreach my $i (difference2([ keys %intf ], \@new_intf)) {
+ $tree_model->remove($intf{$i});
delete $intf{$i};
}
}