Merge lp://staging/~amigadave/gnome-control-center-signon/switch-mockup into lp://staging/gnome-control-center-signon
Proposed by
David King
Status: | Merged |
---|---|
Approved by: | Alberto Mardegan |
Approved revision: | 143 |
Merged at revision: | 134 |
Proposed branch: | lp://staging/~amigadave/gnome-control-center-signon/switch-mockup |
Merge into: | lp://staging/gnome-control-center-signon |
Diff against target: |
294 lines (+173/-28) 3 files modified
src/cc-credentials-account-applications-model.vala (+5/-1) src/cc-credentials-account-details-page.vala (+151/-23) src/cc-credentials-accounts-model.vala (+17/-4) |
To merge this branch: | bzr merge lp://staging/~amigadave/gnome-control-center-signon/switch-mockup |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alberto Mardegan (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email: mp+147624@code.staging.launchpad.net |
Commit message
Add switches to toggle the enabled state for application (really services)
Description of the change
Add switches to toggle the enabled state for application (really services)
* Add a non-functional switch to each application row
* Add an empty application switch activated handler
* Implement application service switch handler
* Use asynchronous store methods in AccountDetailsPage
* Avoid storing the account when a store is in progress
* Avoid unnecessarily changing the account enabled state in the UI
To post a comment you must log in.
I will test the functionality soon. Meanwhile, I have a couple of suggestions about the code, which shouldn't affect the functionality.
73 + // Fetch current state from service. account. select_ service (service); account. get_enabled (); account. select_ service (null); set_data ("switch", app_switch); enabled. connect (on_app_ account_ service_ enabled) ;
74 + current_
75 + app_switch.active = current_
76 + current_
77 +
78 + acc_service.
79 + acc_service.
This code (as well as on_app_ account_ service_ enabled( )), fits better inside the AccountApplicat ionSwitch class (maybe in the constructor).
246 + // Ignore service-level changes. code.google. com/p/accounts- sso/issues/ detail? id=157
247 + // FIXME: http://
248 + if (service != "global")
249 + {
250 + return;
251 + }
Check the indentation (it appears correct here, but see the diff below). Also, in order to continue working when the libaccounts-glib issue is fixed, add a check for "null" as well.