diff options
author | Sjoerd Simons <sjoerd@luon.net> | 2013-01-03 18:42:13 +0800 |
---|---|---|
committer | Sjoerd Simons <sjoerd@luon.net> | 2013-01-03 22:30:47 +0800 |
commit | 55ce28ebe490bc803dd524970ebb187402bb6031 (patch) | |
tree | 9add34c7bd5b98583fa64feb6ed04c2a7d168dfb /libempathy/empathy-utils.c | |
parent | 05c170e3de251f2161e9ff5bb1eac4785cdc91da (diff) | |
download | gsoc2013-empathy-55ce28ebe490bc803dd524970ebb187402bb6031.tar gsoc2013-empathy-55ce28ebe490bc803dd524970ebb187402bb6031.tar.gz gsoc2013-empathy-55ce28ebe490bc803dd524970ebb187402bb6031.tar.bz2 gsoc2013-empathy-55ce28ebe490bc803dd524970ebb187402bb6031.tar.lz gsoc2013-empathy-55ce28ebe490bc803dd524970ebb187402bb6031.tar.xz gsoc2013-empathy-55ce28ebe490bc803dd524970ebb187402bb6031.tar.zst gsoc2013-empathy-55ce28ebe490bc803dd524970ebb187402bb6031.zip |
Recognize both handheld and phone clienttypes as mobile devices
Empathy currently displays a phone icon for clients which indicate that
they're phones. However some mobile clients use the "handheld" client
type instead (e.g. Xabber on android devices).
While changing things around, i've also refactored the code a bit to
ensure that the determination will stay consistent in the various
location if it's changed in future.
Diffstat (limited to 'libempathy/empathy-utils.c')
-rw-r--r-- | libempathy/empathy-utils.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c index a7ae0bdd7..191544fbf 100644 --- a/libempathy/empathy-utils.c +++ b/libempathy/empathy-utils.c @@ -1122,6 +1122,20 @@ while_finish: *can_video_call = can_video; } +gboolean +empathy_client_types_contains_mobile_device (const GStrv types) { + int i; + + if (types == NULL) + return FALSE; + + for (i = 0; types[i] != NULL; i++) + if (!tp_strdiff (types[i], "phone") || !tp_strdiff (types[i], "handheld")) + return TRUE; + + return FALSE; +} + static FolksIndividual * create_individual_from_persona (FolksPersona *persona) { |