summaryrefslogtreecommitdiffstats
path: root/perl-install/fsedit.pm
Commit message (Expand)AuthorAgeFilesLines
* no_commentPascal Rigaux2000-05-081-1/+1
* *** empty log message ***Pascal Rigaux2000-05-081-2/+1
* fixed awfull typoStefan Siegel2000-05-071-1/+2
* no_commentPascal Rigaux2000-05-071-1/+2
* no_commentPascal Rigaux2000-05-051-0/+2
* no_commentPascal Rigaux2000-05-051-1/+1
* no_commentPascal Rigaux2000-05-051-1/+2
* no_commentPascal Rigaux2000-04-271-1/+1
* no_commentPascal Rigaux2000-04-101-0/+5
* no_commentPascal Rigaux2000-04-041-0/+1
* no_commentPascal Rigaux2000-03-301-1/+1
* no_commentPascal Rigaux2000-03-251-0/+1
* no_commentPascal Rigaux2000-03-141-2/+6
* no_commentPascal Rigaux2000-03-111-5/+18
* no_commentPascal Rigaux2000-03-091-1/+1
* no_commentPascal Rigaux2000-03-081-3/+8
* no_commentPascal Rigaux2000-02-291-0/+3
* no_commentPascal Rigaux2000-02-251-2/+1
* no_commentPascal Rigaux2000-02-231-12/+9
* *** empty log message ***Francois Pons2000-02-041-0/+7
* no_commentPascal Rigaux2000-01-281-1/+1
* no_commentPascal Rigaux2000-01-271-4/+8
* *** empty log message ***Francois Pons2000-01-241-3/+3
* first sparc release of DrakX.Francois Pons2000-01-241-0/+6
* no_commentPascal Rigaux2000-01-161-2/+2
* no_commentPascal Rigaux2000-01-021-3/+4
* no_commentPascal Rigaux1999-12-211-1/+1
* no_commentPascal Rigaux1999-12-151-0/+10
* no_commentPascal Rigaux1999-12-091-6/+39
* no_commentPascal Rigaux1999-11-181-1/+0
* no_commentPascal Rigaux1999-11-141-79/+51
* no_commentPascal Rigaux1999-11-091-1/+1
* no_commentPascal Rigaux1999-11-091-0/+6
* no_commentPascal Rigaux1999-10-191-9/+13
* no_commentPascal Rigaux1999-10-181-1/+1
* no_commentPascal Rigaux1999-10-131-3/+0
* no_commentPascal Rigaux1999-10-131-1/+4
* no_commentPascal Rigaux1999-10-131-1/+1
* no_commentPascal Rigaux1999-10-101-1/+1
* no_commentPascal Rigaux1999-10-081-2/+4
* no_commentPascal Rigaux1999-10-081-1/+1
* no_commentPascal Rigaux1999-10-081-1/+50
* no_commentPascal Rigaux1999-09-271-0/+5
* no_commentPascal Rigaux1999-09-241-1/+1
* no_commentPascal Rigaux1999-09-201-0/+7
* no_commentPascal Rigaux1999-09-191-20/+20
* no_commentPascal Rigaux1999-09-171-0/+2
* no_commentPascal Rigaux1999-09-161-0/+28
* no_commentPascal Rigaux1999-09-151-2/+2
* *** empty log message ***pad1999-09-141-4/+14
/span>->ask_from_entries_refH(_("Remote lpd Printer Options"), _("To use a remote lpd print queue, you need to supply the hostname of the printer server and the queue name on that server which jobs should be placed in."), [ _("Remote hostname") => \$printer->{REMOTEHOST}, _("Remote queue") => \$printer->{REMOTEQUEUE}, ], ); } sub setup_smb($$$) { my ($printer, $in, $install) = @_; return if !$in->ask_from_entries_refH( _("SMB (Windows 9x/NT) Printer Options"), _("To print to a SMB printer, you need to provide the SMB host name (Note! It may be different from its TCP/IP hostname!) and possibly the IP address of the print server, as well as the share name for the printer you wish to access and any applicable user name, password, and workgroup information."), [ _("SMB server host") => \$printer->{SMBHOST}, _("SMB server IP") => \$printer->{SMBHOSTIP}, _("Share name") => \$printer->{SMBSHARE}, _("User name") => \$printer->{SMBUSER}, _("Password") => { val => \$printer->{SMBPASSWD}, hidden => 1 }, _("Workgroup") => \$printer->{SMBWORKGROUP} ], complete => sub { unless (network::is_ip($printer->{SMBHOSTIP})) { $in->ask_warn('', _("IP address should be in format 1.2.3.4")); return (1,1); } return 0; }, ); &$install('samba'); 1; } sub setup_ncp($$$) { my ($printer, $in, $install) = @_; return if !$in->ask_from_entries_refH(_("NetWare Printer Options"), _("To print to a NetWare printer, you need to provide the NetWare print server name (Note! it may be different from its TCP/IP hostname!) as well as the print queue name for the printer you wish to access and any applicable user name and password."), [ _("Printer Server") => \$printer->{NCPHOST}, _("Print Queue Name") => \$printer->{NCPQUEUE}, _("User name") => \$printer->{NCPUSER}, _("Password") => {val => \$printer->{NCPPASSWD}, hidden => 1} ], ); &$install('ncpfs'); 1; } sub setup_gsdriver($$$;$) { my ($printer, $in, $install, $upNetwork) = @_; my $action; my @action = qw(ascii ps both done); my %action = ( ascii => _("Yes, print ASCII test page"), ps => _("Yes, print PostScript test page"), both => _("Yes, print both test pages"), done => _("No"), ); do { $printer->{DBENTRY} ||= $printer::thedb_gsdriver{$printer->{GSDRIVER}}{ENTRY}; eval { $printer->{DBENTRY} = $printer::descr_to_db{ $in->ask_from_list_with_help_(_("Configure Printer"), _("What type of printer do you have?"), [ @printer::entry_db_description ], { %printer::descr_to_help }, $printer::db_to_descr{$printer->{DBENTRY}}, ) }; }; $@ =~ /^ask_from_list cancel/ and return; my %db_entry = %{$printer::thedb{$printer->{DBENTRY}}}; #- specific printer driver to install. &$install('pnm2ppa') if $db_entry{GSDRIVER} eq 'ppa'; my @list_res = @{$db_entry{RESOLUTION} || []}; my @res = map { "$_->{XDPI}x$_->{YDPI}" } @list_res; my @list_col = @{$db_entry{BITSPERPIXEL} || []}; my @col = map { "$_->{DEPTH} $_->{DESCR}" } @list_col; my %col_to_depth = map { ("$_->{DEPTH} $_->{DESCR}", $_->{DEPTH}) } @list_col; my %depth_to_col = reverse %col_to_depth; my $is_uniprint = $db_entry{GSDRIVER} eq "uniprint"; $printer->{PAPERSIZE} ||= "letter"; $printer->{RESOLUTION} = @res ? $res[0] || "Default" : "Default" unless member($printer->{RESOLUTION}, @res); $printer->{ASCII_TO_PS} = $db_entry{GSDRIVER} eq 'POSTSCRIPT' unless defined($printer->{ASCII_TO_PS}); $printer->{CRLF} = $db_entry{DESCR} =~ /HP/ unless defined($printer->{CRLF}); $printer->{BITSPERPIXEL} = @list_col ? $depth_to_col{$printer->{BITSPERPIXEL}} || $col[0] : "Default"; $printer->{NUP} = 1 unless member($printer->{NUP}, qw(1 2 4 8)); $printer->{RTLFTMAR} = 18 unless $printer->{RTLFTMAR} =~ /^\d+$/; $printer->{TOPBOTMAR} = 18 unless $printer->{TOPBOTMAR} =~ /^\d+$/; $printer->{EXTRA_GS_OPTIONS} =~ s/^"(.*)"/$1/; $printer->{TEXTONLYOPTIONS} =~ s/^"(.*)"/$1/; return if !$in->ask_from_entries_refH('', _("Printer options"), [ _("Paper Size") => { val => \$printer->{PAPERSIZE}, type => 'list', not_edit => !$::expert, list => \@printer::papersize_type }, _("Eject page after job?") => { val => \$printer->{AUTOSENDEOF}, type => 'bool' }, @list_res > 1 ? ( _("Resolution") => { val => \$printer->{RESOLUTION}, type => 'list', not_edit => !$::expert, list => \@res } ) : (), @list_col > 1 ? ( $is_uniprint ? ( _("Uniprint driver options") => { val => \$printer->{BITSPERPIXEL}, type => 'list', not_edit => 1, list => \@col } ) : ( _("Color depth options") => { val => \$printer->{BITSPERPIXEL}, type => 'list', not_edit => 1, list => \@col } ), ) : (), $db_entry{GSDRIVER} ne 'TEXT' && $db_entry{GSDRIVER} ne 'POSTSCRIPT' && $db_entry{GSDRIVER} ne 'ppa' ? ( _("Print text as PostScript?") => { val => \$printer->{ASCII_TO_PS}, type => 'bool' }, ) : (), #+_("Reverse page order") => { val => \$printer->{REVERSE_ORDER}, type => 'bool' }, $db_entry{GSDRIVER} ne 'POSTSCRIPT' ? (