Skip to content
June 2, 2010 / dantti

print(“improvements”)

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 :P

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 :D

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 :D

System Settings Module

Supply Levels

Print Queue

System Preferences

Chosing a PPD driver

Configure Printer Settings

Permissions

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)

About these ads

31 Comments

Leave a Comment
  1. Socceroos / Jun 2 2010 20:48

    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?

    • dantti / Jun 2 2010 21:17

      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.

      • Socceroos / Jun 2 2010 22:22

        Fair enough. =)

        I love the work you’re doing, btw!

  2. martinsandsmark / Jun 2 2010 22:48

    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. :-P

    • dantti / Jun 2 2010 23:01

      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.

      • Luca Beltrame / Jun 3 2010 04:05

        You could, however, put it in extragear and then move it to the main modules for 4.6.

      • dantti / Jun 3 2010 11:49

        Well I can see what people prefer, but I prefer to do that after I finish it.

      • Markus / Jun 3 2010 22:08

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

      • dantti / Jun 3 2010 23:04

        hmm right, then I’ll try to finish the Add Printer for that time.
        Best.

  3. Felix / Jun 3 2010 03:54

    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 …

    • dantti / Jun 3 2010 11:47

      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.

      • BajK / Nov 26 2010 05:07

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

      • dantti / Nov 26 2010 09:38

        For defining the default one? If so that could be better indeed :)

  4. zayed / Jun 3 2010 04:10

    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.

    • dantti / Jun 3 2010 11:52

      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.

  5. ruthnoakes / Jun 3 2010 18:16

    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!

  6. Markus / Jun 3 2010 22:09

    Why does “Resume printer” have an icon, but “Resume” (job) not?

    • dantti / Jun 3 2010 23:06

      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 :D

  7. sandeep / Jun 8 2010 04:37

    Great !!
    Please do create an Ubuntu PPA, so those of us who are willing to install it and test, can do so.

    Thanks!

  8. 2print.ca / Jun 27 2010 13:13

    Ubuntu PPA will be great

    • dantti / Jun 28 2010 09:48

      sorry but I don’t know how to create that and I also don’t have the time.

  9. BajK / Nov 26 2010 05:11

    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 :)

    • dantti / Nov 26 2010 09:39

      Hehe thanks, and yes it should work with any theme, I’m just changing the palette colors :)

  10. Niels Ole Salscheider / Jan 28 2011 13:52

    Will this be in KDE SC 4.7?

    • dantti / Apr 17 2011 01:19

      If someone is willing to help it being finish it might be.

      • BajK / Sep 24 2011 15:36

        Hmm, just cloning it from git right now, let me have a look :)

  11. beojan / Nov 7 2011 15:42

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

    • dantti / Nov 7 2011 15:45

      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

      • beojan / Nov 7 2011 16:49

        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

Trackbacks

  1. Ancora niente Printer Manager in KDE SC 4.5 | pollycoke :)
  2. Printer Manager per KDE SC 4.5 non ci sarà « Moros' Blog

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: