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 😀

System Settings Module
Supply Levels
Print Queue
System Preferences
Chosing a PPD driver
Configure Printer Settings

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)


31 thoughts on “print(“improvements”)

  1. 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?

    1. dantti says:

      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.

  2. 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. 😛

    1. dantti says:

      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.

      1. Markus says:

        “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.

  3. Felix says:

    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 …

    1. dantti says:

      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.

      1. BajK says:

        I think having the name bold is okay but a star or another emblem directly at the icon would be much more intuitive 🙂

  4. 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.

    1. dantti says:

      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.

    1. dantti says:

      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 😀

  5. BajK says:

    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 🙂

  6. beojan says:

    The print queue and add printer dialog appear in the Oxygen style, even though I use bespin. Is it possible to change this.

    1. dantti says:

      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

      1. beojan says:

        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

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s