GNOME Bugzilla – Bug 661805
Use tp-glib blocking API
Last modified: 2011-11-08 12:33:02 UTC
We should use tp-glib's high level blocking API rather than then old one.
Actually this is not yet implemented: https://bugs.freedesktop.org/show_bug.cgi?id=41801
My tp-glib branch has been merged. We need a release but the port can already be reviewed.
Created attachment 200397 [details] [review] contact-blocking-dialog: split COL_* enums We have 2 different models having their own set of columns.
Created attachment 200398 [details] [review] Use tp-glib high level blocking API
Review of attachment 200397 [details] [review]: ++ [I'm so glad it wasn't me who wrote that...]
Review of attachment 200398 [details] [review]: ::: libempathy-gtk/empathy-contact-blocking-dialog.c @@ +313,3 @@ { + EmpathyContactBlockingDialog *self = + (EmpathyContactBlockingDialog *) weak_object; EMPATHY_CONTACT_BLOCKING_DIALOG() ? @@ +327,2 @@ + g_free (id); + return; It's nice to keep memory release in one code path: consider 'goto finally;' @@ +336,1 @@ finally: ::: libempathy/empathy-client-factory.c @@ +160,3 @@ + /* FIXME: ideally we should just prepare this when opening the blocking + * dialog but that's not possible atm (fdo #42303). */ It's useful other times too. Like if you have an empathy-chat window open, it shows a little ticky box to say that the contact is blocked.
EmpathyTpContactList also needs porting to new API.
(In reply to comment #6) > Review of attachment 200398 [details] [review]: > > ::: libempathy-gtk/empathy-contact-blocking-dialog.c > @@ +313,3 @@ > { > + EmpathyContactBlockingDialog *self = > + (EmpathyContactBlockingDialog *) weak_object; > > EMPATHY_CONTACT_BLOCKING_DIALOG() ? changed. > @@ +327,2 @@ > + g_free (id); > + return; > > It's nice to keep memory release in one code path: consider 'goto finally;' done. > ::: libempathy/empathy-client-factory.c > @@ +160,3 @@ > > + /* FIXME: ideally we should just prepare this when opening the blocking > + * dialog but that's not possible atm (fdo #42303). */ > > It's useful other times too. Like if you have an empathy-chat window open, it > shows a little ticky box to say that the contact is blocked. Oh yeah I forgot to port it. I removed the FIXME then.
Created attachment 200483 [details] [review] Use tp-glib high level blocking API
Review of attachment 200483 [details] [review]: ++ Port EmpathyTpContactList before committing :)
(In reply to comment #7) > EmpathyTpContactList also needs porting to new API. I removed it as I want to get rid of all this shit (bug #660547).
Attachment 200397 [details] pushed as 14b39f5 - contact-blocking-dialog: split COL_* enums
Created attachment 200488 [details] [review] contact-menu: use tp-glib blocking API
Created attachment 200489 [details] [review] contact-dialogs: use tp-glib blocking API
Created attachment 200490 [details] [review] individual-manager: use tp-glib blocking API
Created attachment 200491 [details] [review] individual dialog: use tp-glib blocking API
Created attachment 200492 [details] [review] remove old blocking API
Review of attachment 200488 [details] [review]: ++
Review of attachment 200489 [details] [review]: ++
Review of attachment 200490 [details] [review]: ++
Review of attachment 200491 [details] [review]: ++
Review of attachment 200492 [details] [review]: This patch is fine, but rather than this patch, perhaps it would be better to wait until the class is simply removed?
(In reply to comment #22) > Review of attachment 200492 [details] [review]: > > This patch is fine, but rather than this patch, perhaps it would be better to > wait until the class is simply removed? I prefer to gradually remove bits; it's easier to see what's left to be porting. Anyway, I have to wait for a tp-glib unstable release and bump the dep before merging this.
Attachment 200488 [details] pushed as 60c5906 - contact-menu: use tp-glib blocking API Attachment 200489 [details] pushed as 2c38acc - contact-dialogs: use tp-glib blocking API Attachment 200490 [details] pushed as c627b58 - individual-manager: use tp-glib blocking API Attachment 200491 [details] pushed as 6cb1836 - individual dialog: use tp-glib blocking API Attachment 200492 [details] pushed as a7429bd - remove old blocking API