]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-contact-list-store.c
Updated Polish translation
[empathy.git] / libempathy-gtk / empathy-contact-list-store.c
index 1ea5c87762efa27334914a430540bffd390235a9..9feb4461fd5bf0c52e9e62a85be4a97cccdf3aa2 100644 (file)
@@ -728,11 +728,13 @@ empathy_contact_list_store_row_separator_func (GtkTreeModel *model,
 gchar *
 empathy_contact_list_store_get_parent_group (GtkTreeModel *model,
                                            GtkTreePath  *path,
-                                           gboolean     *path_is_group)
+                                           gboolean     *path_is_group,
+                                           gboolean     *is_fake_group)
 {
        GtkTreeIter  parent_iter, iter;
        gchar       *name = NULL;
        gboolean     is_group;
+       gboolean     fake;
 
        g_return_val_if_fail (GTK_IS_TREE_MODEL (model), NULL);
 
@@ -762,6 +764,7 @@ empathy_contact_list_store_get_parent_group (GtkTreeModel *model,
                gtk_tree_model_get (model, &iter,
                                    EMPATHY_CONTACT_LIST_STORE_COL_IS_GROUP, &is_group,
                                    EMPATHY_CONTACT_LIST_STORE_COL_NAME, &name,
+                                   EMPATHY_CONTACT_LIST_STORE_COL_IS_FAKE_GROUP, &fake,
                                    -1);
                if (!is_group) {
                        g_free (name);
@@ -773,6 +776,9 @@ empathy_contact_list_store_get_parent_group (GtkTreeModel *model,
                *path_is_group = TRUE;
        }
 
+       if (is_fake_group != NULL)
+               *is_fake_group = fake;
+
        return name;
 }
 
@@ -837,7 +843,6 @@ contact_list_store_setup (EmpathyContactListStore *store)
                G_TYPE_BOOLEAN,       /* Can make audio calls */
                G_TYPE_BOOLEAN,       /* Can make video calls */
                EMPATHY_TYPE_CONTACT_LIST_FLAGS, /* Flags */
-               G_TYPE_BOOLEAN,       /* Is a favourite */
                G_TYPE_BOOLEAN,       /* Is a fake group */
        };
 
@@ -931,25 +936,6 @@ contact_list_store_members_changed_cb (EmpathyContactList      *list_iface,
        }
 }
 
-static void
-contact_list_store_change_contact_favourite_status (EmpathyContactListStore *store,
-                                                   EmpathyContact          *contact,
-                                                   gboolean                 is_favourite)
-{
-       GList *iters, *l;
-
-       iters = contact_list_store_find_contact (store, contact);
-       for (l = iters; l; l = l->next) {
-               gtk_tree_store_set (GTK_TREE_STORE (store), l->data,
-                       EMPATHY_CONTACT_LIST_STORE_COL_IS_FAVOURITE,
-                       is_favourite,
-                       -1);
-       }
-
-       g_list_foreach (iters, (GFunc) gtk_tree_iter_free, NULL);
-       g_list_free (iters);
-}
-
 static void
 contact_list_store_favourites_changed_cb (EmpathyContactList      *list_iface,
                                          EmpathyContact          *contact,
@@ -965,9 +951,6 @@ contact_list_store_favourites_changed_cb (EmpathyContactList      *list_iface,
                empathy_contact_get_handle (contact),
                is_favourite ? "now" : "no longer");
 
-       contact_list_store_change_contact_favourite_status (store, contact,
-                                                                                                                                                                                                     is_favourite);
-
        contact_list_store_remove_contact (store, contact);
        contact_list_store_add_contact (store, contact);
 }
@@ -1175,17 +1158,6 @@ contact_list_store_remove_contact (EmpathyContactListStore *store,
        g_list_free (iters);
 }
 
-static gboolean
-list_store_contact_is_favourite (EmpathyContactListStore *store,
-                                EmpathyContact          *contact)
-{
-       EmpathyContactListStorePriv *priv;
-
-       priv = GET_PRIV (store);
-
-       return empathy_contact_list_is_favourite (priv->list, contact);
-}
-
 static void
 contact_list_store_contact_update (EmpathyContactListStore *store,
                                   EmpathyContact          *contact)
@@ -1301,7 +1273,6 @@ contact_list_store_contact_update (EmpathyContactListStore *store,
        pixbuf_status = contact_list_store_get_contact_status_icon (store, contact);
        for (l = iters; l && set_model; l = l->next) {
                gtk_tree_store_set (GTK_TREE_STORE (store), l->data,
-                                   EMPATHY_CONTACT_LIST_STORE_COL_IS_FAVOURITE, list_store_contact_is_favourite (store, contact),
                                    EMPATHY_CONTACT_LIST_STORE_COL_ICON_STATUS, pixbuf_status,
                                    EMPATHY_CONTACT_LIST_STORE_COL_PIXBUF_AVATAR, pixbuf_avatar,
                                    EMPATHY_CONTACT_LIST_STORE_COL_PIXBUF_AVATAR_VISIBLE, show_avatar,