aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2012-06-27 17:29:16 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-28 16:56:30 +0800
commit36dc0639473930ac596bdbf08f6ea0a6a8471f7c (patch)
tree6c0c116e316d6b1d2c813079ef6263bcd18b9fff /libempathy-gtk
parent539cd8f46f384fd209f6f87aa1e1add2d8197436 (diff)
downloadgsoc2013-empathy-36dc0639473930ac596bdbf08f6ea0a6a8471f7c.tar
gsoc2013-empathy-36dc0639473930ac596bdbf08f6ea0a6a8471f7c.tar.gz
gsoc2013-empathy-36dc0639473930ac596bdbf08f6ea0a6a8471f7c.tar.bz2
gsoc2013-empathy-36dc0639473930ac596bdbf08f6ea0a6a8471f7c.tar.lz
gsoc2013-empathy-36dc0639473930ac596bdbf08f6ea0a6a8471f7c.tar.xz
gsoc2013-empathy-36dc0639473930ac596bdbf08f6ea0a6a8471f7c.tar.zst
gsoc2013-empathy-36dc0639473930ac596bdbf08f6ea0a6a8471f7c.zip
EmpathyChatView: add vfunc for showing/hiding avatars
https://bugzilla.gnome.org/show_bug.cgi?id=627948
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-chat-view.c20
-rw-r--r--libempathy-gtk/empathy-chat-view.h4
2 files changed, 24 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-chat-view.c b/libempathy-gtk/empathy-chat-view.c
index f5d6ddf09..7d35efb62 100644
--- a/libempathy-gtk/empathy-chat-view.c
+++ b/libempathy-gtk/empathy-chat-view.c
@@ -253,3 +253,23 @@ empathy_chat_view_message_acknowledged (EmpathyChatView *view,
}
}
+/*
+ * empathy_chat_view_set_show_avatars:
+ * @view: a chat view
+ * @show_avatars: TRUE if contacts' avatars should be shown alongside their name
+ *
+ * At present, this is only called on freshly-constructed chat views based on
+ * whether or not the protocol supports avatars at all. Hence, themes don't
+ * have to worry about retroactively showing or hiding avatars in the
+ * scrollback.
+ */
+void
+empathy_chat_view_set_show_avatars (EmpathyChatView *view,
+ gboolean show_avatars)
+{
+ g_return_if_fail (EMPATHY_IS_CHAT_VIEW (view));
+
+ if (EMPATHY_TYPE_CHAT_VIEW_GET_IFACE (view)->set_show_avatars) {
+ EMPATHY_TYPE_CHAT_VIEW_GET_IFACE (view)->set_show_avatars (view, show_avatars);
+ }
+}
diff --git a/libempathy-gtk/empathy-chat-view.h b/libempathy-gtk/empathy-chat-view.h
index 2c47e0429..b263219b2 100644
--- a/libempathy-gtk/empathy-chat-view.h
+++ b/libempathy-gtk/empathy-chat-view.h
@@ -78,6 +78,8 @@ struct _EmpathyChatViewIface {
gboolean has_focus);
void (*message_acknowledged) (EmpathyChatView *view,
EmpathyMessage *message);
+ void (*set_show_avatars) (EmpathyChatView *view,
+ gboolean show_avatars);
};
GType empathy_chat_view_get_type (void) G_GNUC_CONST;
@@ -117,6 +119,8 @@ void empathy_chat_view_focus_toggled (EmpathyChatView *view,
gboolean has_focus);
void empathy_chat_view_message_acknowledged (EmpathyChatView *view,
EmpathyMessage *message);
+void empathy_chat_view_set_show_avatars (EmpathyChatView *view,
+ gboolean show_avatars);
G_END_DECLS