summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-09-15 18:11:42 +0000
committerThierry Vignaud <tv@mandriva.org>2008-09-15 18:11:42 +0000
commit4018f0145afdd52a767ba4fb4903e18e6505c64c (patch)
treef0ed1b4b083e55d759a58bdf39246e7b15c17900
parent939584f614af4ffc5ac83097e669bc22510460ee (diff)
downloaddrakx-4018f0145afdd52a767ba4fb4903e18e6505c64c.tar
drakx-4018f0145afdd52a767ba4fb4903e18e6505c64c.tar.gz
drakx-4018f0145afdd52a767ba4fb4903e18e6505c64c.tar.bz2
drakx-4018f0145afdd52a767ba4fb4903e18e6505c64c.tar.xz
drakx-4018f0145afdd52a767ba4fb4903e18e6505c64c.zip
(level_choose) fix defaulting to current security level in GUI
(regression introduced in r244534 on 2008-08-29, was: '(level_choose) refresh "Security" step'
-rw-r--r--perl-install/install/NEWS3
-rw-r--r--perl-install/security/level.pm2
2 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 29a24b705..e45db6ec5 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,6 @@
+- fix displaying current security level in GUI
+ (regression introduced on 2008-08-29)
+
Version 11.42 - 12 September 2008
- increase default window height
diff --git a/perl-install/security/level.pm b/perl-install/security/level.pm
index 90ea34751..5fc20738b 100644
--- a/perl-install/security/level.pm
+++ b/perl-install/security/level.pm
@@ -59,7 +59,7 @@ connections from many clients. Note: if your machine is only a client on the Int
{ val => $security, list => \@l,
format => sub {
#-PO: this string is used to properly format "<security level>: <level description>"
- N("%s: %s", to_string($_), formatAlaTeX($help{$_}));
+ N("%s[:] %s", to_string($_[0]), formatAlaTeX($help{$_[0]}));
},
type => 'list', gtk => { use_boxradio => 1 } },
{ label => N("Security Administrator:"), title => 1 },
93'>193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571
package printer;
#-#####################################################################################

=head1 NAME 

printer - supply methods for manage the printer related files directory handles

=head1 SYNOPSIS

use printer;

=head1 DESCRIPTION

Use the source.

=cut

#-#####################################################################################

use diagnostics;
use strict;


#-#####################################################################################

=head2 Exported variable

=cut

#-#####################################################################################
use vars qw(%thedb %printer_type %printer_type_inv @papersize_type %fields $spooldir);

#-#####################################################################################

=head2 Imports

=cut

#-#####################################################################################
use Data::Dumper;

#-#####################################################################################

=head2 pixel imports

=cut

use commands;

#-#####################################################################################

#-#####################################################################################

=head2 Examples and types

=over 4

=item *

an entry in the 'printerdb' file, which describes each type of 
supported printer:

	StartEntry: DeskJet550
	  GSDriver: cdj550 
	  Description: {HP DeskJet 550C/560C/6xxC series}
	  About: { \
		     This driver supports the HP inkjet printers which have \
		     color capability using both black and color cartridges \
		     simultaneously. Known to work with the 682C and the 694C. \
		     Other 600 and 800 series printers may work \
		     if they have this feature. \
		     If your printer seems to be saturating the paper with ink, \
		     try added an extra GS option of '-dDepletion=2'. \
		     Ghostscript supports several optional parameters for \
		     this driver: see the document 'devices.doc' \
		     in the ghostscript directory under /usr/doc. \
		   }
	  Resolution: {300} {300} {}
	  BitsPerPixel:  {3} {Normal color printing with color cartridge}
	  BitsPerPixel:  {8} {Floyd-Steinberg B & W printing for better greys}
	  BitsPerPixel: {24} {Floyd-Steinberg Color printing (best, but slow)}
	  BitsPerPixel: {32} {Sometimes provides better output than 24}
	EndEntry

Example of data-struct:

	my %ex_printerdb_entry = 
	  (
	   ENTRY    => "DeskJet550",                               #-Human-readable name of the entry
	   GSDRIVER => "cdj550",                                   #-gs driver used by this printer
	   DESCR    => "HP DeskJet 550C/560C/6xxC series",         #-Single line description of printer
	   ABOUT    => "
	   This driver supports the HP inkjet printers which have 
	   color capability using both black and color cartridges 
		...",                                              #-Lengthy description of printer
	   RESOLUTION   => [                                       #-List of resolutions supported
			    {
			     XDPI    => 300,
			     YDPI    => 300,
			     DESCR   => "commentaire",
			    },
			   ],
	   BITSPERPIXEL => [                                       #-List of color depths supported
			    {
			     DEPTH => 3,
			     DESCR => "Normal color printing with color cartridge",
			    },
			   ],
	  )
	;

=item *

A printcap entry only represents a subset of possible options available       
Sufficient for the simple configuration we are interested in 
there is also some text in the template (.in) file in the spooldir

	# /etc/printcap                                                          
	#                                                                        
	# Please don't edit this file directly unless you know what you are doing
	# Be warned that the control-panel printtool requires a very strict forma
	# Look at the printcap(5) man page for more info.                        
	#                                                                        
	# This file can be edited with the printtool in the control-panel.       
										 
	##PRINTTOOL3## LOCAL uniprint NAxNA letter {} U_NECPrinwriter2X necp2x6 1
	lpname:\                                                                 
		:sd=/var/spool/lpd/lpnamespool:\                                 
		:mx#45:\                                                         
		:sh:\                                                            
		:lp=/dev/device:\                                                
		:if=/var/spool/lpd/lpnamespool/filter:                           
	##PRINTTOOL3## REMOTE st800 360x180 a4 {} EpsonStylus800 Default 1       
	remote:\                                                                 
		:sd=/var/spool/lpd/remotespool:\                                 
		:mx#47:\                                                         
		:sh:\                                                            
		:rm=remotehost:\                                                 
		:rp=remotequeue:\                                                
		:if=/var/spool/lpd/remotespool/filter:                           
	##PRINTTOOL3## SMB la75plus 180x180 letter {} DECLA75P Default {}        
	smb:\                                                                    
		:sd=/var/spool/lpd/smbspool:\                                    
		:mx#46:\                                                         
		:sh:\                                                            
		:if=/var/spool/lpd/smbspool/filter:\                             
		:af=/var/spool/lpd/smbspool/acct:\                               
		:lp=/dev/null:                                                   
	##PRINTTOOL3## NCP ap3250 180x180 letter {} EpsonAP3250 Default {}       
	ncp:\                                                                    
		:sd=/var/spool/lpd/ncpspool:\                                    
		:mx#46:\                                                         
		:sh:\                                                            
		:if=/var/spool/lpd/ncpspool/filter:\                             
		:af=/var/spool/lpd/ncpspool/acct:\                               
		:lp=/dev/null:                                                   

Example of data-struct:

	my %ex_printcap_entry = 
	  (
	   QUEUE    => "lpname",                            #-Queue name, can have multi separated by '|'
	
	   #-if you want something different from the default
	   SPOOLDIR => "/var/spool/lpd/lpnamespool/",        #-Spool directory
	   IF       => "/var/spool/lpd/lpnamespool/filter",  #-input filter
	   
	   #- commentaire inserer dans le printcap pour que printtool retrouve ses petits
	   DBENTRY      => "DeskJet670",                    #-entry in printer database for this printer  
	
	   RESOLUTION   => "NAxNA",                         #-ghostscript resolution to use
	   PAPERSIZE    => "letter",                        #-Papersize
	   BITSPERPIXEL => "necp2x6",                       #-ghostscript color option                    
	   CRLF         => 1 ,                              #-Whether or not to do CR/LF xlation         
	
	   TYPE         => "LOCAL",
	
	   #- LOCAL
	   DEVICE   => "/dev/device",                       #-Print device
	   
	   #- REMOTE (lpd) printers only 
	   REMOTEHOST   => "remotehost",                     #-Remote host (not used for all entries)
	   REMOTEQUEUE  => "remotequeue",                    #-Queue on the remote machine                
	
	
	   #-SMB (LAN Manager) only 
	   #- in spooldir/.config
	   #-share='\\hostname\printername'
	   #-hostip=1.2.3.4
	   #-user='user'
	   #-password='passowrd'
	   #-workgroup='AS3'
	   SMBHOST   => "hostname",                              #-Server name (NMB name, can have spaces)
	   SMBHOSTIP => "1.2.3.4",                               #-Can optional specify and IP address for host
	   SMBSHARE  => "printername",                           #-Name of share on the SMB server             
	   SMBUSER   => "user",                                  #-User to log in as on SMB server             
	   SMBPASSWD => "passowrd",                              #-Corresponding password                      
	   SMBWORKGROUP => "AS3",                                #-SMB workgroup name                          
	   AF        => "/var/spool/lpd/smbspool/acct",           #-accounting filter (needed for smbprint)
	
	   #- NCP (NetWare) only 
	   #- in spooldir/.config
	   #-server=printerservername
	   #-queue=queuename
	   #-user=user
	   #-password=pass
	   NCPHOST   => "printerservername",            #-Server name (NCP name)                      
	   NCPQUEUE  => "queuename",                    #-Queue on server                             
	   NCPUSER   => "user",                         #-User to log in as on NCP server             
	   NCPPASSWD => "pass",                         #-Corresponding password                      
			
	  )
	;

=cut 

#-#####################################################################################

=head2 Intern constant

=cut