GtkWidget *
empathy_profile_chooser_new (void)
{
- GList *profiles, *l;
+ GList *profiles, *l, *seen;
GtkListStore *store;
GtkCellRenderer *renderer;
GtkWidget *combo_box;
btf_cm = mc_manager_lookup ("butterfly");
profiles = mc_profiles_list ();
+ seen = NULL;
for (l = profiles; l; l = l->next) {
McProfile *profile;
McProtocol *protocol;
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),
-1);
iter_set = TRUE;
}
+
+ g_list_free (seen);
+
if (btf_cm) {
g_object_unref (btf_cm);
}