GNOME Bugzilla – Bug 764620
Should offer an option to clean printer heads
Last modified: 2017-03-23 13:44:11 UTC
I believe system-config-printer supports this, but it's not exposed to the control center. It actually looks like it was supported in the control center and then removed between commit 8444b2e38aa1187384e45071925bd3cedf8e0239 and 88562eba2df1debe486f9cff5173231c0502ed1b. It would be great to have this feature back when the printer supports it, as there's otherwise no way to achieve this under Linux.
Felipe, we may be able to help with the implementation of this feature, if you (or someone else) can provide a bit of guidance on where it should live in the UI.
(In reply to Cosimo Cecchi from comment #1) > Felipe, we may be able to help with the implementation of this feature, if > you (or someone else) can provide a bit of guidance on where it should live > in the UI. That would be great. In the recent control-center redesign we are following the mockups at https://wiki.gnome.org/Design/SystemSettings/Printers#Guidelines I have a "working in progress" implementation of it living at https://git.gnome.org/browse/gnome-control-center/log/?h=wip/feborges/new-printers-panel We expect this code to land on 3.22. I would like to hear from Allan what are his opinions on it. Off the top of my mind, I would initally suggest listing it in the gear menu of each Printer entry https://raw.github.com/gnome-design-team/gnome-mockups/master/system-settings/printing/printers.png But, obviously, that's open for discussion.
Just a quick note for now that I'm more than happy to help with this from Endless's side as soon as we get some input from Allan on your suggestion of placing that option in the gear menu. In order to provide some additional info to help make the right decision, note that we might not want to show this option for every printer, but only for those where the CUPS driver explicitly supports this particular "maintenance command". For instance, neither my Canon MG4150 nor my Epson XP-412 support that command in the associated PPD file, while the Canon MG2400 apparently does (I don't have it, so I can't confirm though). See an excerpt of the PPD file below: *ModelName: "Canon MG2400 series" *NickName: "Canon MG2400 series Ver.4.00" *PCFileName: "CNMG2400.PPD" [...] *cupsFilter: "application/vnd.cups-postscript 0 pstocanonij" *cupsFilter: "application/vnd.cups-command 0 cmdtocanonij" *cupsCommand: "AutoConfigure Clean PrintSelfTestPage ReportStatus" [...] So, while I can see having this option in the gear menu only when available, I wonder whether perhaps its optional nature would suggest that we might want to place it somewhere else, perhaps inside the Printing Options dialog?
I just realized that I forgot to reflect here the results of the informal discussion this Monday on IRC, so here it is:: Basically, Allan, Felipe and me discussed on IRC what the best approach would be, and it seems we all agreed on that the gears menu (only showing the item if available) is the way to go. Here are the relevant bits from IRC, for reference: <msanchez> aday: morning. Any chance you could provide some feedback on this feature for the new printers panel? https://bugzilla.gnome.org/show_bug.cgi?id=764620 <msanchez> I know you're like über busy, so I'd understand if that was not possible in the short term <aday> msanchez: let me take a look <msanchez> thanks, much appreciated <aday> msanchez: doesn't seem too tricky from a design point of view... <msanchez> that's what I hoped. My main doubt is whether to place it on the gears menu, as feborges suggested, or in the printing options dialog <msanchez> that option might not be available for every single printer. It pretty much depends on the PPD file declaring the relevant CUPS command as being available <aday> msanchez: my initial thought was the gear menu. it's not really a print option <msanchez> aday: I see. And would you see it as a dynamic option (only shown when available) or would you rather favour having it always there and maybe dimmed if unavailable? <msanchez> sorry if my questions are a bit dumb. Design is not my strongest skill :) <aday> msanchez: i'd only show if available. otherwise users might think the feature is broken or something <feborges> msanchez, aday, another place to place it is on the Details dialog. The one where you can rename the printer, select the driver... <msanchez> feborges: agreed <msanchez> although tbh I'm now thinking that your initial proposal of the gear menu might work better <msanchez> our users struggle to find configuration options if we hide them too much, so the gears menu might probably be better in that regard <msanchez> feborges: I'd like to start taking a look to this this week if possible, any pointer or advice besides what's on the bug? <feborges> msanchez, I don't think so. You can ping me if you need something, also mkasik sometimes hangs around here... he's handing me the printer stuff on red hat... so he has way more experience <feborges> he will be reviewing my wip branch with the new printer panel <msanchez> nice, will let you know if I need more input then. Thanks <feborges> thank you!
Following up on the previous comment, I've been finally working on this yesterday and today and I believe I have something that might be in the right track, based on top of Felipe's wip/feborges/new-printers-panel branch. Take a look to it here: https://git.gnome.org/browse/gnome-control-center/log/?h=wip/msanchez/printers-clean-heads In summary, it containes the new menu item plus a new function pp_maintenance_command_is_supported() that can be used both from _pp_maintenance_command_execute_thread() and from pp-printer-entry.c to check when to show the new action to the user, as well as a fix in the logic that checks whether a CUPS maintenance command is available or now (so far it only checked the first from the list). I believe these last two things can be tracked in a separate bug, as they're pretty ortogonal, but I'd love to hear your feedback before going ahead. For now, it's everythng in my wip/msanchez/printers-clean-heads branch.
Just a quick heads-up on this, as it's been nearly a month since the last update: My understanding after talking to Felipe on IRC a few weeks ago is that the changes proposed seem to go in the right direction, but are still pending to be reviewed in depth. So, one thing I might be able to do in the meantime would be to file a bug to track the fix that I included in the branch separately, which I might be able to do this week already. If I can't, I'll do it after the 4th of June (I will be off on holidays next week), but in any case I'd love to hear if you have any comment/feedback in the meantime, so that I can finish everything up once I'm back. Thanks!
Created attachment 328487 [details] [review] printers: Expose the newly added 'Clean' maintenance command to users (In reply to Mario Sánchez Prada from comment #6) > Just a quick heads-up on this, as it's been nearly a month since the last > update: > > My understanding after talking to Felipe on IRC a few weeks ago is that the > changes proposed seem to go in the right direction, but are still pending to > be reviewed in depth. So, one thing I might be able to do in the meantime > would be to file a bug to track the fix that I included in the branch > separately, which I might be able to do this week already. I finally did it this morning: see the separate bug to track the issue with checking the list of CUPS maintenance commands here (which blocks this bug now): https://bugzilla.gnome.org/show_bug.cgi?id=766861 ...which is already ready for review too, so I'm now attaching here the only patch that would be needed on top of that one to get the "Clean Print Heads" button added to the printer panel. > If I can't, I'll do it after the 4th of June (I will be off on holidays next > week), but in any case I'd love to hear if you have any comment/feedback in > the meantime, so that I can finish everything up once I'm back. Everything should be ready now for review now via bug 766861 and this one, so please let me know what you think. Thanks!
Created attachment 329700 [details] [review] printers: Expose the newly added 'Clean' maintenance command to users Add an extra button "Clean Print Heads" that will be shown when the relevant maintenance command is available for a printer, to bring this feature back.
Just updated the patch proposed here according to the changes done for bug 766861, where I made async the new function to check a command's availability.
The patches for bug 766861 landed today so the patch here is just pending on Felipe's new-printer-panel to be merged to master.
Felipe: any news with regard to the new-printers-panel WIP branch?
(In reply to Mario Sánchez Prada from comment #11) > Felipe: any news with regard to the new-printers-panel WIP branch? We are in a stage of the cycle where this changes wouldn't make it for the release, so it was postponed. I will get some love to it asap.
Thanks for the quick feedback. Looking forward to seeing the new printers panel landing, let me know if there's anything else I can help with.
Hi Felipe, going through my TODO list I recalled about this. Any update on what the situation is at the moment? I'm happy to work on this if needs updating or anything else, but would love to see it integrated for the next release, if possible. Happy new year, btw :)
Review of attachment 329700 [details] [review]: Thanks. We just merged the UI changes in which your patch would apply on top. Could you please rebase it? ::: panels/printers/pp-printer-entry.c @@ +335,3 @@ + gpointer user_data) +{ + PpPrinterEntry *self = (PpPrinterEntry *) user_data; PP_PRINTER_ENTRY () @@ +341,3 @@ + if (pp_maintenance_command_is_supported_finish (command, res, &error)) + { + PpPrinterEntry *self = (PpPrinterEntry *) user_data; Should we show/hide or tweak the sensitivity of menu items? We change sensitivity for permission based actions.
Thanks for the heads-up, Felipe. I can't do this right now, but I'll rebase this later this week (tomorrow, ideally).
Created attachment 346059 [details] [review] Patch proposal A bit late (specially considering we just passed the freeze), but I could not do this before, sorry. See a new patch rebased against master attached, which also includes the following additional changes I realized of while doing this: * Reorganized check_clean_heads_maintenance_command_cb() to gracefully handle when the PpPrinterEntry object dies, which apparently can happen very often because of actualize_printers_list(), which is called every time a CUPS notification is received. * Added a 'parameters' property to PpMaintenanceCommand: required so that we can pass "all" to the "Clean" command, required as specified by CUPS in https://www.cups.org/doc/spec-command.html#Clean Please review, thanks!
Created attachment 346073 [details] [review] Patch proposal The previous attachment contained some stray bits in the UI file, please check this one instead
Review of attachment 346073 [details] [review]: Thank you for the patch. It looks good to me. Please ask for freeze break and push it to master if accepted.
Thanks for the feedback, Marek. About requesting a break, I'm not sure it makes sense to request a freeze for this feature, it's a nice-to-have but I can't see any good-enough reason to disturb the freeze other than getting it sooner. If it's ok to you, I'll push it right after the freeze is over.
Yes, it is ok with me. So lets get it into master once the 3.24 is branched.
The code freeze is over, so I've just landed this: https://git.gnome.org/browse/gnome-control-center/commit/?id=b74293697095124a331bbb106bc580fdd5567d44 Resolving as FIXED