diff options
author | fpeters <fpeters@4ee84921-47dd-4033-b63a-18d7a039a3e4> | 2008-08-21 02:51:17 +0800 |
---|---|---|
committer | fpeters <fpeters@4ee84921-47dd-4033-b63a-18d7a039a3e4> | 2008-08-21 02:51:17 +0800 |
commit | 0449213ff3655b4e56bf01022c25e634c4a3a24f (patch) | |
tree | 44c4d3732978e88ef3249e64faed7a26c6b787b0 | |
parent | 28b66addd85eeed031f7bf94337fb3d6d6c2dce9 (diff) | |
download | gsoc2013-empathy-0449213ff3655b4e56bf01022c25e634c4a3a24f.tar gsoc2013-empathy-0449213ff3655b4e56bf01022c25e634c4a3a24f.tar.gz gsoc2013-empathy-0449213ff3655b4e56bf01022c25e634c4a3a24f.tar.bz2 gsoc2013-empathy-0449213ff3655b4e56bf01022c25e634c4a3a24f.tar.lz gsoc2013-empathy-0449213ff3655b4e56bf01022c25e634c4a3a24f.tar.xz gsoc2013-empathy-0449213ff3655b4e56bf01022c25e634c4a3a24f.tar.zst gsoc2013-empathy-0449213ff3655b4e56bf01022c25e634c4a3a24f.zip |
don't list profiles twice. (closes: #548578)
git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1364 4ee84921-47dd-4033-b63a-18d7a039a3e4
-rw-r--r-- | libempathy-gtk/empathy-profile-chooser.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-profile-chooser.c b/libempathy-gtk/empathy-profile-chooser.c index 578bd2a4e..fd68dd8b0 100644 --- a/libempathy-gtk/empathy-profile-chooser.c +++ b/libempathy-gtk/empathy-profile-chooser.c @@ -118,7 +118,7 @@ profile_chooser_sort_func (GtkTreeModel *model, GtkWidget * empathy_profile_chooser_new (void) { - GList *profiles, *l; + GList *profiles, *l, *seen; GtkListStore *store; GtkCellRenderer *renderer; GtkWidget *combo_box; @@ -149,6 +149,7 @@ empathy_profile_chooser_new (void) btf_cm = mc_manager_lookup ("butterfly"); profiles = mc_profiles_list (); + seen = NULL; for (l = profiles; l; l = l->next) { McProfile *profile; McProtocol *protocol; @@ -170,6 +171,11 @@ empathy_profile_chooser_new (void) continue; } + if (g_list_find_custom (seen, unique_name, (GCompareFunc) strcmp)) { + continue; + } + seen = g_list_append (seen, (char*) unique_name); + gtk_list_store_insert_with_values (store, &iter, 0, COL_ICON, mc_profile_get_icon_name (profile), COL_LABEL, mc_profile_get_display_name (profile), @@ -177,6 +183,9 @@ empathy_profile_chooser_new (void) -1); iter_set = TRUE; } + + g_list_free (seen); + if (btf_cm) { g_object_unref (btf_cm); } |