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 737665 - Disable the remove button for locked accounts
Disable the remove button for locked accounts
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Online Accounts
git master
Other All
: Normal normal
: ---
Assigned To: GNOME Online Accounts maintainer(s)
Control-Center Maintainers
Depends on: 737656
Blocks:
 
 
Reported: 2014-09-30 14:50 UTC by Debarshi Ray
Modified: 2015-04-13 12:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
online-accounts: Disable the remove button for locked accounts (1.89 KB, patch)
2014-09-30 14:52 UTC, Debarshi Ray
committed Details | Review
online-accounts: Disable the remove button for locked accounts (1.83 KB, patch)
2015-04-13 12:19 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2014-09-30 14:50:10 UTC
See bug 737656 for what a locked account is.

Currently, trying to remove such an account will end up in an error message being shown in a popup dialog. Instead we can do a little better by simply disable the remove button.
Comment 1 Debarshi Ray 2014-09-30 14:52:49 UTC
Created attachment 287457 [details] [review]
online-accounts: Disable the remove button for locked accounts
Comment 2 Bastien Nocera 2015-04-10 18:15:19 UTC
Review of attachment 287457 [details] [review]:

Looks good for master and gnome-3-14.

::: panels/online-accounts/cc-online-accounts-panel.c
@@ +588,3 @@
+
+      account = goa_object_peek_account (object);
+      is_locked = goa_account_get_is_locked (account);

Seeing as you don't do any retval checks on goa_object_peek_account, you could shorten this to:
is_locked = goa_account_get_is_locked (goa_object_peek_account (object));
Comment 3 Debarshi Ray 2015-04-13 12:19:24 UTC
Created attachment 301453 [details] [review]
online-accounts: Disable the remove button for locked accounts

Pushed after addressing Bastien's comment.
Comment 4 Debarshi Ray 2015-04-13 12:26:42 UTC
(In reply to Bastien Nocera from comment #2)
> Review of attachment 287457 [details] [review] [review]:
> 
> Looks good for master and gnome-3-14.

I held back from pushing to gnome-3-14 because the corresponding gnome-online-accounts property was only added in 3.15.1. It is easy to back port it, but the API freeze is in place and I don't know if FleetCommander is currently using it or not.

Up to you.