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 704454 - No sound played when account goes online
No sound played when account goes online
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
Depends on:
Blocks:
 
 
Reported: 2013-07-18 10:11 UTC by Xavier Claessens
Modified: 2013-07-18 11:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Move empathy_check_available_state() from utils to sound-manager (3.05 KB, patch)
2013-07-18 10:51 UTC, Xavier Claessens
accepted-commit_now Details | Review
EmpathySoundManager: Fix playing sound when account goes online. (2.57 KB, patch)
2013-07-18 10:51 UTC, Xavier Claessens
accepted-commit_now Details | Review

Description Xavier Claessens 2013-07-18 10:11:01 UTC
If there is only one disabled account, enabling it won't play sound when it connects.

This is because at the time the account's status goes to CONNECTED TpAccountManager's most-available-presence is still OFFLINE. In empathy_sound_pref_is_enabled(), empathy_check_available_state() returns FALSE and if sound is disabled when away it won't be played.
Comment 1 Xavier Claessens 2013-07-18 10:51:34 UTC
Created attachment 249486 [details] [review]
Move empathy_check_available_state() from utils to sound-manager

It is used only from one place, there is no reason to have it
in utils.
Comment 2 Xavier Claessens 2013-07-18 10:51:37 UTC
Created attachment 249487 [details] [review]
EmpathySoundManager: Fix playing sound when account goes online.

We need to use the requested presence instead of the current presence
to check if we should play sound, because in the case of an account
that just got connected, its current presence may still be OFFLINE.
Comment 3 Guillaume Desmottes 2013-07-18 10:54:45 UTC
Review of attachment 249486 [details] [review]:

++
Comment 4 Guillaume Desmottes 2013-07-18 10:57:36 UTC
Review of attachment 249487 [details] [review]:

++
Comment 5 Xavier Claessens 2013-07-18 11:02:57 UTC
Merged in master.