GNOME Bugzilla – Bug 709774
datetime: Fix incorrect sensitivity when permission is missing
Last modified: 2015-07-10 15:17:08 UTC
.
Created attachment 256854 [details] [review] datetime: Fix incorrect sensitivity when permission is missing When the permission is missing, we shouldn't make the rows sensitive.
Created attachment 256866 [details] [review] datetime: Fix incorrect sensitivity when permission is missing When the permission is missing, we shouldn't make the rows sensitive.
This was probably coded that way in order to keep the panel working with broken installations, where /usr/share/polkit-1/org.gnome.controlcenter.datetime.policy is missing. Not sure if we should support that case or not; the broken installation can happen for instance when gnome-control-center isn't installed systemwide and someone builds it to a private prefix with jhbuild. The current behaviour is to keep the buttons sensitive when the policy file is missing, and rely on the policykit dialogs popping up when the user clicks on one of the buttons. If we want to get rid of that logic, I think instead of making the rows insensitive, it would be better to fail early in the panel's constructor (and kill the NULL checks in the rest of the code). Making the rows insensitive just makes the panel look broken.
Review of attachment 256866 [details] [review]: ::: panels/datetime/cc-datetime-panel.c @@ +931,2 @@ active = g_value_get_boolean (source_value); + allowed = (priv->permission != NULL && g_permission_get_allowed (priv->permission)); There's another one of these NULL permission checks in on_permission_changed, can you update that one too to match?
Created attachment 307230 [details] [review] datetime: Fix incorrect sensitivity when permission is missing When the permission is missing, we shouldn't make the rows sensitive.
Attachment 307230 [details] pushed as ac59708 - datetime: Fix incorrect sensitivity when permission is missing