GNOME Bugzilla – Bug 547658
Add client type support
Last modified: 2011-08-29 10:12:43 UTC
A lot of my friends sign off, and on the normal clients and Pidgin, it shows them as "Mobile". It's helpful to know the difference because I don't wanna send an IM and have it text my friend at midnight if she's asleep, but if she's on, it's different. So please, show a Cellphone icon instead of just the regular Online symbol, or some other distinguishing mark. Other information:
That's not something we can do without meta-contacts support (#460647). The CM is not enough to determine if a contact is a mobile phone or not (except if it's gnome-phone-manager's CM maybe). The right way to do that is with meta-contact where then we can know if the number is a mobile phone or not.
...meta-contacts? How does that have anything to do with a status? AIM doesn't give you their phone number, it just says they're mobile, and when you IM it automatically forwards it on to their phone. Same with Yahoo!.
Oh sorry, I misunderstood your bug then. Will ask to Haze dev what they think about this.
We need to extend the Telepathy specification to support this kind of status metadata – what kind of device the contact is on, their mood, what they are listening to, etc. – before Empathy can show it to you. Right now, telepathy-haze cannot tell Empathy that your friend is online from their mobile even though libpurple knows. I've filed a bug over at https://bugs.freedesktop.org/show_bug.cgi?id=17157 .
*** Bug 592287 has been marked as a duplicate of this bug. ***
*** Bug 592764 has been marked as a duplicate of this bug. ***
*** Bug 593350 has been marked as a duplicate of this bug. ***
*** Bug 600991 has been marked as a duplicate of this bug. ***
Has there been any progress on this? I have multiple friends without messaging plans with their cellular service who seem to have unknowingly opted into receiving mobile messages via aim so each time I message them I am costing them money. Currently I have stopped initiating chats with my friends as I have no idea if they are mobile or actually online/available.
I just want to add that this shouldn't just cover mobile users Pidgin supports icons for mobile users, blocked this users, users that can recieve SMS text msgs, users that have a musictracker plugin installed or is playing music on Windows and has 'Now Playing' enabled to show to their contact, users logged in using a web interface to chat, and users that are bots http://developer.pidgin.im/wiki/Using%20Pidgin#Whatdotheiconsnexttomybuddymean
Check it out. http://people.collabora.co.uk/~jonny/itsaphone.png omomomgomgomgomgogmogmgomgomgomgomgogmomg Here is my git branch. It's probably better to review the big diff as I put it all in the wrong place to start so reviewing diff by diff is a bit of a trap. http://git.collabora.co.uk/?p=user/jonny/empathy.git;a=shortlog;h=refs/heads/client-types and here's my gabble branch: http://git.collabora.co.uk/?p=user/jonny/telepathy-gabble.git;a=shortlog;h=refs/heads/client-types
and the spec is here: http://telepathy.freedesktop.org/spec-snapshot/Connection_Interface_Client_Types.html
Created attachment 166961 [details] [review] attaching diff for easiest reviewing
Review of attachment 166961 [details] [review]: I think putting the phone icon there is really confusing. It's next to the webcam button which is activatable while this one is not. I'm sure most users will think that's the button to use to make audio call. But I'm not sure of the best place to put it instead? Maybe in the corner of the avatar or something? Adding more code to EmpathyContact makes me cry, especially after we spend so much time moving its features to TpContact. Any chance to fast track the spec and implement it in TpContact instead? ::: .gitignore @@ +16,3 @@ *.loT .semanticache +.\#* emacs magic? ::: help/.gitignore @@ +14,3 @@ ru/*.xml sv/*.xml +zh_CN/*.xml This has been done in master I think. ::: libempathy/empathy-contact.c @@ +496,3 @@ + contact_connect_to_client_types_updated (contact); + + array = g_array_new (FALSE, FALSE, sizeof (TpHandle)); g_array_sized_new() ?
Created attachment 167001 [details] bcurtiswx mockup I think a better place for protocol icons and this phone icon would be next to the status message (not the icon but the text). This mockup shows an example of the way I see best for placement of the icon.
(In reply to comment #14) > I think putting the phone icon there is really confusing. It's next to the > webcam button which is activatable while this one is not. I'm sure most users > will think that's the button to use to make audio call. > But I'm not sure of the best place to put it instead? Maybe in the corner of > the avatar or something? Corner of the avatar sounds like a terrible option, tbh. :-) > Adding more code to EmpathyContact makes me cry, especially after we spend so > much time moving its features to TpContact. Any chance to fast track the spec > and implement it in TpContact instead? I'll try, but it's unavoidable because of the way our draft interfaces work. We can put it straight into tp-glib when undrafted though. Just be patient. :-) > emacs magic? Yes, http://git.collabora.co.uk/?p=user/jonny/empathy.git;a=commitdiff;h=58372c > This has been done in master I think. Okay, well git will sort that for me when merged. > g_array_sized_new() ? Okay, changed.
(In reply to comment #16) > (In reply to comment #14) > > I think putting the phone icon there is really confusing. It's next to the > > webcam button which is activatable while this one is not. I'm sure most users > > will think that's the button to use to make audio call. > > But I'm not sure of the best place to put it instead? Maybe in the corner of > > the avatar or something? > > Corner of the avatar sounds like a terrible option, tbh. :-) What about Brian's suggestion to display it next to the status message? > > This has been done in master I think. > > Okay, well git will sort that for me when merged. Just drop the commit, there is no point to create conflicts/merge if we can easily avoid them.
(In reply to comment #17) > What about Brian's suggestion to display it next to the status message? It looks fine. I don't know how I'd do that in GTK though. :-) > Just drop the commit, there is no point to create conflicts/merge if we can > easily avoid them. Yes, that's what I meant. git will sort everything out for me.
So, like, it'd be great to get this merged before folks changes absolutely everything and I have to keep rewriting my patch. I understand that you're not happy about having additions to EmpathyContact, but surely you can see that there is no way around it. If you think that you can convince smcv to suddenly say "yeah why not let's undraft after a few days as a draft" then I applaud you. :-) So, how about it? UI changes are cheap later on but there are loads of contact changes at the moment. Also, I'll buy you a beer or something.
Ok, what about this: you make the UI change (because the current one is terribly confusing) and once it's done we merge the branch. Meanwhile I'll try to convince smcv to undraft :)
Right, so I've not done any UI changes, but here's a much nicer branch that uses the upcoming client-type features in TpContact, which will appear in 0.13.1. The code is nicer, but I'm a bit crap on the UI front. :-) http://git.collabora.co.uk/?p=user/jonny/empathy.git;a=shortlog;h=refs/heads/client-types
How does this branch interact with bug #630188. Shouldn't you depend of it instead? Branch looks good but I still think this UI is horribly confusing and we should display the phone logo next to the status message as suggested in the mockup.
Well, if you ignore the first commit to port the folks stuff to their new names, then although it won't work without my folks client types branch being merged, the code in no way depends on it, so this could easily be merged before empathy is ported to folks 0.3. In fact... should we not be depending on folks to give our TpContacts the client type feature? It would make the empathy code more complex etc., but hmm. Thoughts?
FYI, Travis said it was fine to rely on the client types feature being there. So, this is ready to merge except if you want to change the UI. Feel free, Guillaume!
I got this crash when testing your branch: Lib-GObject-WARNING **: invalid cast from `FolksBackendsKfPersona' to `FolksPresence' aborting... Program received signal SIGTRAP, Trace/breakpoint trap. 0x00007fffefec7c88 in g_logv (log_domain=0x7ffff07f0190 "GLib-GObject", log_level=G_LOG_LEVEL_WARNING, format=0x7ffff07f18c8 "invalid cast from `%s' to `%s'", args1=0x7fffffffc790) at gmessages.c:553 553 G_BREAKPOINT (); (gdb) bt
+ Trace 224106
(In reply to comment #25) > I got this crash when testing your branch: > > Lib-GObject-WARNING **: invalid cast from `FolksBackendsKfPersona' to > `FolksPresence' Ah yeah sorry about that. I updated my branch to contain a fix for it but haven't been able to test it due to GTK+3 rubbishness. Anyway, that should sort it. Give it a go!
I have this crash now :( Program received signal SIGSEGV, Segmentation fault. 0x00007ffff1da88aa in folks_presence_get_presence_type (self=0x9c7530) at presence.c:186 186 return FOLKS_PRESENCE_GET_INTERFACE (self)->get_presence_type (self); (gdb) bt
+ Trace 224199
I've rebased Jonny's branch on top of master and fixed that crash. The UI changes are more complicated. It's not possible to do it with the GTK+ API, so they would need some gdk/cairo hacks to get everything into a GtkCellRenderer or a GdkPixbuf, or so it seems to me. Other alternatives would be to put the icon between the status icon and the name and status, but that wouldn't probably look quite pretty, or to put it on the bottom right corner of the status icon, but then it may be difficult to see or to know what it is. Thoughts?
There's also the question of where to display it in compact mode. If we put it in the bottom right corner in the status icon there will be no problem (except that it will be even smaller), otherwise we could put it between the status icon and the contact name.
Created attachment 174680 [details] [review] all branch diff against master Here's my branch: http://git.collabora.co.uk/?p=user/pochu/empathy.git;a=commitdiff;h=refs/heads/bug-547658 And here's the patch diffing my branch against master.
Review of attachment 174680 [details] [review]: Look's all good to me. Please remove the FIXME and feel free to merge to master. ::: libempathy-gtk/empathy-cell-renderer-text.c @@ +359,3 @@ + if (!priv->is_group && priv->types != NULL && g_strv_length (priv->types) > 0 + // FIXME: why don't we check the whole array? Because atm Empathy doesn't manage ressources so we display the "best" one.
Thanks, comment removed and branch merged. This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.