Skip to content
February 22, 2012 / dantti

Say Hello to our must have new plasmoid

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

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

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 :D 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://anongit.kde.org/print-manager  please if you can help :D 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 :D

About these ads

40 Comments

Leave a Comment
  1. eliasp / Feb 22 2012 01:31

    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.

  2. Blackpaw / Feb 22 2012 02:56

    Does it support a keyboard interface?

    • dantti / Feb 22 2012 07:29

      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.

  3. Znurre / Feb 22 2012 03:23

    WOW! This looks awesome, great job.

  4. igore / Feb 22 2012 03:44

    wow, i’ve got a boner.

  5. lhugs / Feb 22 2012 04:13

    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.

  6. Peter / Feb 22 2012 04:44

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

    • dantti / Feb 22 2012 07:27

      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.

  7. emilsedgh / Feb 22 2012 04:47

    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.

    • dantti / Feb 22 2012 07:26

      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.

  8. Florian Reinhard / Feb 22 2012 05:02

    Finally someone who gives some love to printing in KDE, thank you!

  9. isemenov / Feb 22 2012 05:09

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

    • dantti / Feb 22 2012 07:23

      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…

    • Luca Beltrame / Feb 22 2012 07:48

      @isemenov Python is OK, but not the current shape (IMO) of system-config-printer-kde.

  10. Vishesh Handa / Feb 22 2012 05:26

    How come there are 3 printer icons on your taskbar?

    • dantti / Feb 22 2012 07:22

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

  11. ianjo / Feb 22 2012 05:41

    Very cool!

  12. BajK / Feb 22 2012 06:20

    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.

    • Skovoroda Nikita / Feb 22 2012 06:38

      hide the printer panel if there is just one, or so.

      The suspend/resume printer buttons should still be displayed, even if there is only one printer.

      • dantti / Feb 22 2012 07:19

        Sure, I’m planning to do so

    • dantti / Feb 22 2012 07:21

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

  13. Skovoroda Nikita / Feb 22 2012 06:28

    Yes! At last! :-)

    This will help a lot, my mother, for example, had troubles resuming a paused (because of cups/drivers/hardware) printer.

  14. Skovoroda Nikita / Feb 22 2012 06:30

    Does it work with 4.8?
    Will it be included in 4.9?

    • dantti / Feb 22 2012 07:20

      Yes, I run this on KDE 4.8, hopefully it will be included in 4.9

  15. Diederik v/d Boor (@vdboor) / Feb 22 2012 06:43

    Oh My F* God! :-O This Is Awesome! :-D

  16. anonymous / Feb 22 2012 08:33

    Awesome! I hope it gets polished and packaged for spring distro releases.

  17. masterdany88 / Feb 22 2012 16:02

    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 :P
    I am downloading and test it right away…

  18. masterdany88 / Feb 22 2012 16:48

    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?

    • dantti / Feb 22 2012 16:58

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

  19. masterdany88 / Feb 22 2012 18:54

    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?

    • dantti / Feb 22 2012 19:03

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

  20. marco / Feb 23 2012 07:03

    Hey dantti do you need an italian translator ?:)

    • dantti / Feb 23 2012 07:43

      Translations are all handled in KDE so you can join the Italian team and say you want translate print-manager :D

  21. marco / Feb 23 2012 14:57

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

    • dantti / Feb 23 2012 15:01

      I think they are wrong, I even get translations on my .desktop files…

  22. ericthefish / Feb 25 2012 07:02

    Really nice work!

  23. lars / Feb 25 2012 11:27

    Hey! Can you tell me what plasma theme and font are you using? They look really great.

    • dantti / Feb 25 2012 12:16

      Oxygen stock one…

Trackbacks

  1. PING #08: Mozilla, Ubuntu One, Kate, Debian, openSUSE, SystemRescueCd, Cinnamon...
  2. print-manager updates in KDE 4.11 | Dantti's 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: