aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorLaurent Contzen <lcontzen@gmail.com>2012-06-27 17:23:11 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-27 17:33:56 +0800
commit81a65a9ab520396d5ba6eb4085b4ab653bec547c (patch)
tree873735290f048832d1851b343d4e2dfd16e6b433 /libempathy-gtk
parent81a7652d19e8921b233f53f21cd14655a567bab4 (diff)
downloadgsoc2013-empathy-81a65a9ab520396d5ba6eb4085b4ab653bec547c.tar
gsoc2013-empathy-81a65a9ab520396d5ba6eb4085b4ab653bec547c.tar.gz
gsoc2013-empathy-81a65a9ab520396d5ba6eb4085b4ab653bec547c.tar.bz2
gsoc2013-empathy-81a65a9ab520396d5ba6eb4085b4ab653bec547c.tar.lz
gsoc2013-empathy-81a65a9ab520396d5ba6eb4085b4ab653bec547c.tar.xz
gsoc2013-empathy-81a65a9ab520396d5ba6eb4085b4ab653bec547c.tar.zst
gsoc2013-empathy-81a65a9ab520396d5ba6eb4085b4ab653bec547c.zip
Added new function to get selected individual
https://bugzilla.gnome.org/show_bug.cgi?id=678875
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-roster-view.c13
-rw-r--r--libempathy-gtk/empathy-roster-view.h2
2 files changed, 15 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-roster-view.c b/libempathy-gtk/empathy-roster-view.c
index 8dc739fde..3d55c3fa4 100644
--- a/libempathy-gtk/empathy-roster-view.c
+++ b/libempathy-gtk/empathy-roster-view.c
@@ -1606,3 +1606,16 @@ empathy_roster_view_remove_event (EmpathyRosterView *self,
}
}
}
+
+FolksIndividual *
+empathy_roster_view_get_selected_individual (EmpathyRosterView *self)
+{
+ GtkWidget *child;
+
+ child = egg_list_box_get_selected_child (EGG_LIST_BOX (self));
+
+ if (!EMPATHY_IS_ROSTER_CONTACT (child))
+ return NULL;
+
+ return empathy_roster_contact_get_individual (EMPATHY_ROSTER_CONTACT (child));
+}
diff --git a/libempathy-gtk/empathy-roster-view.h b/libempathy-gtk/empathy-roster-view.h
index ff9ba6c57..786e54d1f 100644
--- a/libempathy-gtk/empathy-roster-view.h
+++ b/libempathy-gtk/empathy-roster-view.h
@@ -81,6 +81,8 @@ FolksIndividual * empathy_roster_view_get_individual_at_y (
gint y,
GtkWidget **out_child);
+FolksIndividual * empathy_roster_view_get_selected_individual (EmpathyRosterView *self);
+
G_END_DECLS
#endif /* #ifndef __EMPATHY_ROSTER_VIEW_H__*/