After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 778599 - 'Add' button is sometimes sensitive when Printer service is disabled.
'Add' button is sometimes sensitive when Printer service is disabled.
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Printers
git master
Other Linux
: Normal normal
: ---
Assigned To: Felipe Borges
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-02-14 10:07 UTC by Mohammed Sadiq
Modified: 2018-02-05 13:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
printers: Hide header buttons when there's no printer server (2.97 KB, patch)
2017-02-21 13:33 UTC, Felipe Borges
none Details | Review
printers: Hide header buttons when there's no printer server (2.93 KB, patch)
2017-05-30 13:47 UTC, Felipe Borges
none Details | Review
printers: Hide header buttons when there's no printer server (3.12 KB, patch)
2017-05-31 08:12 UTC, Felipe Borges
committed Details | Review

Description Mohammed Sadiq 2017-02-14 10:07:14 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.
Comment 1 Marek Kašík 2017-02-14 10:13:24 UTC
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)
Comment 2 Mohammed Sadiq 2017-02-14 16:49:44 UTC
(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
Comment 3 Marek Kašík 2017-02-16 12:31:53 UTC
Could you have a look at this Felipe?
Comment 4 Felipe Borges 2017-02-21 13:33:58 UTC
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".
Comment 5 Marek Kašík 2017-05-30 12:58:36 UTC
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?
Comment 6 Felipe Borges 2017-05-30 13:47:36 UTC
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".
Comment 7 Marek Kašík 2017-05-30 14:10:21 UTC
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)
Comment 8 Felipe Borges 2017-05-31 08:12:28 UTC
(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.
Comment 9 Felipe Borges 2017-05-31 08:12:46 UTC
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".
Comment 10 Marek Kašík 2018-02-05 11:46:07 UTC
Review of attachment 352922 [details] [review]:

I'm sorry for the delay. The patch looks good to me.
Comment 11 Felipe Borges 2018-02-05 13:21:31 UTC
Attachment 352922 [details] pushed as db9017b - printers: Hide header buttons when there's no printer server