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 661489 - Should just use Folks to get favorites
Should just use Folks to get favorites
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Meta Contacts
2.33.x
Other Linux
: Normal enhancement
: 3.4
Assigned To: empathy-maint
empathy-maint
Depends on:
Blocks: 660547
 
 
Reported: 2011-10-11 20:08 UTC by Guillaume Desmottes
Modified: 2011-10-14 20:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
remove unused EMPATHY_CONTACT_FEATURE_FAVOURITE (3.72 KB, patch)
2011-10-14 19:40 UTC, Guillaume Desmottes
committed Details | Review
contact-list-store: remove 'fake group' code (5.92 KB, patch)
2011-10-14 19:40 UTC, Guillaume Desmottes
reviewed Details | Review
contact-manager: remove unused favourite code (11.20 KB, patch)
2011-10-14 19:40 UTC, Guillaume Desmottes
none Details | Review
contact-manager: remove unused favourite code (11.24 KB, patch)
2011-10-14 19:59 UTC, Guillaume Desmottes
committed Details | Review
contact-list-store: remove 'fake group' code (8.23 KB, patch)
2011-10-14 20:43 UTC, Guillaume Desmottes
committed Details | Review
contact-list-store: stop tracking favourite contacts (3.04 KB, patch)
2011-10-14 20:46 UTC, Guillaume Desmottes
committed Details | Review
contact-list: remove favourite API (3.84 KB, patch)
2011-10-14 20:46 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2011-10-11 20:08:58 UTC
Some part of the code use Folks to get favorites and some still use the logger directly. We should just rely on Folks.
Comment 1 Guillaume Desmottes 2011-10-14 19:40:33 UTC
Created attachment 199027 [details] [review]
remove unused EMPATHY_CONTACT_FEATURE_FAVOURITE
Comment 2 Guillaume Desmottes 2011-10-14 19:40:36 UTC
Created attachment 199028 [details] [review]
contact-list-store: remove 'fake group' code

This store is only used for MUC members which doesn't use these fake groups.
Actually we could drop all the group code but it would probably be easier to
completely rewrite the way we display MUC members.
Comment 3 Guillaume Desmottes 2011-10-14 19:40:38 UTC
Created attachment 199029 [details] [review]
contact-manager: remove unused favourite code
Comment 4 Guillaume Desmottes 2011-10-14 19:59:08 UTC
Created attachment 199030 [details] [review]
contact-manager: remove unused favourite code
Comment 5 Philip Withnall 2011-10-14 20:25:02 UTC
Review of attachment 199027 [details] [review]:

Looks good to me.
Comment 6 Philip Withnall 2011-10-14 20:28:37 UTC
Review of attachment 199028 [details] [review]:

::: libempathy-gtk/empathy-contact-list-store.c
@@ -1522,2 @@
 		NULL
 	};

Couldn't all the code which touches top_groups and bottom_groups now be removed, since they're always empty?

::: libempathy-gtk/empathy-contact-list-store.h
@@ -72,3 @@
-#define EMPATHY_CONTACT_LIST_STORE_FAVORITE  _("Favorite People")
-#define EMPATHY_CONTACT_LIST_STORE_PEOPLE_NEARBY _("People Nearby")
-

I think this file can now be removed from POTFILES.in, since all its translatable strings are dead and buried.
Comment 7 Philip Withnall 2011-10-14 20:30:49 UTC
Review of attachment 199030 [details] [review]:

::: libempathy/empathy-contact-manager.c
@@ -921,3 @@
-	iface->is_favourite      = contact_manager_is_favourite;
-	iface->remove_favourite  = contact_manager_remove_favourite;
-	iface->add_favourite     = contact_manager_add_favourite;

I wonder if these three methods should be removed from the ContactList interface too.
Comment 8 Guillaume Desmottes 2011-10-14 20:40:47 UTC
(In reply to comment #6)
> Review of attachment 199028 [details] [review]:
> 
> ::: libempathy-gtk/empathy-contact-list-store.c
> @@ -1522,2 @@
>          NULL
>      };
> 
> Couldn't all the code which touches top_groups and bottom_groups now be
> removed, since they're always empty?

removed.

> ::: libempathy-gtk/empathy-contact-list-store.h
> @@ -72,3 @@
> -#define EMPATHY_CONTACT_LIST_STORE_FAVORITE  _("Favorite People")
> -#define EMPATHY_CONTACT_LIST_STORE_PEOPLE_NEARBY _("People Nearby")
> -
> 
> I think this file can now be removed from POTFILES.in, since all its
> translatable strings are dead and buried.

Good point; removed.

(In reply to comment #7)
> Review of attachment 199030 [details] [review]:
> 
> ::: libempathy/empathy-contact-manager.c
> @@ -921,3 @@
> -    iface->is_favourite      = contact_manager_is_favourite;
> -    iface->remove_favourite  = contact_manager_remove_favourite;
> -    iface->add_favourite     = contact_manager_add_favourite;
> 
> I wonder if these three methods should be removed from the ContactList
> interface too.

Good idea; I'll remove them.
Comment 9 Guillaume Desmottes 2011-10-14 20:43:09 UTC
Created attachment 199032 [details] [review]
contact-list-store: remove 'fake group' code

This store is only used for MUC members which doesn't use these fake groups.
Actually we could drop all the group code but it would probably be easier to
completely rewrite the way we display MUC members.
Comment 10 Guillaume Desmottes 2011-10-14 20:46:01 UTC
Created attachment 199034 [details] [review]
contact-list-store: stop tracking favourite contacts
Comment 11 Guillaume Desmottes 2011-10-14 20:46:09 UTC
Created attachment 199035 [details] [review]
contact-list: remove favourite API
Comment 12 Philip Withnall 2011-10-14 20:47:41 UTC
Review of attachment 199032 [details] [review]:

Looks good to me.
Comment 13 Philip Withnall 2011-10-14 20:48:23 UTC
Review of attachment 199035 [details] [review]:

Looks good to me.
Comment 14 Philip Withnall 2011-10-14 20:48:51 UTC
Review of attachment 199034 [details] [review]:

Ship it!
Comment 15 Guillaume Desmottes 2011-10-14 20:50:05 UTC
Attachment 199027 [details] pushed as 3e2f155 - remove unused EMPATHY_CONTACT_FEATURE_FAVOURITE
Attachment 199030 [details] pushed as 21999bc - contact-manager: remove unused favourite code
Attachment 199032 [details] pushed as 9357aef - contact-list-store: remove 'fake group' code
Attachment 199034 [details] pushed as 960bbbe - contact-list-store: stop tracking favourite contacts
Attachment 199035 [details] pushed as d6763a0 - contact-list: remove favourite API