GNOME Bugzilla – Bug 704426
doesn't select the newly-created user
Last modified: 2013-07-30 12:56:58 UTC
after creating a user, it's not being selected in the left panel.
Created attachment 249449 [details] [review] proposed patch proposed patch, it would be nice to have it on gnome-3-8 as well.
Review of attachment 249449 [details] [review]: It looks good to me, so please commit to the both branches.
pushed, thanks.
turns out sometimes it still doesn't work, because we're getting almost empty 'User' objects after calling act_user_manager_create_user_finish(): (gdb) p *user $5 = {parent = {g_type_instance = {g_class = 0x12afb50}, ref_count = 2, qdata = 0x0}, connection = 0xf55e60, accounts_proxy = 0x18290b0, object_proxy = 0x18001c0, get_all_call = 0x0, object_path = 0x1811810 "/org/freedesktop/Accounts/User1003", uid = 0, user_name = 0x0, real_name = 0x0, password_hint = 0x0, home_dir = 0x0, shell = 0x0, email = 0x0, location = 0x0, icon_file = 0x0, language = 0x0, x_session = 0x0, our_sessions = 0x0, other_sessions = 0x0, login_frequency = 0, login_time = 0, login_history = 0x0, account_type = ACT_USER_ACCOUNT_TYPE_STANDARD, password_mode = ACT_USER_PASSWORD_MODE_REGULAR, uid_set = 0, is_loaded = 0, locked = 0, automatic_login = 0, system_account = 0, local_account = 1, nonexistent = 0} because the User object is filled asynchronously by accountsservice library. so, with all those fields empty, any comparison with uid aor anything fails. as a complement to the previous patch, I'm adding a new one, which connects to the 'is-loaded' signal of the User object. At this point the object is full loaded and thus it's safe to return it to the caller.
Created attachment 250388 [details] [review] proposed patch
Created attachment 250390 [details] [review] proposed patch, for 3.8 branch
Review of attachment 250388 [details] [review]: That's fine as a bug fix, but I would really rather the libaccountsservice didn't tell us it's really finished until is-loaded was emitted on the service side. So please file an upstream accountsservice bug as well and mention it in the commit message. ::: panels/user-accounts/um-account-dialog.c @@ +203,3 @@ + password = gtk_entry_get_text (GTK_ENTRY (self->local_password)); + act_user_set_password_mode (user, self->local_password_mode); + if (self->local_password_mode == ACT_USER_PASSWORD_MODE_REGULAR) { Remove braces for one-line conditionals.
Review of attachment 250390 [details] [review]: Same comment as for the master patch.
thanks, Bastien. I had filled a bug there, yesterday: https://bugs.freedesktop.org/show_bug.cgi?id=67483 But I was told, until some refactoring is done, this is the way to go. Feel free to comment there as well, the bug is RESOLVED INVALID btw.