]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-individual-widget.c
Use a flat namespace for internal includes
[empathy.git] / libempathy-gtk / empathy-individual-widget.c
index a5eb3c99e94ff595714a20a60ba55f5fcf198afc..371ddb1b05437e32f02735654f586f2ea0f20110 100644 (file)
  *          Philip Withnall <philip.withnall@collabora.co.uk>
  */
 
-#include <config.h>
+#include "config.h"
 
-#include <string.h>
-#include <stdlib.h>
-
-#include <gtk/gtk.h>
 #include <glib/gi18n-lib.h>
 
-#include <telepathy-glib/util.h>
-
-#include <folks/folks.h>
-#include <folks/folks-telepathy.h>
-
 #ifdef HAVE_LIBCHAMPLAIN
 #include <champlain/champlain.h>
 #include <champlain-gtk/champlain-gtk.h>
 #endif
 
-#include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-location.h>
-#include <libempathy/empathy-time.h>
+#include "empathy-utils.h"
+#include "empathy-location.h"
+#include "empathy-time.h"
 
 #include "empathy-avatar-image.h"
 #include "empathy-contactinfo-utils.h"
 #include "empathy-groups-widget.h"
 #include "empathy-gtk-enum-types.h"
-#include "empathy-individual-widget.h"
 #include "empathy-ui-utils.h"
 
 #define DEBUG_FLAG EMPATHY_DEBUG_CONTACT
-#include <libempathy/empathy-debug.h>
+#include "empathy-debug.h"
 
 /**
  * SECTION:empathy-individual-widget
@@ -239,7 +229,7 @@ details_update_show (EmpathyIndividualWidget *self,
   TpConnection *conn;
   TpAccount *account;
 
-  info = tp_contact_get_contact_info (contact);
+  info = tp_contact_dup_contact_info (contact);
   info = g_list_sort (info, (GCompareFunc) empathy_contact_info_field_cmp);
   for (l = info; l != NULL; l = l->next)
     {
@@ -309,7 +299,7 @@ details_update_show (EmpathyIndividualWidget *self,
       n_rows++;
     }
 
-  g_list_free (info);
+  tp_contact_info_list_free (info);
 
   return n_rows;
 }
@@ -808,9 +798,7 @@ client_types_update (EmpathyIndividualWidget *self)
 
   types = tp_contact_get_client_types (priv->contact);
 
-  if (types != NULL
-      && g_strv_length ((gchar **) types) > 0
-      && !tp_strdiff (types[0], "phone"))
+  if (empathy_client_types_contains_mobile_device ((GStrv) types))
     {
       gtk_widget_show (priv->hbox_client_types);
     }
@@ -1783,13 +1771,12 @@ personas_changed_cb (FolksIndividual *individual,
     }
   else if (!was_showing_personas && will_show_personas)
     {
-      gboolean c;
-
       /* Remove the old Individual grid */
       individual_grid_destroy (self);
 
       /* Set up all the Persona grids instead */
-      for (c = gee_iterator_first (iter); c; c = gee_iterator_next (iter))
+      iter = gee_iterable_iterator (GEE_ITERABLE (personas));
+      while (gee_iterator_next (iter))
         {
           FolksPersona *persona = gee_iterator_get (iter);
           add_persona (self, persona);
@@ -1798,10 +1785,9 @@ personas_changed_cb (FolksIndividual *individual,
     }
   else if (was_showing_personas && !will_show_personas)
     {
-      gboolean c;
-
       /* Remove all Personas */
-      for (c = gee_iterator_first (iter); c; c = gee_iterator_next (iter))
+      iter = gee_iterable_iterator (GEE_ITERABLE (personas));
+      while (gee_iterator_next (iter))
         {
           FolksPersona *persona = gee_iterator_get (iter);
           remove_persona (self, persona);