GNOME Bugzilla – Bug 675229
Stop using deprecated tp-glib API
Last modified: 2012-05-03 09:47:29 UTC
Some API have been deprecated in tp-glib master, empathy should stop using those tp_channel_group_get_members tp_channel_group_get_self_handle etc.
Created attachment 213280 [details] [review] chat-manager: use tp_channel_join_async() It's basically the same as empathy_tp_chat_join()
Created attachment 213281 [details] [review] remove empathy_tp_chat_join()
Created attachment 213282 [details] [review] client-factory: prepare TP_CHANNEL_FEATURE_CONTACTS We are about to use the channel-contacts API so best to make sure they will work.
Created attachment 213283 [details] [review] individual-store-channel: stop preparing TP_CHANNEL_FEATURE_CONTACTS The factory does it for us now.
Created attachment 213284 [details] [review] empathy_tp_chat_is_invited: use new channel group API
Created attachment 213285 [details] [review] tp_chat_prepare_ready_async: use new channel group API
Created attachment 213286 [details] [review] tp-chat: use new channel group API to track members
Created attachment 213287 [details] [review] invite-participant-dialog: stop using tp_channel_group_get_handle_owner()
Created attachment 213288 [details] [review] event-manager: use new channel group API
Review of attachment 213284 [details] [review]: ::: libempathy/empathy-tp-chat.c @@ +1478,3 @@ + + if (inviter != NULL) + *inviter = tp_contact_get_handle (actor); I would change inviter to be a TpContact or EmpathyContact, in the spirit of "die TpHandle, die!"
Review of attachment 213286 [details] [review]: You can remove chat_lookup_contact(). You already have a TpContact so you can get its EmpathyContact with empathy_contact_dup_from_tp_contact(). Also a *lookup* that removes is wrong. That can be done in separate commit though.
Review of attachment 213287 [details] [review]: ::: src/empathy-invite-participant-dialog.c @@ +158,3 @@ TP_CHANNEL (self->priv->tp_chat), + empathy_contact_get_tp_contact (member)); + handle = tp_contact_get_handle (owner); again, in the spirit of "die TpHandle, die!" don't pass by the handle, just compare TpContact pointers
+1 for the rest :)
Review of attachment 213284 [details] [review]: ::: libempathy/empathy-tp-chat.c @@ +1478,3 @@ + + if (inviter != NULL) + *inviter = tp_contact_get_handle (actor); done
Review of attachment 213286 [details] [review]: done
Review of attachment 213287 [details] [review]: ::: src/empathy-invite-participant-dialog.c @@ +158,3 @@ TP_CHANNEL (self->priv->tp_chat), + empathy_contact_get_tp_contact (member)); + handle = tp_contact_get_handle (owner); done.
Created attachment 213350 [details] [review] empathy_tp_chat_is_invited: return a TpContact for the inviter
Created attachment 213351 [details] [review] tp-chat:stop using the handle of members
Created attachment 213352 [details] [review] invite-participant-dialog: compare TpContact objects rather than handles
Created attachment 213353 [details] [review] contact: compare TpContact objects rather than handles
Created attachment 213355 [details] [review] contact-widget: stop using tp_connection_get_self_handle()
Created attachment 213356 [details] [review] accounts-dialog: stop using tp_connection_get_self_handle()
Review of attachment 213353 [details] [review]: You can use tp_contact_is_self() once tp-glib 0.19.1 gets released.
Looks all good :)
Attachment 213280 [details] pushed as ce0e19f - chat-manager: use tp_channel_join_async() Attachment 213281 [details] pushed as 4e5ccb2 - remove empathy_tp_chat_join() Attachment 213282 [details] pushed as b7f5aed - client-factory: prepare TP_CHANNEL_FEATURE_CONTACTS Attachment 213283 [details] pushed as f6cca82 - individual-store-channel: stop preparing TP_CHANNEL_FEATURE_CONTACTS Attachment 213284 [details] pushed as 73b1e75 - empathy_tp_chat_is_invited: use new channel group API Attachment 213285 [details] pushed as 9173fd2 - tp_chat_prepare_ready_async: use new channel group API Attachment 213286 [details] pushed as 5d02797 - tp-chat: use new channel group API to track members Attachment 213287 [details] pushed as eaaad92 - invite-participant-dialog: stop using tp_channel_group_get_handle_owner() Attachment 213288 [details] pushed as 7faf1b0 - event-manager: use new channel group API Attachment 213350 [details] pushed as a296925 - empathy_tp_chat_is_invited: return a TpContact for the inviter Attachment 213351 [details] pushed as 6fa54e0 - tp-chat:stop using the handle of members Attachment 213352 [details] pushed as 12c633d - invite-participant-dialog: compare TpContact objects rather than handles Attachment 213353 [details] pushed as 51bea33 - contact: compare TpContact objects rather than handles Attachment 213355 [details] pushed as e73848d - contact-widget: stop using tp_connection_get_self_handle() Attachment 213356 [details] pushed as 5deac54 - accounts-dialog: stop using tp_connection_get_self_handle()