From 32e517b2bc225ad56de043e79278374994c099ad Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 4 Jun 2012 14:57:03 +0200 Subject: add API for individual tooltips --- tests/interactive/test-empathy-roster-view.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests') diff --git a/tests/interactive/test-empathy-roster-view.c b/tests/interactive/test-empathy-roster-view.c index c76f670c8..f10aaf2d7 100644 --- a/tests/interactive/test-empathy-roster-view.c +++ b/tests/interactive/test-empathy-roster-view.c @@ -52,6 +52,19 @@ popup_individual_menu_cb (EmpathyRosterView *self, gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, button, time); } +static gboolean +individual_tooltip_cb (EmpathyRosterView *view, + FolksIndividual *individual, + gboolean keyboard_mode, + GtkTooltip *tooltip, + gpointer user_data) +{ + gtk_tooltip_set_text (tooltip, + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual))); + + return TRUE; +} + int main (int argc, char **argv) @@ -91,6 +104,9 @@ main (int argc, empathy_roster_view_show_offline (EMPATHY_ROSTER_VIEW (view), show_offline); empathy_roster_view_show_groups (EMPATHY_ROSTER_VIEW (view), show_groups); + empathy_roster_view_set_individual_tooltip_cb (EMPATHY_ROSTER_VIEW (view), + individual_tooltip_cb, NULL); + g_object_unref (mgr); search = empathy_live_search_new (view); -- cgit v1.2.3