summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMystery Man 580 <uid580@mandriva.org>2002-12-04 10:14:23 +0000
committerMystery Man 580 <uid580@mandriva.org>2002-12-04 10:14:23 +0000
commitd3491c6707e7b0e5265d63ecc540e5c3f75f3c20 (patch)
tree44d9a98a3e4cad9ae4c4b627a9d24b203df6f9ea
parentac5763aa5e12f24a2d78c52821597a7dcc9653ec (diff)
downloaddrakx-d3491c6707e7b0e5265d63ecc540e5c3f75f3c20.tar
drakx-d3491c6707e7b0e5265d63ecc540e5c3f75f3c20.tar.gz
drakx-d3491c6707e7b0e5265d63ecc540e5c3f75f3c20.tar.bz2
drakx-d3491c6707e7b0e5265d63ecc540e5c3f75f3c20.tar.xz
drakx-d3491c6707e7b0e5265d63ecc540e5c3f75f3c20.zip
fix gtktext_insert() usage
-rw-r--r--perl-install/harddrake/ui.pm47
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) {