aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-ui-utils.c
diff options
context:
space:
mode:
authorTravis Reitter <treitter@gmail.com>2010-05-29 07:13:51 +0800
committerTravis Reitter <treitter@gmail.com>2010-07-21 07:12:35 +0800
commitd6aa2f99e3e626f81b455c0fa1ff4817a4e4f2f6 (patch)
tree3db6a726bcc50a3423f601b7975d7abb166cb9a1 /libempathy-gtk/empathy-ui-utils.c
parent57a1f36eaec69df0195e90d8a4b050574a19d6b3 (diff)
downloadgsoc2013-empathy-d6aa2f99e3e626f81b455c0fa1ff4817a4e4f2f6.tar
gsoc2013-empathy-d6aa2f99e3e626f81b455c0fa1ff4817a4e4f2f6.tar.gz
gsoc2013-empathy-d6aa2f99e3e626f81b455c0fa1ff4817a4e4f2f6.tar.bz2
gsoc2013-empathy-d6aa2f99e3e626f81b455c0fa1ff4817a4e4f2f6.tar.lz
gsoc2013-empathy-d6aa2f99e3e626f81b455c0fa1ff4817a4e4f2f6.tar.xz
gsoc2013-empathy-d6aa2f99e3e626f81b455c0fa1ff4817a4e4f2f6.tar.zst
gsoc2013-empathy-d6aa2f99e3e626f81b455c0fa1ff4817a4e4f2f6.zip
Base the contact list around libfolks metacontacts. Not yet to feature-parity
with mainline Empathy.
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;