I was quite happy with print-manager progress as you can read on my last post, in about 3 weeks of work it looked like almost everything was done, so I started to create the Add Printer Assistant, and my first problem was: “I really need threads now”. My idea was to add threads support on KDE SC 4.6, till there we would have UI freezes but not so much… The problem was that the cups method to get new printers hangs for 30 seconds, so it’s not a short freeze anymore.
The pain of threads… My graduation project was an application called doKa that downloaded using threads, well it was a really nice project and working with threads there gave me lot’s of ground to start putting threads in printer-manager, but this time I had a really hard work :P. The problem is that when the authentication dialog comes up we need to do some event loop locking, as the thread needs to wait for the end of the dialog and the UI must only return when the user type it’s password. It worked when just one thing was done at time, but as the printers list has to be updated we got into a dead lock, all the calls to cups started a QEventLoop so we could call exit on it when the cups request was finished, but the first call to cups would only exit after the second call exited which never happens, even if we explicit called loop->exit(). Thiago Maciera helped a lot with some stuff I was doing wrong but after that the problem got intermittent 😛
I was almost giving up… I had lots of ideas and lots of ways of how not to do it! But finally I had the async idea that solved every thing, now each request returns a request object that emits finished when it’s done so no more locking with QEventLoops and no more dead locks 😀
Right, so now is just the Add Printers UI right?
Well yes, but no, Riddell invited me to go to UDS to talk about KPackageKit/aptcc and printer-manager stuff and being there one of the developers of the gnome printer applet showed to me what I’d need to do in the Add Printer UI which is not so simple stuff. There is lots of magic (logic) to find a good match to the printer driver, samba searches, queue searches… how to handle when a printer is plugged in. This was very important, since I was doing a simple http://localhost:631 replacement and then I saw that doing these things would be very important… So yes, no printer-manager in KDE SC 4.5.
But hey! Don’t be sad, today I and some oxygen friends made some UI improvements, and it’s looking really nice, pinheiro is also working on some more icons (fax, MFP…) so here you can see some progress, hopefully soon I’ll have the Add Printer doing some stuff, and maybe you distro can backport that 😀







You have made known to me the path of life; you will fill me with joy in your presence, with eternal pleasures at your right hand. Psalm 16:11 (NIV)
In the “Configure Printer Settings” photo, would it be better/possible to have the different sections like “Options Installed” and “General” put in to tabs of their own?
I’m just thinking that a big scroll list of knobs, buttons and switches can be a bit visually cluttering.
Then again, so is a whole lot of tabs across the top… What do you think?
Well, before UDS instead of group boxes we had a tab for each group, and the other problem was that we had lots of tabs, so I agreed that scrolling is easier than browsing lots of tabs.
Putting just a few groups in different tabs might not work in all cases since the group names can be localized which make us unable to match it.
best.
Fair enough. =)
I love the work you’re doing, btw!
I’m sorry if I misunderstood something, but can’t the advanced stuff of the print dialog just wait for a later release?
The way the web interface does it is more than adequate for most users, I would imagine, and would be a large step up from the exising stuff. 😛
Well it’s kind of possible to mix the two, but we are already too late for 4.5, and the current way of adding printer seems to work well for most user that I know.
You could, however, put it in extragear and then move it to the main modules for 4.6.
Well I can see what people prefer, but I prefer to do that after I finish it.
“we are already too late for 4.5”
No, you’re not. It’s only too late to be part of the SC 4.5. An Extragear release at the same day as SC 4.5 is absolutely possible.
hmm right, then I’ll try to finish the Add Printer for that time.
Best.
I think the deafult prinbter should be done by a star emblem and not by a checkbox in the printer details. This way one can immideatily see which is the default printer …
You can see if it’s the default by looking at the left list which has your printer name as bold, the check box is there so you can make it the default if it’s not.
I think having the name bold is okay but a star or another emblem directly at the icon would be much more intuitive 🙂
For defining the default one? If so that could be better indeed 🙂
Thank you for your effort and your time. In Choosing a PPD driver dialog, Is it possible to list driver by the printer’s company? I mean if the correct driver can’t be chose automatically (You may see fedora printer project for that), the dialog display input box for the company and another for printer model.
Yes, it’s possible, the “line edit” which is actually a comboBox, allows you to type any text to search for you printer, but if you want to list all from Samsung for example just click on the right arrow and the manufacturers list will drop down. It’l really easy to use but the screen shot doesn’t tell you that.
This is a really nicely written and useful blog, I’ve had all kinds of printer problems before.
Also am new to wordpress, so hi!
Why does “Resume printer” have an icon, but “Resume” (job) not?
I could not find an icon for that button so I’m waiting for Nuno to create an oxygen icon. He’s now working on a Multi-Function Printer icon, can’t wait to see it 😀
[…] 4.5, in uscita tra relativamente poco, doveva essere il nuovo Printer Manager, ma purtroppo Daniel Nicoletti ha annunciato – in maniera piuttosto disarmante – che nonostante siano stati fatti […]
[…] dovuto avere Printer-Manager sviluppato dall’italiano Daniel Nicoletti, ma come riportato da lui, da Pollycoke e sul Feature Plan di Kde, il progetto è ancora Work in […]
Great !!
Please do create an Ubuntu PPA, so those of us who are willing to install it and test, can do so.
Thanks!
Ubuntu PPA will be great
sorry but I don’t know how to create that and I also don’t have the time.
My question is: Do the colored ink fill status bars work with other themes than oxygen, i.e. is there a natural way/property of coloring the bar without a hack or so? I am using QtCurve, and I hope the bars won’t stay all blue with it. But really really nice work. You (with the great new kpackagekit and this pronter dialog) are the reason my mum and a friend of mine love their kde so much 🙂 can’t wait presenting them 4.6 🙂
Hehe thanks, and yes it should work with any theme, I’m just changing the palette colors 🙂
Will this be in KDE SC 4.7?
If someone is willing to help it being finish it might be.
Hmm, just cloning it from git right now, let me have a look 🙂
The print queue and add printer dialog appear in the Oxygen style, even though I use bespin. Is it possible to change this.
It`s been a while I don`t test this much, but I believe maybe the way to call them is doing something wrong but I`m not sure, print-manager does not enforce Oxygen or any other style
If I start /usr/lib/kde4/libexec/print-queue from konsole before pressing Open Print Queue, the style works correctly, however, if I then close that window
– Running ps aux | grep print shows print-queue is not running
– Pressing Open Print Queue again give a window using the Oxygen style
Hence, I think if add-printer and print-queue were to be started at startup, and made not to quit when the window is closed, the style problem may be solved