summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xperl-install/standalone/drakbug26
-rwxr-xr-xperl-install/standalone/drakxtv14
-rwxr-xr-xperl-install/standalone/scannerdrake19
3 files changed, 31 insertions, 28 deletions
diff --git a/perl-install/standalone/drakbug b/perl-install/standalone/drakbug
index fab8662be..3ec74570d 100755
--- a/perl-install/standalone/drakbug
+++ b/perl-install/standalone/drakbug
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# Drak Bug Report
-# Copyright (C) 2002 MandrakeSoft (daouda@mandrakesoft.com)
+# C$opyright (C) 2002 MandrakeSoft (daouda@mandrakesoft.com)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ my $in = 'interactive'->vnew;
$::bugzilla_url = "https://qa.mandrakesoft.com";
my $version = "0.9.0";
-my $prog = undef;
+my $prog;
sub usage {
print STDERR _("drakbug version %s
@@ -51,16 +51,16 @@ OPTIONS:
while (defined($_ = shift @ARGV)) {
/^--help$/ and do { usage; next };
- /^--report$/ and do { $prog = shift @ARGV;};
+ /^--report$/ and do { $prog = shift @ARGV };
}
my $window_g = new Gtk::Window -toplevel;
$window_g->set_policy($false,$false,$true);
-$window_g->set_position( 1 );
-$window_g->border_width( 5 );
+$window_g->set_position(1);
+$window_g->border_width(5);
$window_g->set_title(_("Mandrake Bug Report Tool"));
#$window_g->set_usize(540, 350);
-$window_g->signal_connect( "delete_event", \&quit_global);
+$window_g->signal_connect("delete_event", \&quit_global);
my $mdk_app = {
_("Mandrake Control Center") => 'drakconf',
@@ -106,7 +106,7 @@ $mdk_rel->set_text("$mdk_release");
gtkpack2__(
gtkpack2__(my $vbx = new Gtk::VBox(0,5),
- gtkadd($table ),
+ gtkadd($table),
gtkpack(new Gtk::HBox(0,0),
gtkpack(gtkset_justify(new Gtk::Label(_("\n\nTo submit a bug report, click on the button report.\nThis will open a web browser window on https://www.bugzilla.com\n where you'll find a form to fill in.The information displayed above will be \ntransferred to that server\n\n")),"left")),
),
@@ -119,14 +119,14 @@ if (defined $prog && member($prog, @all_drakxtools)) {
update_app($prog);
};
-$comb_app->entry->signal_connect('changed', sub { update_app($comb_app->entry->get_text())} );
+$comb_app->entry->signal_connect('changed', sub { update_app($comb_app->entry->get_text()) });
my $kernel = $kernel_rel->get_chars(0,-1);
my $hbx = new Gtk::HBox(0,0);
my $Close_Button = new Gtk::Button(_("Close"));
-$Close_Button->signal_connect(clicked => sub { Gtk->exit(0)});
+$Close_Button->signal_connect(clicked => sub { Gtk->exit(0) });
$hbx->pack_start($Close_Button,0,0,0);
my $Report_Button = new Gtk::Button(_("Report"));
-$Report_Button->signal_connect(clicked => sub { connect_bugzilla("$::bugzilla_url/wizard/");});
+$Report_Button->signal_connect(clicked => sub { connect_bugzilla("$::bugzilla_url/wizard/") });
$hbx->pack_end($Report_Button,0,0,0);
$vbx->pack_start($hbx,0,0,0);
$window_g->add($vbx);
@@ -143,7 +143,7 @@ sub update_app {
if (member($text,@all_drakxtools)) {
chomp($app_choice = `rpm -q drakxtools`)
} else {
- exists $mdk_app->{$text}[1] ? $which_app =chomp_(`which '$mdk_app->{$text}[1]'`) : $which_app = chomp_(`which '$mdk_app->{$text}'`);
+ exists $mdk_app->{$text}[1] ? $which_app =chomp_(`which '$mdk_app->{$text}[1]'`) : { $which_app = chomp_(`which '$mdk_app->{$text}'`) };
$app_choice = chomp_(`rpm -qf '$which_app'`);
}
$app_choice !~ m/ / ? $package->set_text("$app_choice") : $package->set_text(_("Not installed"));
@@ -155,9 +155,9 @@ sub connect_bugzilla {
my $w = $in->wait_message('',_("connecting to Bugzilla wizard ..."));
sleep(2);
exec $ENV{BROWSER},$url if exists $ENV{BROWSER} ;
- my @browser = qw (mozilla konqueror galeon );
+ my @browser = qw (mozilla konqueror galeon);
foreach (@browser) {
- if (-e "/usr/bin/$_") { print "execing $_ : $url\n "; exec $_,$url}
+ if (-e "/usr/bin/$_") { print "execing $_ : $url\n "; exec $_,$url }
}
$in->ask_warn('', _("No browser available! Please install one"));
}
diff --git a/perl-install/standalone/drakxtv b/perl-install/standalone/drakxtv
index ec02ba537..1990c64f0 100755
--- a/perl-install/standalone/drakxtv
+++ b/perl-install/standalone/drakxtv
@@ -81,7 +81,7 @@ You can install it by typing \"urpmi xawtv\" as root, in a console.")));
# default to pal since most people use that
$norm = "PAL";
- if("@ARGV" !~ /--help|-h/) {
+ if ("@ARGV" !~ /--help|-h/) {
my %countries =
(
"ar" => [ "argentina" ],
@@ -111,7 +111,7 @@ You can install it by typing \"urpmi xawtv\" as root, in a console.")));
if ($in->ask_from("TVdrake", _("Please,\ntype in your tv norm and country"),
[
- { label => _("TV norm :"), val => \$norm, list => ["NTSC", "NTSC-JP","PAL", "PAL-M", "PAL-N", "PAL-NC", "SECAM"], type => 'combo'},
+ { label => _("TV norm :"), val => \$norm, list => ["NTSC", "NTSC-JP","PAL", "PAL-M", "PAL-N", "PAL-NC", "SECAM"], type => 'combo' },
{ label => _("Area :"), val => \$ftable_id, list => [keys %freqtables], format => sub { $freqtables{$_[0]} }, sort => 1},
]
))
@@ -121,14 +121,14 @@ You can install it by typing \"urpmi xawtv\" as root, in a console.")));
# will be ignored since "All" is selected (because of -a)
$ftable_id = "france -a " if ($ftable_id eq -1);
# Note that this'll be broken if/when we implement interactive::qt
- my $use_X =$in->isa('interactive::gtk') && -x "/usr/X11R6/bin/xvt";
+ my $use_X = $in->isa('interactive::gtk') && -x "/usr/X11R6/bin/xvt";
my $home = $ENV{HOME};
- my $i=system ( (($use_X ) ?
+ my $i = system ( (($use_X) ?
"xvt -T '"._("Scanning for TV channels")." ...' -e ":"")
- . "scantv -n $norm -f $ftable_id -o $home/.xawtv".(($use_X )?"":" &>$home/tmp/scantv.log;"));
+ . "scantv -n $norm -f $ftable_id -o $home/.xawtv".(($use_X)?"":" &>$home/tmp/scantv.log;"));
if ($i) {
$in->ask_warn(_("There was an error while scanning for TV channels"),
- _("XawTV isn't installed!")); }
+ _("XawTV isn't installed!")) }
else {
standalone::explanations("created file $home/.xawtv");
$in->ask_warn(_("Have a nice day!"),
@@ -142,7 +142,7 @@ You can install it by typing \"urpmi xawtv\" as root, in a console.")));
my @devices = detect_devices::probeall(1);
if (grep { $_->{media_type} eq 'MULTIMEDIA_VIDEO' } @devices) {
if (($< == 0) && (grep { $_->{driver} eq 'bttv' } @devices)) {
- use harddrake::bttv;
+ require harddrake::bttv;
modules::read_conf;
harddrake::bttv::config($in);
modules::write_conf;
diff --git a/perl-install/standalone/scannerdrake b/perl-install/standalone/scannerdrake
index 5714cabe9..92a570341 100755
--- a/perl-install/standalone/scannerdrake
+++ b/perl-install/standalone/scannerdrake
@@ -29,15 +29,15 @@ use scanner;
for (@ARGV) {
/^--version$/ and die 'version: $Id$ '."\n";
/^--help$/ and die 'logdrake [--version] [--help] [--manual] [--device=dev] [--update-sane=sane_desc_dir] [--update-usbtable] [--dynamic=dev]';
- /^--update-usbtable$/ and do {scanner::updateScannerDBfromUsbtable(); exit;};
- /^--update-sane=(.*)$/ and do {scanner::updateScannerDBfromSane($1); exit;};
+ /^--update-usbtable$/ and do { scanner::updateScannerDBfromUsbtable(); exit };
+ /^--update-sane=(.*)$/ and do { scanner::updateScannerDBfromSane($1); exit };
/^--manual$/ and $::Manual=1;
- /^--dynamic=(.*)$/ and do { dynamic($1); exit;};
+ /^--dynamic=(.*)$/ and do { dynamic($1); exit };
}
$in = 'interactive'->vnew('su', 'default');
$in->do_pkgs->install('sane-backends', 'xsane', if_($in->do_pkgs->is_installed('gimp'),'xsane-gimp'));
-if ($::Manual) {manual(); quit();}
+if ($::Manual) { manual(); quit() }
my $wait = $in->wait_message(_("Test ports"), _("Detecting devices ..."));
@f = scanner::findScannerUsbport();
$wait=undef;
@@ -56,7 +56,7 @@ sub auto {
}
sub manual {
- my $s = $in->ask_from_treelist('scannerdrake', _("Select a scanner"), '|', [' None', keys %$scanner::scannerDB], '' ) or return;
+ my $s = $in->ask_from_treelist('scannerdrake', _("Select a scanner"), '|', [' None', keys %$scanner::scannerDB], '') or return;
return if $s eq ' None';
tryConfScanner($s);
}
@@ -67,7 +67,7 @@ sub dynamic {
if (member($_->{val}{DESCRIPTION}), keys %$scanner::scannerDB) {
my $name = $_->{val}{DESCRIPTION};
$name =~ s/\s$//; #some HP entry have a trailing space, i will correct usbtable asap
- scanner::confScanner($name, $_->{port}) unless($scanner::scannerDB->{$model}{flags}{unsupported});
+ scanner::confScanner($name, $_->{port}) unless ($scanner::scannerDB->{$model}{flags}{unsupported});
}
}
}
@@ -88,11 +88,11 @@ sub tryConfScanner {
#return;
}
if ($scanner::scannerDB->{$model}{ask} =~ /DEVICE/) {
- $port='/dev/sg0';
+ $port = '/dev/sg0';
$in->ask_from('scannerdrake',
_("Scannerdrake was not able to detect your %s scanner.\nPlease select the device where your scanner is plugged", $model),
[
- { label => _("choose device"), val => \$port, list => ['/dev/sg0', '/dev/sg1', '/dev/sg2', '/dev/sg3', '/dev/sg4' ], not_edit => 0, sort => 1},
+ { label => _("choose device"), val => \$port, list => ['/dev/sg0', '/dev/sg1', '/dev/sg2', '/dev/sg3', '/dev/sg4' ], not_edit => 0, sort => 1 },
],
) or manual();
}
@@ -113,6 +113,9 @@ sub quit {
#-----------------------------------------------
# $Log$
+# Revision 1.13 2002/08/01 16:56:59 tvignaud
+# perl_checker fixes
+#
# Revision 1.12 2002/07/31 23:10:55 prigaux
# Handle parsing --embedded command line in standalone.pm
# => allows to remove the somewhat mythical