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 675229 - Stop using deprecated tp-glib API
Stop using deprecated tp-glib API
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: General
2.33.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
Depends on:
Blocks:
 
 
Reported: 2012-05-01 10:45 UTC by Guillaume Desmottes
Modified: 2012-05-03 09:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
chat-manager: use tp_channel_join_async() (1.45 KB, patch)
2012-05-02 13:54 UTC, Guillaume Desmottes
committed Details | Review
remove empathy_tp_chat_join() (2.06 KB, patch)
2012-05-02 13:54 UTC, Guillaume Desmottes
committed Details | Review
client-factory: prepare TP_CHANNEL_FEATURE_CONTACTS (1.01 KB, patch)
2012-05-02 13:54 UTC, Guillaume Desmottes
committed Details | Review
individual-store-channel: stop preparing TP_CHANNEL_FEATURE_CONTACTS (2.15 KB, patch)
2012-05-02 13:54 UTC, Guillaume Desmottes
committed Details | Review
empathy_tp_chat_is_invited: use new channel group API (1.44 KB, patch)
2012-05-02 13:54 UTC, Guillaume Desmottes
committed Details | Review
tp_chat_prepare_ready_async: use new channel group API (3.72 KB, patch)
2012-05-02 13:54 UTC, Guillaume Desmottes
committed Details | Review
tp-chat: use new channel group API to track members (9.20 KB, patch)
2012-05-02 13:54 UTC, Guillaume Desmottes
committed Details | Review
invite-participant-dialog: stop using tp_channel_group_get_handle_owner() (1.23 KB, patch)
2012-05-02 13:54 UTC, Guillaume Desmottes
committed Details | Review
event-manager: use new channel group API (1.26 KB, patch)
2012-05-02 13:54 UTC, Guillaume Desmottes
committed Details | Review
empathy_tp_chat_is_invited: return a TpContact for the inviter (4.20 KB, patch)
2012-05-03 09:25 UTC, Guillaume Desmottes
committed Details | Review
tp-chat:stop using the handle of members (2.94 KB, patch)
2012-05-03 09:25 UTC, Guillaume Desmottes
committed Details | Review
invite-participant-dialog: compare TpContact objects rather than handles (1.46 KB, patch)
2012-05-03 09:25 UTC, Guillaume Desmottes
committed Details | Review
contact: compare TpContact objects rather than handles (1.57 KB, patch)
2012-05-03 09:25 UTC, Guillaume Desmottes
committed Details | Review
contact-widget: stop using tp_connection_get_self_handle() (1.21 KB, patch)
2012-05-03 09:35 UTC, Guillaume Desmottes
committed Details | Review
accounts-dialog: stop using tp_connection_get_self_handle() (2.12 KB, patch)
2012-05-03 09:35 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2012-05-01 10:45:46 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.
Comment 1 Guillaume Desmottes 2012-05-02 13:54:02 UTC
Created attachment 213280 [details] [review]
chat-manager: use tp_channel_join_async()

It's basically the same as empathy_tp_chat_join()
Comment 2 Guillaume Desmottes 2012-05-02 13:54:05 UTC
Created attachment 213281 [details] [review]
remove empathy_tp_chat_join()
Comment 3 Guillaume Desmottes 2012-05-02 13:54:08 UTC
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.
Comment 4 Guillaume Desmottes 2012-05-02 13:54:11 UTC
Created attachment 213283 [details] [review]
individual-store-channel: stop preparing TP_CHANNEL_FEATURE_CONTACTS

The factory does it for us now.
Comment 5 Guillaume Desmottes 2012-05-02 13:54:14 UTC
Created attachment 213284 [details] [review]
empathy_tp_chat_is_invited: use new channel group API
Comment 6 Guillaume Desmottes 2012-05-02 13:54:16 UTC
Created attachment 213285 [details] [review]
tp_chat_prepare_ready_async: use new channel group API
Comment 7 Guillaume Desmottes 2012-05-02 13:54:20 UTC
Created attachment 213286 [details] [review]
tp-chat: use new channel group API to track members
Comment 8 Guillaume Desmottes 2012-05-02 13:54:22 UTC
Created attachment 213287 [details] [review]
invite-participant-dialog: stop using tp_channel_group_get_handle_owner()
Comment 9 Guillaume Desmottes 2012-05-02 13:54:26 UTC
Created attachment 213288 [details] [review]
event-manager: use new channel group API
Comment 10 Xavier Claessens 2012-05-02 14:03:16 UTC
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!"
Comment 11 Xavier Claessens 2012-05-02 14:14:59 UTC
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.
Comment 12 Xavier Claessens 2012-05-02 14:18:28 UTC
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
Comment 13 Xavier Claessens 2012-05-02 14:19:38 UTC
+1 for the rest :)
Comment 14 Guillaume Desmottes 2012-05-03 09:03:50 UTC
Review of attachment 213284 [details] [review]:

::: libempathy/empathy-tp-chat.c
@@ +1478,3 @@
+
+  if (inviter != NULL)
+    *inviter = tp_contact_get_handle (actor);

done
Comment 15 Guillaume Desmottes 2012-05-03 09:15:42 UTC
Review of attachment 213286 [details] [review]:

done
Comment 16 Guillaume Desmottes 2012-05-03 09:21:37 UTC
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.
Comment 17 Guillaume Desmottes 2012-05-03 09:25:22 UTC
Created attachment 213350 [details] [review]
empathy_tp_chat_is_invited: return a TpContact for the inviter
Comment 18 Guillaume Desmottes 2012-05-03 09:25:24 UTC
Created attachment 213351 [details] [review]
tp-chat:stop using the handle of members
Comment 19 Guillaume Desmottes 2012-05-03 09:25:27 UTC
Created attachment 213352 [details] [review]
invite-participant-dialog: compare TpContact objects rather than handles
Comment 20 Guillaume Desmottes 2012-05-03 09:25:30 UTC
Created attachment 213353 [details] [review]
contact: compare TpContact objects rather than handles
Comment 21 Guillaume Desmottes 2012-05-03 09:35:26 UTC
Created attachment 213355 [details] [review]
contact-widget: stop using tp_connection_get_self_handle()
Comment 22 Guillaume Desmottes 2012-05-03 09:35:29 UTC
Created attachment 213356 [details] [review]
accounts-dialog: stop using tp_connection_get_self_handle()
Comment 23 Xavier Claessens 2012-05-03 09:41:55 UTC
Review of attachment 213353 [details] [review]:

You can use tp_contact_is_self() once tp-glib 0.19.1 gets released.
Comment 24 Xavier Claessens 2012-05-03 09:44:16 UTC
Looks all good :)
Comment 25 Guillaume Desmottes 2012-05-03 09:46:42 UTC
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()