Say Hello to our must have new plasmoid

No, Apper is not winning a plasmoid (I still see no use for that) 😛

It has been almost two years since I last touched print-manager, probably a few bug fixes but nothing big. The main reason was that when I reached the part where we add new printers I saw that it was very hard to do it like system-config-printer does, the reason is that it has a bunch of tricks to find the best driver for your printer. The ideal world would be taking the system-config-printer python code that has the smartness and put it into a C shared lib, this would be great since anyone willing to write this kind of software could use it just as we use the CUPS library which is also written in C.

I asked a bunch of people to help me on this task since it’s not a very easy task and demands time which I don’t have. I think two persons tried to help me but also due to my complex threaded code they got scared, so last week I had an idea what about making a plasmoid!? Yes, this could not only make print-manager super cool, but also could call some attention to someone willing to take the above task 😛

So to start, print-manager was my first application I’ve made to use threads communicating by Qt queued’s calls, which make it much easier to code, the original code was really a mess since I didn’t knew CUPS nor Qt queued invocation. Thanks to this I was able to do a nice threaded code on my commercial Qt app. so as I learned some better ways to do this threaded thing I decide to improve this code first.

The code is much easier to read, basically you have a CUPS thread running it’s own event loop and all the requests you do to CUPS move to that thread process and return to the GUI thread, very simple.

I’ve never touched Plasma API nor it’s QML components, I tried to build a photo management application in QML and end up giving up to use QWidget at least until QML fits well on desktop, but for simple applications like a plasmoid it fits perfectly, in short it was not very easy to export the CUPS data through Plasma::DataEngine and QML is also a bit trick when lay outing items so tanks: sreich, aseigo and notmart 😀 who gave me a hand to figure out what was wrong…

So check it out the cool print plasmoid:

Jobs Actions
The actions each job might have (hovering one of the buttons)
Jobs Printers
When hovering a printer it's jobs get hightlighted

As you can see the jobs with the plasmoid is pretty much done, pause/resume printer works, canceling/holding/releasing a job too. Drag and Drop is not possible yet, I have to stufy how QML handle this (if it does), so that you would be able to drag a job from on printer and drop on another…

Code is here: git://  please if you can help 😀 no printer is needed for testing (I myself don’t have one) though I’ll need one to test the plug and add new printer…

Anyways Enjoy 😀

Say Hello to our must have new plasmoid

40 thoughts on “Say Hello to our must have new plasmoid

  1. eliasp says:

    There was always one thing which somehow felt non KDE-ish – the print-monitor.
    This plasmoid looks now absolutely beautiful! Thanks for your work!

    I hope to see this integrated into 4.9.

    1. dantti says:

      No, not the plasmoid, I don’t know it Plasma.ListView will support this automatically in future, if not maybe I’ll try to add support for this.

  2. lhugs says:

    Looks very nice. However, I feel that the right side looks a bit clutteredl It’s quite subjective, but I think it’s the part that could need some fine-tuning.

  3. Peter says:

    what I really miss from kde3 days is the application “kprinter”, with its possibility to print with multiple-page layouts to pdf (via ps filters), and call it from other applications which allow ps/image output (like openoffice).

    1. dantti says:

      Well this isn’t going to fix that, print-manager manage printers and it’s jobs, the print dialog is another component not included in this.

  4. I just installed it. It looks very well. A few points:
    1) It wastes too much space. I’ve got one printer installed but it takes space for ~4 printers.

    2) It should follow the plasma guidelines: whe its sitting in system tray, it should be hidden, until there’s some job.

    Thanks for this work. It already looks and works very good.

    1. dantti says:

      It’s Work In Progress, it will hide when you don’t have jobs, and I’m planing to expand the jobs list and only show one printer when you actually have just one.

  5. isemenov says:

    Freaaaking awesome! The less Python the better. Consistency betweeen various “system” plasmoids comes as a free bonus 😉 (see you based the design on the network manager, nice!)

    Now all we need is a new KMix and probably a Bluetooth plasmoid 🙂

    1. dantti says:

      Yes, I’ve been thinking a lot on making KMix replace pulse audio volume control but it’s code is quite old and has to work with different sound systems, but sure both do need a plasmoid…

    1. dantti says:

      easy, one is this plasmoid, the other is print-manager old systray icon, and the other is printer-applet (system-config-printer)

  6. BajK says:

    Awesome! But configuring printers would still be in systemsettimgs?
    I think you could get inspired by recent Network Management plasmoid, i.e. add a button “Configure” to invoke kcmshell printers and hide the printer panel if there is just one, or so.

    1. dantti says:

      Yes, more advanced things will be in system settings (maybe double click on the printer launch the configure printer dialog), I’m not sure about adding more buttons tho..

  7. Great Job!!!
    I like it. I will wait for final realise (I hope kde 4.9). It is one of few think that I still miss in kde. I could test and give some feedback but only by e-mail, or telepathy 😛
    I am downloading and test it right away…

  8. how to compile it???
    I’ve got:

    danielo@danielos:~/pobrane_Firefox/print-manager$ ls
    add-printer cmake CMakeLists.txt libqcups plasmoid-package printd printer-manager-kcm printmanager-dataengine printqueue README

    but I do not know what to do with it?

    1. dantti says:

      make sure you have cups-dev packages installed then:
      mkdir build
      cd build
      cmake .. -DCMAKE_INSTALL_PREFIX=/usr
      sudo make install

  9. ok. I’ve compiled
    at first I have very litle list of printers detected from cups.
    And a HUGE I think list of tasks to print. I cant change it.
    I’ve added that plasmoid to the taskbar. It is set To automaticaly. I dont print anything and an icon is all the time visible (it should be autohided, and show up only while printing… I think so)

    Its all now. When I will see I will write. Would you like to give me an email for feedback?

    1. dantti says:

      I’ve added the autohide thing but it weirdly become part of the list of hidden icon (the whole plasmoid not just the icon). my email is on the sources..

  10. marco says:

    On #kde-i18l told me that you didn’t made the structure to provide translation.
    When you will be ready just answer to this message 🙂

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