GNOME Bugzilla – Bug 778599
'Add' button is sometimes sensitive when Printer service is disabled.
Last modified: 2018-02-05 13:21:36 UTC
The 'Add' button to add new printers may be sensitive even when cups (or some printer service) is not running. How to reproduce: 1. Disable printer service. 2. Now open gnome-control-center Printers panel It should now show "Sorry! The system printing service doesn't seem to be available" 3. click on 'Unlock' button -> Give password 4. Click back and open Printers panel again. Result: The 'Add' button is sensitive. Ideally if printing won't ever work if printing service is disabled, it shall be good to hide the 'Unlock' button itself. Thanks.
How do you disable the printer service and on which distribution? (systemctl disable cups.service and systemctl stop cups.service doesn't stop it here on Fedora)
(In reply to Marek Kašík from comment #1) > How do you disable the printer service and on which distribution? (systemctl > disable cups.service and systemctl stop cups.service doesn't stop it here on > Fedora) I'm on Debian Testing. I don't have any use of printers. So I just removed related packages (cups, system-config-printer, etc.). May be you can try that way. Or systemctl disable cups<tab><tab> might give more completions (other than cups.service), though I'm not sure. Thanks
Could you have a look at this Felipe?
Created attachment 346323 [details] [review] printers: Hide header buttons when there's no printer server There's no reason to "Unlock" the panel and/or "Add" a new printer if there's no printer server available. This patch sets the visibility of the "headerbar-buttons" based on whether the current visible stack page in the panel is the "no-cups-page".
Review of attachment 346323 [details] [review]: Hi Felipe, could you rebase the patch for current master and handle also hiding of search-button and block searching by typing?
Created attachment 352872 [details] [review] printers: Hide header buttons when there's no printer server There's no reason to "Unlock" the panel and/or "Add" a new printer if there's no printer server available. This patch sets the visibility of the "headerbar-buttons" based on whether the current visible stack page in the panel is the "no-cups-page".
Review of attachment 352872 [details] [review]: I've just tried to disable/enable cupsd and the buttons haven't shown up again :). (I renamed /usr/sbin/cupsd and stopped cups service to be specific)
(In reply to Marek Kašík from comment #7) > Review of attachment 352872 [details] [review] [review]: > > I've just tried to disable/enable cupsd and the buttons haven't shown up > again :). (I renamed /usr/sbin/cupsd and stopped cups service to be specific) heh, I lost the "update_sensitivity ()" call with the rebase. my bad.
Created attachment 352922 [details] [review] printers: Hide header buttons when there's no printer server There's no reason to "Unlock" the panel and/or "Add" a new printer if there's no printer server available. This patch sets the visibility of the "headerbar-buttons" based on whether the current visible stack page in the panel is the "no-cups-page".
Review of attachment 352922 [details] [review]: I'm sorry for the delay. The patch looks good to me.
Attachment 352922 [details] pushed as db9017b - printers: Hide header buttons when there's no printer server