diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2002-12-05 09:12:03 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2002-12-05 09:12:03 +0000 |
commit | 787e00a0ff28993200ad83d7c88823780cfdc455 (patch) | |
tree | 385fa6a64162950f45bb350a162988d66981bb32 /perl-install/standalone | |
parent | 76694f9e89f004ba696607e27bc5d39243005a69 (diff) | |
download | drakx-backup-do-not-use-787e00a0ff28993200ad83d7c88823780cfdc455.tar drakx-backup-do-not-use-787e00a0ff28993200ad83d7c88823780cfdc455.tar.gz drakx-backup-do-not-use-787e00a0ff28993200ad83d7c88823780cfdc455.tar.bz2 drakx-backup-do-not-use-787e00a0ff28993200ad83d7c88823780cfdc455.tar.xz drakx-backup-do-not-use-787e00a0ff28993200ad83d7c88823780cfdc455.zip |
s/describe/describes/
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/harddrake2 | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/perl-install/standalone/harddrake2 b/perl-install/standalone/harddrake2 index a5490f7a9..87efbd09e 100755 --- a/perl-install/standalone/harddrake2 +++ b/perl-install/standalone/harddrake2 @@ -35,7 +35,7 @@ my %fields = "cpu family" => [ N("Cpuid family"), N("Family of the cpu (eg: 6 for i686 class)") ], "cpuid level" => [ N("Cpuid level"), N("Information level that one can obtain through the cpuid instruction") ], "cpu MHz" => [ N("Frequency (MHz)"), N("The cpu frequency in Mhz (Mega herz which in first approximation may be coarsely assimilated to number of instructions the cpu is able to execute per second)") ], - "description" => [ N("Description"), N("This field describe the device") ], + "description" => [ N("Description"), N("This field describes the device") ], "device" => [ N("Old device file"), N("old static device name used in dev package") ], "devfs_device" => [ N("New devfs device"), @@ -124,7 +124,7 @@ my $statusbar; $w->{window}->add(gtkpack_(0, Gtk2::VBox->new(0, 0), if_(!$::isEmbedded, 0, $menubar), 1, create_hpaned(gtkadd(new Gtk2::Frame(N("Detected hardware")), - create_scrolled_window(my $tree = Gtk2::TreeView->new_with_model($tree_model))), + create_scrolled_window(gtkset_size_request(my $tree = Gtk2::TreeView->new_with_model($tree_model), 350, -1))), gtkpack_(0, Gtk2::VBox->new(0, 0), 1, gtkadd(gtkset_size_request(new Gtk2::Frame(N("Information")), 300, 450), create_scrolled_window(my $text = Gtk2::TextView->new)), @@ -146,7 +146,7 @@ $w->{window}->add(gtkpack_(0, Gtk2::VBox->new(0, 0), } }) ), - 'resize2' => 1 + 'resize2' => 1, 'resize1' => 1, 'shrink1' => 0, 'shrink2' => 1 ), 0, $statusbar = new Gtk2::Statusbar, if_($::isEmbedded, 0, gtksignal_connect(my $but = new Gtk2::Button(N("Quit")), @@ -159,7 +159,6 @@ my (%data, %configurators); gtktext_append($text, [ [ N_("Click on a device in the left tree in order to get its information displayed here.") ] ]); $tree->append_column(my $pixcolumn = Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererPixbuf->new, 'pixbuf' => 0)); $tree->append_column(my $textcolumn = Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 1)); -# $textcolumn->set_min_width(350); $tree->set_headers_visible(0); my $select_count; my $selection = gtksignal_connect($tree->get_selection(), 'changed' => sub { @@ -177,17 +176,16 @@ my $selection = gtksignal_connect($tree->get_selection(), 'changed' => sub { if ($current_device) { gtktext_insert($text, [ map { - if ($fields{$_}[0]) { - [ $fields{$_}[0] . ": ", { 'foreground' => 'royalblue3' } ], - [ "$current_device->{$_}\n\n", { 'foreground' => ($_ eq 'driver' && $current_device->{$_} eq 'unknown' ? 'indian red' : 'black') } ] - } else { - print "Warning: skip \"$_\" field => \"$current_device->{$_}\"\n\n"; - (); - } - } sort keys %$current_device ]); + if_($fields{$_}[0], [ $fields{$_}[0] . ": ", { 'foreground' => 'royalblue3' } ], + [ "$current_device->{$_}\n\n", { 'foreground' => ($_ eq 'driver' && $current_device->{$_} eq 'unknown' ? 'indian red' : 'black') } ]) + } sort keys %$current_device ]); + + foreach (keys %$current_device) { + print "Warning: skip \"$_\" field => \"$current_device->{$_}\"\n\n" unless $fields{$_}[0]; + }; # we've valid driver, let's offer to configure it - show_hide(exists $current_device->{driver} && $current_device->{driver} !~ /(unknown|.*\|.*)/ && $current_device->{driver} !~ /^Card:/, $module_cfg_button); + show_hide($current_device->{driver} !~ /(unknown|.*\|.*)/ && $current_device->{driver} !~ /^Card:/, $module_cfg_button); $current_configurator = $configurators{$id}; show_hide(-x $current_configurator, $config_button); @@ -216,23 +214,23 @@ foreach (@harddrake::data::tree) { # Fill the graphic tree with a "tree leaf" widget per device foreach (@devices) { # we really should test for $title there: - if (exists $_->{bus} && $_->{bus} eq "PCI") { + if ($_->{bus} eq "PCI") { my $i = $_; $_->{bus_id} = join ':', map { if_($i->{$_} ne "65535", sprintf("%lx", $i->{$_})) } qw(vendor id subvendor subid); $_->{bus_location} = join ':', map { sprintf("%lx", $i->{$_}) } qw(pci_bus pci_device pci_function); } # split description into manufacturer/description - ($_->{Vendor}, $_->{description}) = split(/\|/, $_->{description}) if exists $_->{description}; + ($_->{Vendor}, $_->{description}) = split(/\|/, $_->{description}) if $_->{description}; - if (exists $_->{val}) { # Scanner ? + if ($_->{val}) { # Scanner ? my $val = $_->{val}; ($_->{Vendor}, $_->{description}) = split(/\|/, $val->{DESCRIPTION}); } # EIDE detection incoherency: - if (exists $_->{bus} && $_->{bus} eq 'ide') { + if ($_->{bus} eq 'ide') { $_->{channel} = $_->{channel} ? N("secondary") : N("primary"); delete $_->{info}; - } elsif ((exists $_->{id}) && $_->{bus} !~ /USB|PCI/) { + } elsif ($_->{bus} !~ /USB|PCI/) { # SCSI detection incoherency: my $i = $_; $_->{bus_location} = join ':', map { sprintf("%lx", $i->{$_}) } qw(bus id); @@ -245,8 +243,8 @@ foreach (@harddrake::data::tree) { foreach my $i (qw(vendor id subvendor subid pci_bus pci_device pci_function MOUSETYPE XMOUSETYPE unsafe val devfs_prefix wacom auxmouse)) { delete $_->{$i} }; my $custom_id = harddrake::data::custom_id($_, $title); - $custom_id .= ' ' while exists($data{$custom_id}); # get a unique id for eg bt8xx audio/video funtions - $_->{device} = '/dev/'.$_->{device} if exists $_->{device}; + $custom_id .= ' ' while $data{$custom_id}; # get a unique id for eg bt8xx audio/video funtions + $_->{device} = '/dev/'.$_->{device} if $_->{device}; $tree_model->append_set($parent_iter, [ 1 => $custom_id ])->free; $data{$custom_id} = $_; $configurators{$custom_id} = $configurator; @@ -265,6 +263,10 @@ foreach (['PRINTERS_DETECTION', N("/Autodetect printers")], ['MODEMS_DETECTION', $check_boxes{$_->[0]}->set_active($options{$_->[0]}); # restore saved values } +$textcolumn->set_min_width(350); +#$textcolumn->set_minmax_width(400); +$textcolumn->set_sizing('GTK_TREE_VIEW_COLUMN_AUTOSIZE');#GROW_ONLY +#$tree->columns_autosize(); $w->{rwindow}->show_all; undef $wait; gtkset_mousecursor_normal(); |