diff options
author | Mystery Man 580 <uid580@mandriva.org> | 2002-12-04 10:14:23 +0000 |
---|---|---|
committer | Mystery Man 580 <uid580@mandriva.org> | 2002-12-04 10:14:23 +0000 |
commit | d3491c6707e7b0e5265d63ecc540e5c3f75f3c20 (patch) | |
tree | 44d9a98a3e4cad9ae4c4b627a9d24b203df6f9ea /perl-install/harddrake/ui.pm | |
parent | ac5763aa5e12f24a2d78c52821597a7dcc9653ec (diff) | |
download | drakx-backup-do-not-use-d3491c6707e7b0e5265d63ecc540e5c3f75f3c20.tar drakx-backup-do-not-use-d3491c6707e7b0e5265d63ecc540e5c3f75f3c20.tar.gz drakx-backup-do-not-use-d3491c6707e7b0e5265d63ecc540e5c3f75f3c20.tar.bz2 drakx-backup-do-not-use-d3491c6707e7b0e5265d63ecc540e5c3f75f3c20.tar.xz drakx-backup-do-not-use-d3491c6707e7b0e5265d63ecc540e5c3f75f3c20.zip |
fix gtktext_insert() usage
Diffstat (limited to 'perl-install/harddrake/ui.pm')
-rw-r--r-- | perl-install/harddrake/ui.pm | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/perl-install/harddrake/ui.pm b/perl-install/harddrake/ui.pm index 924507354..c4f8e59cb 100644 --- a/perl-install/harddrake/ui.pm +++ b/perl-install/harddrake/ui.pm @@ -227,34 +227,35 @@ sub new { } my ($model, $iter) = $select->get_selected(); if ($model) { - my $id = $model->get($iter, 1); - $current_device = $data{$id}; - - 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 ]); - - # we've valid driver, let's offer to configure it - if (exists $current_device->{driver} && $current_device->{driver} !~ /(unknown|.*\|.*)/ && $current_device->{driver} !~ /^Card:/) { - $module_cfg_button->show; - } - - $current_configurator = $configurators{$id}; - $config_button->show if -x $current_configurator; - return 1; - } + my $id = $model->get($iter, 1); + $current_device = $data{$id}; + + 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 ]); + + # we've valid driver, let's offer to configure it + if (exists $current_device->{driver} && $current_device->{driver} !~ /(unknown|.*\|.*)/ && $current_device->{driver} !~ /^Card:/) { + $module_cfg_button->show; + } + + $current_configurator = $configurators{$id}; + $config_button->show if -x $current_configurator; + return 1; + } } # hide buttons if needed $text->get_buffer->set_text('', -1); # erase all previous text $config_button->hide; $module_cfg_button->hide; - }); + }); # Fill the graphic tree with a "tree branch" widget per device category foreach (@class_tree) { |