From 785ce2292d3b61afd25099fd87eb3b7fbf4f4270 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 1 Jun 2012 13:25:42 +0200 Subject: add a signal when a contact is activated --- tests/interactive/test-empathy-roster-view.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests/interactive') 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); -- cgit v1.2.3