aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-01 19:25:42 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-14 15:21:49 +0800
commit785ce2292d3b61afd25099fd87eb3b7fbf4f4270 (patch)
treec188dbc8f47fbcb997c1ec86061f66122e49c7d0 /tests
parent525000e6fe4dee72ebc327286d37b9d3260eab7b (diff)
downloadgsoc2013-empathy-785ce2292d3b61afd25099fd87eb3b7fbf4f4270.tar
gsoc2013-empathy-785ce2292d3b61afd25099fd87eb3b7fbf4f4270.tar.gz
gsoc2013-empathy-785ce2292d3b61afd25099fd87eb3b7fbf4f4270.tar.bz2
gsoc2013-empathy-785ce2292d3b61afd25099fd87eb3b7fbf4f4270.tar.lz
gsoc2013-empathy-785ce2292d3b61afd25099fd87eb3b7fbf4f4270.tar.xz
gsoc2013-empathy-785ce2292d3b61afd25099fd87eb3b7fbf4f4270.tar.zst
gsoc2013-empathy-785ce2292d3b61afd25099fd87eb3b7fbf4f4270.zip
add a signal when a contact is activated
Diffstat (limited to 'tests')
-rw-r--r--tests/interactive/test-empathy-roster-view.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/interactive/test-empathy-roster-view.c b/tests/interactive/test-empathy-roster-view.c
index 5700c1518..fd9457d53 100644
--- a/tests/interactive/test-empathy-roster-view.c
+++ b/tests/interactive/test-empathy-roster-view.c
@@ -13,6 +13,17 @@ static GOptionEntry entries[] =
{ NULL }
};
+static void
+individual_activated_cb (EmpathyRosterView *self,
+ FolksIndividual *individual,
+ gpointer user_data)
+{
+ g_assert (FOLKS_IS_INDIVIDUAL (individual));
+
+ g_print ("'%s' activated\n",
+ folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual)));
+}
+
int
main (int argc,
char **argv)
@@ -44,6 +55,9 @@ main (int argc,
view = empathy_roster_view_new (mgr);
+ g_signal_connect (view, "individual-activated",
+ G_CALLBACK (individual_activated_cb), NULL);
+
empathy_roster_view_show_offline (EMPATHY_ROSTER_VIEW (view), show_offline);
empathy_roster_view_show_groups (EMPATHY_ROSTER_VIEW (view), show_groups);