Bug 144837

Summary: kdeprint option -P selects wrong printer
Product: [Applications] kdeprint Reporter: Jörg Habenicht <j.habenicht>
Component: generalAssignee: KDEPrint Devel Mailinglist <kde-print-devel>
Status: CLOSED WORKSFORME    
Severity: normal CC: jlayt
Priority: NOR    
Version: 0.0.1   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:

Description Jörg Habenicht 2007-04-29 22:30:52 UTC
Version:           0.0.1 (using KDE KDE 3.5.5)
Installed from:    Gentoo Packages
Compiler:          gcc version 4.1.1 (Gentoo 4.1.1-r3) Target: i686-pc-linux-gnu, Thread model: posix
OS:                Linux

Setup:
My print jobs are served by a printserver running CUPS.
A query at the server gives 3 printer (correct): printer1 printer2 printer3.
With the printer setup (KDE control module), I do define 2 special settings for printer 1: printer1/eco and printer1/highres.
Now all 5 appear in the printer dialog of the "kprinter" application (correct):
printer
Name: 
   printer1
     - eco
     - highres
   printer2
   printer3

All correct so far.

Now I start 'kprinter -P "printer1/eco"' and printer2 appears (BUG!)
Or I do start 'kprinter -P printer3' and printer1/highres appears (BUG!)

It seems, the parsed name from the -P argument is mismatched with the listentry in the printing dialog. Same for argument "-d"


I need this option (-P) to select a special printer with xsane. Can you solve this?

regards 
Jörg
Comment 1 Jörg Habenicht 2007-04-30 23:06:04 UTC
Update: I reviewed the code, and maybe the bug is somewhere in 
kdelibs/kdeprint/kprintdialog.cpp:KPrintDialog::initialize(...)
around line 570 to 600 ?
I think over there the preset printername gets evaluated and compared against the printer list. Maybe some mismatch happens there?

regards
Jörg
Comment 2 Camilla Boemann 2007-05-21 21:40:44 UTC
Hmm I've just tried the same setup and it Works For Me

I'll close the bug now, but please if you find anything more specific I'll be glad to fix it.
Comment 3 John Layt 2008-12-31 20:48:36 UTC
Closing old Resolved status bug.