diff options
author | Laurent Contzen <lcontzen@gmail.com> | 2012-08-04 21:29:46 +0800 |
---|---|---|
committer | Laurent Contzen <lcontzen@gmail.com> | 2012-08-06 17:02:19 +0800 |
commit | af7910a9af2984973be248b769d74f09e84822d4 (patch) | |
tree | cdabbe1f29bc2641e1344da5f13fb3cac7cab0f4 /libempathy-gtk/empathy-roster-model.c | |
parent | b3c361fdca7f6a0bb2a63e676cd0a5d488261127 (diff) | |
download | gsoc2013-empathy-af7910a9af2984973be248b769d74f09e84822d4.tar gsoc2013-empathy-af7910a9af2984973be248b769d74f09e84822d4.tar.gz gsoc2013-empathy-af7910a9af2984973be248b769d74f09e84822d4.tar.bz2 gsoc2013-empathy-af7910a9af2984973be248b769d74f09e84822d4.tar.lz gsoc2013-empathy-af7910a9af2984973be248b769d74f09e84822d4.tar.xz gsoc2013-empathy-af7910a9af2984973be248b769d74f09e84822d4.tar.zst gsoc2013-empathy-af7910a9af2984973be248b769d74f09e84822d4.zip |
Moved contact_in_top and contact_is_favourite from view to model
empathy-roster-model: new function _contact_in_top
empathy-roster-model-manager: implemented _contact_in_top, new function contact_is_favourite
empathy-roster-view: removed contact_in_top and contact_is_favourite functions, now calling model's _contact_in_top instead
Diffstat (limited to 'libempathy-gtk/empathy-roster-model.c')
-rw-r--r-- | libempathy-gtk/empathy-roster-model.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-roster-model.c b/libempathy-gtk/empathy-roster-model.c index 671f4b191..2334c63eb 100644 --- a/libempathy-gtk/empathy-roster-model.c +++ b/libempathy-gtk/empathy-roster-model.c @@ -188,3 +188,28 @@ empathy_roster_model_get_top_individuals (EmpathyRosterModel *self) return (* iface->get_top_individuals) (self); } + +/** + * empathy_roster_model_contact_in_top: + * @self: a #EmpathyRosterModel + * @contact: a #EmpathyRosterContact + * + * Checks if the passed #EmpathyRosterContact should be displayed in + * top contacts. + * + * Return value: %TRUE if it should be displayed in top contacts, %FALSE + * if not + */ +gboolean +empathy_roster_model_contact_in_top (EmpathyRosterModel *self, + EmpathyRosterContact *contact) +{ + EmpathyRosterModelInterface *iface; + + g_return_val_if_fail (EMPATHY_IS_ROSTER_MODEL (self), FALSE); + + iface = EMPATHY_ROSTER_MODEL_GET_IFACE (self); + g_return_val_if_fail (iface->contact_in_top != NULL, FALSE); + + return (* iface->contact_in_top) (self, contact); +} |