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:
The actions each job might have (hovering one of the buttons)
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 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…