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 672265 - userMenu: Consider account-validity for sensitivity
userMenu: Consider account-validity for sensitivity
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-03-16 22:06 UTC by Florian Müllner
Modified: 2012-03-17 16:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
userMenu: Consider account-validity for sensitivity (1.70 KB, patch)
2012-03-16 22:06 UTC, Florian Müllner
reviewed Details | Review
userMenu: Consider account-validity for sensitivity (1.34 KB, patch)
2012-03-17 00:30 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2012-03-16 22:06:28 UTC
See patch - should be simple enough to be considered for 3.4, and should fix the case where the status chooser in the user menu stays insensitive after creating the first valid account.
Comment 1 Florian Müllner 2012-03-16 22:06:33 UTC
Created attachment 209965 [details] [review]
userMenu: Consider account-validity for sensitivity

We currently only update the status chooser's sensitivity if accounts
are added, removed or enabled; unfortunately during account creation,
the account may become enabled before it is actually valid, so the
status chooser remains insensitive. Fix by listening to validity changes
as well.
Comment 2 Rui Matos 2012-03-17 00:25:01 UTC
Review of attachment 209965 [details] [review]:

::: js/ui/userMenu.js
@@ +288,3 @@
     _IMAccountsChanged: function(mgr) {
         let accounts = mgr.get_valid_accounts().filter(function(account) {
+            return account.valid && account.enabled;

Isn't the account manager returning only valid accounts already? i.e. wasn't the condition OK as it was?
Comment 3 Florian Müllner 2012-03-17 00:30:07 UTC
Created attachment 209971 [details] [review]
userMenu: Consider account-validity for sensitivity

(In reply to comment #2)
> Isn't the account manager returning only valid accounts already? i.e. wasn't
> the condition OK as it was?

Yeah, you're right - fixed.
Comment 4 Rui Matos 2012-03-17 16:10:33 UTC
Review of attachment 209971 [details] [review]:

Looks fine. I'm not able to test this today, so if it fixes the problem for you, go ahead and push.
Comment 5 Florian Müllner 2012-03-17 16:43:33 UTC
Attachment 209971 [details] pushed as cf0b6dd - userMenu: Consider account-validity for sensitivity