]> git.0d.be Git - empathy.git/commitdiff
really fix protocol group
authorXavier Claessens <xclaesse@src.gnome.org>
Tue, 2 Oct 2007 08:59:16 +0000 (08:59 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Tue, 2 Oct 2007 08:59:16 +0000 (08:59 +0000)
svn path=/trunk/; revision=358

libempathy/empathy-tp-contact-list.c

index f5d565ed87cad6b01eebe870de7305dc665d876c..68bcf8cce0d8ce050cc9ab395462b10ea556bc9f 100644 (file)
@@ -729,6 +729,7 @@ empathy_tp_contact_list_new (McAccount *account)
        if (strcmp (protocol_name, "local-xmpp") == 0) {
                priv->protocol_group = _("People nearby");
        }
+g_print ("******%s\n", priv->protocol_group);
        g_object_unref (profile);
 
        /* Connect signals */
@@ -818,6 +819,10 @@ tp_contact_list_get_all_groups (EmpathyContactList *list)
 
        g_return_val_if_fail (EMPATHY_IS_TP_CONTACT_LIST (list), NULL);
 
+       if (priv->protocol_group) {
+               groups = g_list_prepend (groups, g_strdup (priv->protocol_group));
+       }
+
        for (l = priv->groups; l; l = l->next) {
                const gchar *name;
 
@@ -825,10 +830,6 @@ tp_contact_list_get_all_groups (EmpathyContactList *list)
                groups = g_list_prepend (groups, g_strdup (name));
        }
 
-       if (priv->protocol_group) {
-               groups = g_list_prepend (groups, g_strdup (priv->protocol_group));
-       }
-
        return groups;
 }
 
@@ -842,18 +843,19 @@ tp_contact_list_get_groups (EmpathyContactList *list,
 
        g_return_val_if_fail (EMPATHY_IS_TP_CONTACT_LIST (list), NULL);
 
+       if (priv->protocol_group) {
+               ret = g_list_prepend (ret, g_strdup (priv->protocol_group));
+       }
+
        groups = g_hash_table_lookup (priv->contacts_groups, contact);
        if (!groups) {
-               return NULL;
+               return ret;
        }
 
        for (l = *groups; l; l = l->next) {
                ret = g_list_prepend (ret, g_strdup (l->data));
        }
 
-       if (priv->protocol_group) {
-               ret = g_list_prepend (ret, g_strdup (priv->protocol_group));
-       }
 
        return ret;
 }