After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 679868 - [New roster] The Top Contacts group name isn't displayed above the top contacts if all of them are offline
[New roster] The Top Contacts group name isn't displayed above the top contac...
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Contact List
unspecified
Other Linux
: Normal normal
: 3.6
Assigned To: empathy-maint
empathy-maint
Depends on:
Blocks:
 
 
Reported: 2012-07-13 15:26 UTC by Laurent Contzen
Modified: 2012-07-23 07:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of the problem (76.14 KB, image/png)
2012-07-13 15:26 UTC, Laurent Contzen
  Details
Display the Top Contacts group name above the top contacts even if all of them are offline (1015 bytes, patch)
2012-07-13 15:27 UTC, Laurent Contzen
reviewed Details | Review
Display the Top Contacts group name above the top contacts even if all of them are offline (2.11 KB, patch)
2012-07-16 09:24 UTC, Laurent Contzen
reviewed Details | Review
Display the Top Contacts group name above the top contacts even if all of them are offline (2.05 KB, patch)
2012-07-17 07:54 UTC, Laurent Contzen
none Details | Review
Display the Top Contacts group name above the top contacts even if all of them are offline (2.42 KB, patch)
2012-07-17 08:31 UTC, Laurent Contzen
committed Details | Review
empathy-roster-model-manager.c: implement empathy_roster_model_manager_get_individuals () (1.15 KB, patch)
2012-07-22 15:46 UTC, Laurent Contzen
rejected Details | Review

Description Laurent Contzen 2012-07-13 15:26:06 UTC
Created attachment 218737 [details]
Screenshot of the problem

It should be displayed instead of having only the contacts lost on the top of the list. 

Screenshot of the problem (in test-empathy-roster-view but it was the same situation in empathy too) attached.
Comment 1 Laurent Contzen 2012-07-13 15:27:20 UTC
Created attachment 218738 [details] [review]
Display the Top Contacts group name above the top contacts even if all of them are offline
Comment 2 Guillaume Desmottes 2012-07-16 08:42:01 UTC
Review of attachment 218738 [details] [review]:

That's not the right way to fix this. With your patch you'll display offline favorite contacts in all their group, not only the top one, which is not the intented behaviour (see the comment above).

I think the right way is to move the top group logic from filter_contact() to contact_should_be_displayed().
I should be something like this:

if (favorite)
  {
      if (!show_groups)
         /* Always display favourite contacts in non-group mode..... */
        return TRUE;
      else
        /* Always display fav contact in group mode only in the 'top group'/
        if (contact_group_name == TOP)
            return TRUE;
  }
Comment 3 Laurent Contzen 2012-07-16 09:24:50 UTC
Created attachment 218893 [details] [review]
Display the Top Contacts group name above the top contacts even if all of them are offline
Comment 4 Guillaume Desmottes 2012-07-16 12:45:24 UTC
Review of attachment 218893 [details] [review]:

::: libempathy-gtk/empathy-roster-view.c
@@ +832,3 @@
+
+              if (tp_strdiff (group_name, EMPATHY_ROSTER_VIEW_GROUP_TOP_GROUP))
+              /* Always display favourite contact in group mode only in the

We don't want to return FALSE here; with your patch fav contact will only appear in the top group now. We should just continue the normal flow of the function if that's another group.
Comment 5 Laurent Contzen 2012-07-17 07:54:04 UTC
Created attachment 218969 [details] [review]
Display the Top Contacts group name above the top contacts even if all of them are offline
Comment 6 Laurent Contzen 2012-07-17 08:31:43 UTC
Created attachment 218996 [details] [review]
Display the Top Contacts group name above the top contacts even if all of them are offline
Comment 7 Guillaume Desmottes 2012-07-17 09:53:26 UTC
Review of attachment 218996 [details] [review]:

Looks good, thanks.
Comment 8 Guillaume Desmottes 2012-07-17 09:53:41 UTC
Attachment 218996 [details] pushed as a507ac4 - Display the Top Contacts group name above the top contacts even if all of them are offline
Comment 9 Laurent Contzen 2012-07-22 15:46:17 UTC
Created attachment 219422 [details] [review]
empathy-roster-model-manager.c: implement empathy_roster_model_manager_get_individuals ()
Comment 10 Laurent Contzen 2012-07-23 07:20:05 UTC
Review of attachment 219422 [details] [review]:

Wrong bug number