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 661805 - Use tp-glib blocking API
Use tp-glib blocking API
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: General
2.33.x
Other Linux
: Normal normal
: 3.4
Assigned To: empathy-maint
empathy-maint
Depends on:
Blocks: 660547 663327
 
 
Reported: 2011-10-14 20:02 UTC by Guillaume Desmottes
Modified: 2011-11-08 12:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
contact-blocking-dialog: split COL_* enums (4.39 KB, patch)
2011-11-01 12:15 UTC, Guillaume Desmottes
committed Details | Review
Use tp-glib high level blocking API (24.53 KB, patch)
2011-11-01 12:15 UTC, Guillaume Desmottes
reviewed Details | Review
Use tp-glib high level blocking API (24.40 KB, patch)
2011-11-02 08:53 UTC, Guillaume Desmottes
committed Details | Review
contact-menu: use tp-glib blocking API (2.63 KB, patch)
2011-11-02 10:39 UTC, Guillaume Desmottes
committed Details | Review
contact-dialogs: use tp-glib blocking API (3.37 KB, patch)
2011-11-02 10:39 UTC, Guillaume Desmottes
committed Details | Review
individual-manager: use tp-glib blocking API (3.25 KB, patch)
2011-11-02 10:39 UTC, Guillaume Desmottes
committed Details | Review
individual dialog: use tp-glib blocking API (2.33 KB, patch)
2011-11-02 10:39 UTC, Guillaume Desmottes
committed Details | Review
remove old blocking API (10.83 KB, patch)
2011-11-02 10:39 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2011-10-14 20:02:55 UTC
We should use tp-glib's high level blocking API rather than then old one.
Comment 1 Guillaume Desmottes 2011-10-14 20:13:32 UTC
Actually this is not yet implemented: https://bugs.freedesktop.org/show_bug.cgi?id=41801
Comment 2 Guillaume Desmottes 2011-11-01 12:15:29 UTC
My tp-glib branch has been merged. We need a release but the port can already be reviewed.
Comment 3 Guillaume Desmottes 2011-11-01 12:15:45 UTC
Created attachment 200397 [details] [review]
contact-blocking-dialog: split COL_* enums

We have 2 different models having their own set of columns.
Comment 4 Guillaume Desmottes 2011-11-01 12:15:48 UTC
Created attachment 200398 [details] [review]
Use tp-glib high level blocking API
Comment 5 Danielle Madeley 2011-11-02 03:13:27 UTC
Review of attachment 200397 [details] [review]:

++

[I'm so glad it wasn't me who wrote that...]
Comment 6 Danielle Madeley 2011-11-02 03:24:20 UTC
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.
Comment 7 Danielle Madeley 2011-11-02 03:34:01 UTC
EmpathyTpContactList also needs porting to new API.
Comment 8 Guillaume Desmottes 2011-11-02 08:52:53 UTC
(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.
Comment 9 Guillaume Desmottes 2011-11-02 08:53:18 UTC
Created attachment 200483 [details] [review]
Use tp-glib high level blocking API
Comment 10 Danielle Madeley 2011-11-02 09:11:58 UTC
Review of attachment 200483 [details] [review]:

++

Port EmpathyTpContactList before committing :)
Comment 11 Guillaume Desmottes 2011-11-02 10:37:50 UTC
(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).
Comment 12 Guillaume Desmottes 2011-11-02 10:39:18 UTC
Attachment 200397 [details] pushed as 14b39f5 - contact-blocking-dialog: split COL_* enums
Comment 13 Guillaume Desmottes 2011-11-02 10:39:47 UTC
Created attachment 200488 [details] [review]
contact-menu: use tp-glib blocking API
Comment 14 Guillaume Desmottes 2011-11-02 10:39:49 UTC
Created attachment 200489 [details] [review]
contact-dialogs: use tp-glib blocking API
Comment 15 Guillaume Desmottes 2011-11-02 10:39:52 UTC
Created attachment 200490 [details] [review]
individual-manager: use tp-glib blocking API
Comment 16 Guillaume Desmottes 2011-11-02 10:39:55 UTC
Created attachment 200491 [details] [review]
individual dialog: use tp-glib blocking API
Comment 17 Guillaume Desmottes 2011-11-02 10:39:57 UTC
Created attachment 200492 [details] [review]
remove old blocking API
Comment 18 Danielle Madeley 2011-11-02 10:56:43 UTC
Review of attachment 200488 [details] [review]:

++
Comment 19 Danielle Madeley 2011-11-02 10:57:33 UTC
Review of attachment 200489 [details] [review]:

++
Comment 20 Danielle Madeley 2011-11-02 10:58:13 UTC
Review of attachment 200490 [details] [review]:

++
Comment 21 Danielle Madeley 2011-11-02 10:58:47 UTC
Review of attachment 200491 [details] [review]:

++
Comment 22 Danielle Madeley 2011-11-02 10:59:56 UTC
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?
Comment 23 Guillaume Desmottes 2011-11-02 11:44:59 UTC
(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.
Comment 24 Guillaume Desmottes 2011-11-08 12:32:47 UTC
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