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 685971 - Missing phone icon in contact list
Missing phone icon in contact list
Status: RESOLVED OBSOLETE
Product: empathy
Classification: Core
Component: Contact List
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
Depends on: 699865
Blocks:
 
 
Reported: 2012-10-11 13:20 UTC by Frederic Peters
Modified: 2018-05-22 15:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (5.63 KB, patch)
2013-03-12 00:04 UTC, Serhat Rıfat Demircan
needs-work Details | Review

Description Frederic Peters 2012-10-11 13:20:53 UTC
I initiated a conversation with a contact and was surprised as I noticed the phone icon the tab of the chat dialog, I checked and it didn't appear in the contact list, but it did appear in the contact tooltip.

Maybe the contact list is not refreshed correctly when a contact switches to a mobile?
Comment 1 Serhat Rıfat Demircan 2013-03-04 21:15:24 UTC
Hi,

I fixed this bug and pushed changes my public repository on github[1](it is at devel branch).
My commit is here[2].


[1] - git@github.com:sdemircan/empathy.git
[2] - https://github.com/sdemircan/empathy/commit/58976fa8379f93e731eb152802f20d72ad853775
Comment 2 Xavier Claessens 2013-03-07 11:10:48 UTC
Thanks for your contribution. A few review comments:

- You can also remove the code that updates phone_icon from update_presence_msg().

- You can call update_phone_icon() from empathy_roster_contact_constructed() like all other update_*() functions.

- Change notification is a bit tricky, because empathy_individual_get_client_types() returns the clients types of the most available tp_contact. So you need to monitor which of the individual's tp_contact is the most available, then monitor the client types of that tp_contact.

- You should not declare variables in the middle of a code block. We do old-school C ;-)
Comment 3 Xavier Claessens 2013-03-07 11:45:21 UTC
(In reply to comment #2)
> - Change notification is a bit tricky, because
> empathy_individual_get_client_types() returns the clients types of the most
> available tp_contact. So you need to monitor which of the individual's
> tp_contact is the most available, then monitor the client types of that
> tp_contact.

Quickly discussed this with Guillaume, and we think the best is to add a client-types property in FolksPresenceDetails[1]. Then FolksIndividual will be responsible to expose the client-types of its most available persona, and emit change notification.

[1] http://telepathy.freedesktop.org/doc/folks/c/FolksPresenceDetails.html#FolksPresenceDetails.properties
Comment 4 Travis Reitter 2013-03-07 16:47:51 UTC
Xavier, that approach seems reasonable. There's a model from Telepathy we can follow here, right? Ie, is there some well-known set of strings for PC, mobile phone, tablet (is that separate?), etc.?
Comment 5 Serhat Rıfat Demircan 2013-03-12 00:04:10 UTC
Created attachment 238646 [details] [review]
Patch

i have added client_types property to both Folks.PresenceDetails and impelemented in Folks.Individual and Tpf.Persona.
Comment 6 Xavier Claessens 2013-03-12 09:25:47 UTC
Travis: telepathy spec defines the possible client types: http://telepathy.freedesktop.org/spec/Connection_Interface_Client_Types.html

Serhat: the patch looks good to me at first glance, but I'll let travis do the proper review since he knows Folks better than myself. Thanks for your work!
Comment 7 Philip Withnall 2013-03-20 23:55:48 UTC
Review of attachment 238646 [details] [review]:

Pretty complete. Just a few niggles (mostly documentation issues). One omission is that this.client_types needs to be set to an empty array in Tpf.Persona.from_cache() (around line 1230 of tpf-persona.vala). Thanks.

::: backends/telepathy/lib/tpf-persona.vala
@@ +255,3 @@
+   * The Persona's client types.
+   *
+   * See {@link Folks.PresenceDetails.presence_message}.

Do you mean “See {@link Folks.PresenceDetails.client_types}.”?

This needs a “@since UNRELEASED” line.

@@ +1275,3 @@
+      var contact = (Contact?) this._contact.get ();
+      assert (contact != null); /* should never be called while cached */
+      this.client_types = contact.get_client_types();

Need a space before the ‘()’.

::: folks/individual.vala
@@ +241,3 @@
+  
+  /**
+   * {@inheritDoc}

This needs a “@since UNRELEASED” line.

@@ +1603,3 @@
               this.presence_message != presence_message ||
+              this.presence_status != presence_status ||
+              this.client_types!= client_types)

Missing space before the ‘!=’.

::: folks/presence-details.vala
@@ +103,2 @@
   /**
+   * The contact's client types.

This needs more description of what a ‘client type’ is, and what values one could expect to see in this property.

It also needs a “@since UNRELEASED” line.
Comment 8 Travis Reitter 2013-03-21 00:01:00 UTC
Review of attachment 238646 [details] [review]:

This should add to tests/telepathy/individual-properties.vala to check for client_type as it does for presence_status. You'll need to add to libtp-test-contactlist (in tests/lib/telepathy/contactlist/) as necessary. See the way it deals with presence.

Please also update NEWS to mention the new API (see farther down in the NEWS file for the format we report them in).

And, thanks for this work. It will be handy!
Comment 9 Travis Reitter 2013-03-21 00:01:01 UTC
Review of attachment 238646 [details] [review]:

This should add to tests/telepathy/individual-properties.vala to check for client_type as it does for presence_status. You'll need to add to libtp-test-contactlist (in tests/lib/telepathy/contactlist/) as necessary. See the way it deals with presence.

Please also update NEWS to mention the new API (see farther down in the NEWS file for the format we report them in).

And, thanks for this work. It will be handy!
Comment 10 Travis Reitter 2013-05-07 18:29:06 UTC
Serhat, could you please make the changes above and re-submit for review?

Thanks in advance.
Comment 11 Travis Reitter 2013-05-07 19:10:43 UTC
Whoops, I didn't mean to re-purpose this for the Folks portion. I've cloned this as bug #699865 to track that dependency.
Comment 12 GNOME Infrastructure Team 2018-05-22 15:48:31 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/empathy/issues/600.