aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-ui-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk/empathy-ui-utils.c')
-rw-r--r--libempathy-gtk/empathy-ui-utils.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index d5abf0265..93c08d1c5 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2002-2007 Imendio AB
- * Copyright (C) 2007-2008 Collabora Ltd.
+ * Copyright (C) 2007-2010 Collabora Ltd.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -23,6 +23,7 @@
* Martyn Russell <martyn@imendio.com>
* Xavier Claessens <xclaesse@gmail.com>
* Jonny Lamb <jonny.lamb@collabora.co.uk>
+ * Travis Reitter <travis.reitter@collabora.co.uk>
*
* Part of this file is copied from GtkSourceView (gtksourceiter.c):
* Paolo Maggi
@@ -38,6 +39,8 @@
#include <gtk/gtk.h>
#include <gio/gio.h>
+#include <folks/folks.h>
+
#include "empathy-ui-utils.h"
#include "empathy-images.h"
#include "empathy-smiley-manager.h"
@@ -221,6 +224,18 @@ empathy_icon_name_for_contact (EmpathyContact *contact)
}
const gchar *
+empathy_icon_name_for_individual (FolksIndividual *individual)
+{
+ FolksPresenceType folks_presence;
+ TpConnectionPresenceType presence;
+
+ folks_presence = folks_individual_get_presence_type (individual);
+ presence = empathy_folks_presence_type_to_tp (folks_presence);
+
+ return empathy_icon_name_for_presence (presence);
+}
+
+const gchar *
empathy_protocol_name_for_contact (EmpathyContact *contact)
{
TpAccount *account;
@@ -524,7 +539,8 @@ empathy_pixbuf_contact_status_icon_with_icon_name (EmpathyContact *contact,
gint height, width;
gint numerator, denominator;
- g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
+ g_return_val_if_fail (EMPATHY_IS_CONTACT (contact) ||
+ (show_protocol == FALSE), NULL);
g_return_val_if_fail (icon_name != NULL, NULL);
numerator = 3;