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 686397 - user-accounts: Don't have domains twice in the drop down
user-accounts: Don't have domains twice in the drop down
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-10-18 16:45 UTC by Stef Walter
Modified: 2012-10-19 08:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
user-accounts: Don't have domains twice in the drop down (2.47 KB, patch)
2012-10-18 16:45 UTC, Stef Walter
committed Details | Review

Description Stef Walter 2012-10-18 16:45:04 UTC
If we discover domains again, don't add them twice to the drop
down and confuse the user. This is especially important if we 
receive two realms from realmd for the same domain for use with
different clients (ie: sssd/winbind). We only want to offer the
first choice, which is the one realmd indicated as preferred.

We may already have a domain listed in the drop down, and then it
gets discovered again (via typing).
Comment 1 Stef Walter 2012-10-18 16:45:06 UTC
Created attachment 226753 [details] [review]
user-accounts: Don't have domains twice in the drop down

If we discover domains again, don't add them twice to the drop
down and confuse the user. This is especially important if we
receive two realms from realmd for the same domain for use with
different clients (ie: sssd/winbind). We only want to offer the
first choice
Comment 2 Bastien Nocera 2012-10-19 08:20:15 UTC
Hello vim user.
Comment 3 Bastien Nocera 2012-10-19 08:21:57 UTC
Review of attachment 226753 [details] [review]:

Looks good apart from the while loop.

::: panels/user-accounts/um-account-dialog.c
@@ +347,3 @@
+         */
+
+        model = GTK_TREE_MODEL (self->enterprise_realms);

I prefer:
ret = gtk_tree_model_get_iter_first (model, &iter);
while (ret) {
 [do things]
 ret = gtk_tree_model_iter_next (model, &iter);
}
Comment 4 Stef Walter 2012-10-19 08:49:19 UTC
Reworked the while loop as requested. Fixed g_debug() statements so they
match what's going on.

Attachment 226753 [details] pushed as 48ae461 - user-accounts: Don't have domains twice in the drop down