empathy r1364 - trunk/libempathy-gtk
- From: fpeters svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r1364 - trunk/libempathy-gtk
- Date: Wed, 20 Aug 2008 18:51:17 +0000 (UTC)
Author: fpeters
Date: Wed Aug 20 18:51:17 2008
New Revision: 1364
URL: http://svn.gnome.org/viewvc/empathy?rev=1364&view=rev
Log:
don't list profiles twice. (closes: #548578)
Modified:
trunk/libempathy-gtk/empathy-profile-chooser.c
Modified: trunk/libempathy-gtk/empathy-profile-chooser.c
==============================================================================
--- trunk/libempathy-gtk/empathy-profile-chooser.c (original)
+++ trunk/libempathy-gtk/empathy-profile-chooser.c Wed Aug 20 18:51:17 2008
@@ -118,7 +118,7 @@
GtkWidget *
empathy_profile_chooser_new (void)
{
- GList *profiles, *l;
+ GList *profiles, *l, *seen;
GtkListStore *store;
GtkCellRenderer *renderer;
GtkWidget *combo_box;
@@ -149,6 +149,7 @@
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 @@
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 @@
-1);
iter_set = TRUE;
}
+
+ g_list_free (seen);
+
if (btf_cm) {
g_object_unref (btf_cm);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]