]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-individual-store.c
Merge branch 'gnome-3-8'
[empathy.git] / libempathy-gtk / empathy-individual-store.c
index 9199af6b94c877f935f0a01bd524838395dbd422..9b685ee5f7dbba3547d31e579d879682c947c924 100644 (file)
  */
 
 #include "config.h"
+#include "empathy-individual-store.h"
 
-#include <string.h>
-
-#include <glib.h>
 #include <glib/gi18n-lib.h>
-#include <gtk/gtk.h>
-
-#include <folks/folks.h>
-#include <folks/folks-telepathy.h>
-#include <telepathy-glib/util.h>
+#include <tp-account-widgets/tpaw-utils.h>
 
-#include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-enum-types.h>
-
-#include "empathy-individual-store.h"
-#include "empathy-ui-utils.h"
 #include "empathy-gtk-enum-types.h"
+#include "empathy-ui-utils.h"
+#include "empathy-utils.h"
 
 #define DEBUG_FLAG EMPATHY_DEBUG_CONTACT
-#include <libempathy/empathy-debug.h>
+#include "empathy-debug.h"
 
 /* Active users are those which have recently changed state
  * (e.g. online, offline or from normal to a busy state).
@@ -209,8 +200,9 @@ individual_store_get_group (EmpathyIndividualStore *self,
     }
 }
 
-static GList *
-individual_store_find_contact (EmpathyIndividualStore *self,
+GList *
+/* (transfer full) free with empathy_individual_store_free_iters() */
+empathy_individual_store_find_contact (EmpathyIndividualStore *self,
     FolksIndividual *individual)
 {
   GQueue *row_refs_queue;
@@ -232,8 +224,8 @@ individual_store_find_contact (EmpathyIndividualStore *self,
   return iters_list;
 }
 
-static void
-free_iters (GList *iters)
+void
+empathy_individual_store_free_iters (GList *iters)
 {
   g_list_foreach (iters, (GFunc) gtk_tree_iter_free, NULL);
   g_list_free (iters);
@@ -292,7 +284,7 @@ empathy_individual_store_add_individual (EmpathyIndividualStore *self,
   GeeSet *group_set = NULL;
   gboolean grouped = FALSE;
 
-  if (EMP_STR_EMPTY (folks_alias_details_get_alias (
+  if (TPAW_STR_EMPTY (folks_alias_details_get_alias (
           FOLKS_ALIAS_DETAILS (individual))))
     return;
 
@@ -396,7 +388,7 @@ individual_store_contact_set_active (EmpathyIndividualStore *self,
 
   model = GTK_TREE_MODEL (self);
 
-  iters = individual_store_find_contact (self, individual);
+  iters = empathy_individual_store_find_contact (self, individual);
   for (l = iters; l; l = l->next)
     {
       GtkTreePath *path;
@@ -413,7 +405,7 @@ individual_store_contact_set_active (EmpathyIndividualStore *self,
         }
     }
 
-  free_iters (iters);
+  empathy_individual_store_free_iters (iters);
 }
 
 static void individual_store_contact_active_free (ShowActiveData *data);
@@ -531,7 +523,7 @@ individual_avatar_pixbuf_received_cb (FolksIndividual *individual,
     {
       GList *iters, *l;
 
-      iters = individual_store_find_contact (data->store, individual);
+      iters = empathy_individual_store_find_contact (data->store, individual);
       for (l = iters; l; l = l->next)
         {
           gtk_tree_store_set (GTK_TREE_STORE (data->store), l->data,
@@ -539,7 +531,7 @@ individual_avatar_pixbuf_received_cb (FolksIndividual *individual,
               -1);
         }
 
-      free_iters (iters);
+      empathy_individual_store_free_iters (iters);
     }
 
   /* Free things */
@@ -576,7 +568,7 @@ individual_store_contact_update (EmpathyIndividualStore *self,
 
   model = GTK_TREE_MODEL (self);
 
-  iters = individual_store_find_contact (self, individual);
+  iters = empathy_individual_store_find_contact (self, individual);
   if (!iters)
     {
       in_list = FALSE;
@@ -704,7 +696,7 @@ individual_store_contact_update (EmpathyIndividualStore *self,
    * timeout removes the user from the contact list, really we
    * should remove the first timeout.
    */
-  free_iters (iters);
+  empathy_individual_store_free_iters (iters);
 }
 
 static void