From 0584587cec2231fb3d8fdef25f3ff150603944d8 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 14 Jun 2004 10:02:12 +0000 Subject: merge fixes from HEAD --- perl-install/harddrake/data.pm | 4 +-- perl-install/network/netconnect.pm | 2 +- perl-install/standalone/drakTermServ | 4 +-- perl-install/standalone/drakbackup | 2 +- perl-install/standalone/draksplash | 52 +++++++++++++++++++----------------- perl-install/ugtk2.pm | 2 +- 6 files changed, 34 insertions(+), 32 deletions(-) diff --git a/perl-install/harddrake/data.pm b/perl-install/harddrake/data.pm index e1cea8be9..f818dbc8a 100644 --- a/perl-install/harddrake/data.pm +++ b/perl-install/harddrake/data.pm @@ -75,7 +75,7 @@ our @tree = string => N("Disk"), icon => "harddisk.png", configurator => "$sbindir/diskdrake", - detector => \&detect_devices::hds, + detector => sub { f(detect_devices::hds()) }, checked_on_boot => 1, }, @@ -197,7 +197,7 @@ our @tree = #- protocol report are not accurate) so I'll need to verify against #- known drivers :-( require list_modules; - my @usbnet = (list_modules::category2modules('network/usb'), "nvnet"); # rought hack for nforce2's nvet + my @usbnet = (list_modules::category2modules('network/usb'), qw(forcedeth nvnet)); # rought hack for nforce2's nvnet f(grep { $_->{media_type} && $_->{media_type} =~ /^NETWORK/ diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index a34faa1b4..46de75e5f 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -826,7 +826,7 @@ You can find a driver on http://eciadsl.flashtux.org/"), pre => $lan_detect, name => N("Select the network interface to configure:"), data => sub { - [ { label => N("Net Device"), type => "list", val => \$ntf_name, list => [ N("Manual choice"), sort keys %eth_intf ], + [ { label => N("Net Device"), type => "list", val => \$ntf_name, list => [ (sort keys %eth_intf), N("Manual choice") ], allow_empty_list => 1, format => sub { $eth_intf{$_[0]} || $_[0] } } ]; }, post => sub { diff --git a/perl-install/standalone/drakTermServ b/perl-install/standalone/drakTermServ index 1b3a62220..ba850e5cc 100755 --- a/perl-install/standalone/drakTermServ +++ b/perl-install/standalone/drakTermServ @@ -1944,8 +1944,8 @@ sub create_client_sysnetwork { my ($hostname, $ip) = @_; log::explanations("Adding /etc/sysconfig/network for $ip"); my $network_file = "/etc/sysconfig/network\$\$IP=$ip\$\$"; - my %net_data = ("HOSTNAME=$hostname\n", "NETWORKING=yes\n", "FORWARD_IPV4=false\n"); - output_p($network_file, %net_data); + my @net_data = ("HOSTNAME=$hostname\n", "NETWORKING=yes\n", "FORWARD_IPV4=false\n"); + output_p($network_file, @net_data); } sub restart_server() { diff --git a/perl-install/standalone/drakbackup b/perl-install/standalone/drakbackup index 26af55fd3..4a05a4ef1 100755 --- a/perl-install/standalone/drakbackup +++ b/perl-install/standalone/drakbackup @@ -223,7 +223,7 @@ sub get_tape_info() { my @line_data; my $info = "$ENV{HOME}/tmp/dmesg"; @tape_devices = (); - system("dmesg | grep 'st[0-9] at' > $info"); + system("dmesg -s 100000 | grep 'st[0-9] at' > $info"); my @info = cat_($info); foreach (@info) { diff --git a/perl-install/standalone/draksplash b/perl-install/standalone/draksplash index 3101128fd..91cc3664b 100755 --- a/perl-install/standalone/draksplash +++ b/perl-install/standalone/draksplash @@ -126,18 +126,18 @@ my %boot_conf_frame = ('frame' => Gtk2::Frame->new(N("Configure bootsplash pictu 'quiet' => N("Make kernel message quiet by default"), }, }, - 'pos' => [ 'tx 1', - 'ty 1', - 'tw 1', - 'th 1', - 'px 1', - 'py 1', - 'pw 1', - 'ph 1', + 'pos' => [ 'tx', + 'ty', + 'tw', + 'th', + 'px', + 'py', + 'pw', + 'ph', 'pc', 'logo', 'quiet', - 'annul', + # 'annul', 'prev', 'save', 'kill', @@ -370,47 +370,49 @@ sub mk_frame { my $u = create_packtable({ col_spacings => 10, row_spacings => 5 }, map { my @widgets; + my $pos = $_; #- look for label - if ($ref->{widget}{label}{$1}) { - my $w = $ref->{widgets}{label}{$1} = Gtk2::Label->new($ref->{widget}{label}{$1}); + if ($ref->{widget}{label}{$pos}) { + my $w = $ref->{widgets}{label}{$pos} = Gtk2::Label->new($ref->{widget}{label}{$pos}); push @widgets, $w; } #- look for scale - if ($ref->{widget}{scale}{$1}) { - my $w = $ref->{widgets}{scale}{$1} = Gtk2::HScale->new($adj{$1} = Gtk2::Adjustment->new(0, 0, $scale_size{$1}, 1, 10, 0)); - $ref->{widgets}{scale}{$1}->set_digits(0); + if ($ref->{widget}{scale}{$pos}) { + my $w = $ref->{widgets}{scale}{$pos} = Gtk2::HScale->new($adj{$pos} = Gtk2::Adjustment->new(0, 0, $scale_size{$pos}, 1, 10, 0)); + $ref->{widgets}{scale}{$pos}->set_digits(0); push @widgets, $w; } - $adj{$1} and $adj{$1}->set_value($theme{boot_conf}{$1}); + $adj{$pos} and $adj{$pos}->set_value($theme{boot_conf}{$pos}); #- look for combo my @popdown; - if ($ref->{widget}{combo}{$1}) { - @popdown = @{$ref->{widget}{combo}{$1}}; - my $w = $ref->{widgets}{combo}{$1} = $ref->{widget}{extras}{$1}{noneditable} ? Gtk2::OptionMenu->new : Gtk2::Combo->new; - $ref->{widgets}{combo}{$1}->set_popdown_strings(@popdown); + if ($ref->{widget}{combo}{$pos}) { + @popdown = @{$ref->{widget}{combo}{$pos}}; + my $w = $ref->{widgets}{combo}{$pos} = $ref->{widget}{extras}{$pos}{noneditable} ? Gtk2::ComboBox->new_text : Gtk2::Combo->new; + $w->set_popdown_strings(@popdown); + $w->set_active(0) if $w->isa('Gtk2::ComboBox'); push @widgets, $w; } #- look for checkbox - if ($ref->{widget}{check}{$1}) { - my $w = $ref->{widgets}{check}{$1} = Gtk2::CheckButton->new($ref->{widget}{check}{$1}); - $ref->{widgets}{check}{$1}->set_active(1); + if ($ref->{widget}{check}{$pos}) { + my $w = $ref->{widgets}{check}{$pos} = Gtk2::CheckButton->new($ref->{widget}{check}{$pos}); + $ref->{widgets}{check}{$pos}->set_active(1); push @widgets, $w; } #- look for button - if ($ref->{widget}{button}{$1}) { - my $w = $ref->{widgets}{button}{$1} = Gtk2::Button->new($ref->{widget}{button}{$1}); + if ($ref->{widget}{button}{$pos}) { + my $w = $ref->{widgets}{button}{$pos} = Gtk2::Button->new($ref->{widget}{button}{$pos}); @widgets ? push @widgets, $w : push @buttons, $w; } #- look for tooltips - $ref->{widget}{tooltip}{$1} and tool_tip($1, \%$ref); + $ref->{widget}{tooltip}{$pos} and tool_tip($pos, \%$ref); if_(@widgets, \@widgets); } @{$ref->{pos}} ); diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 6d5bb165f..dffd5d674 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -970,7 +970,7 @@ sub main { my ($o, $o_completed, $o_canceled) = @_; gtkset_mousecursor_normal(); my $timeout = Glib::Timeout->add(1000, sub { gtkset_mousecursor_normal(); 1 }); - my $_b = MDK::Common::Func::before_leaving { Glib::Source->remove($timeout) }; + my $_b = MDK::Common::Func::before_leaving { $o->destroy; Glib::Source->remove($timeout) }; $o->show; do { -- cgit v1.2.1