Re: Causing systemUIServer to update the User Menu for Fast User Switching.
Re: Causing systemUIServer to update the User Menu for Fast User Switching.
- Subject: Re: Causing systemUIServer to update the User Menu for Fast User Switching.
- From: Ken Andrews <email@hidden>
- Date: Fri, 26 Sep 2008 12:06:23 -0400
- Thread-topic: Causing systemUIServer to update the User Menu for Fast User Switching.
This turned out to be pretty simple.
I just needed to send out either com.apple.UserWasRemovedNotification or
com.apple.UserWasAddedNotification and the switch screenname list gets
updated.
E.g.
// We need to send the standard OS notification so that the switch
screen name list will be updated
[[NSDistributedNotificationCenter defaultCenter]
postNotificationName:@"com.apple.UserWasRemovedNotification"
object:nil
userInfo:nil];
Ken
On 9/25/08 2:49 PM, "Ken Andrews" <email@hidden> wrote:
> I¹ve got an app that creates users via dscl. The users get created and
> themselves are set up fine.
> The problem I have is that the list of users in the fast user switching menu
> does not get updated.
> Using the login screen works fine. The user is there just not in the fast
> user switch pull down.
>
> I can make it update by restarting systemUIServer but that is not something I
> want to do.
> If I add users from the system prefs they are immediately added to the user
> list so there must be some method to get the list to update.
> I send all the same notifications that system prefs sends but they do not seem
> to help.
> One thing that I did notice was in
> SystemUIServer/Content/Resources/Autoload.plist
> <array>
> <dict>
> <key>id</key>
> <integer>-10014</integer>
> <key>method</key>
> <string>_userCanLoad</string>
> <key>path</key>
> <string>/System/Library/CoreServices/Menu Extras/User.menu</string>
> </dict>
>
> This makes me think that there is some simple way to tell the ui server to
> update just the user list.
>
> Anyone have an idea of what it is?
>
> Thanks,
> Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden