summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2006-03-06 21:40:26 +0000
committerBrian Cameron <bcameron@src.gnome.org>2006-03-06 21:40:26 +0000
commitd137c4dc4fc6eb32804ad5ccbcf95ec6ac33c478 (patch)
treed05d84ad3a01f456b8362d4acbc537852378fa0a /daemon
parentaa1dcc5bce1fd391ab85c0c807f12f7935743bf0 (diff)
downloadgdm-d137c4dc4fc6eb32804ad5ccbcf95ec6ac33c478.tar.gz
Fix sound-on-login-success and failure to only play if they are turned on.
2006-03-05 Brian Cameron <brian.cameron@sun.com> * daemon/slave.c: Fix sound-on-login-success and failure to only play if they are turned on. Previously they were playing if they were defined to have soundfiles, but not turned on. Fixes bug #333435.
Diffstat (limited to 'daemon')
-rw-r--r--daemon/slave.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/daemon/slave.c b/daemon/slave.c
index bb7ee4c7..39ca06ec 100644
--- a/daemon/slave.c
+++ b/daemon/slave.c
@@ -2047,8 +2047,8 @@ gdm_slave_wait_for_login (void)
gdm_slave_greeter_ctl_no_ret (GDM_RESET, "");
/* Play sounds if specified for a failed login */
- if (d->attached &&
- failuresound &&
+ if (d->attached && failuresound &&
+ gdm_get_value_bool (GDM_KEY_SOUND_ON_LOGIN_FAILURE) &&
! play_login_sound (failuresound)) {
gdm_error (_("Login sound requested on non-local display or the play "
"software cannot be run or the sound does not exist."));
@@ -2069,9 +2069,9 @@ gdm_slave_wait_for_login (void)
successsound = gdm_get_value_string (GDM_KEY_SOUND_ON_LOGIN_SUCCESS_FILE);
/* Play sounds if specified for a successful login */
- if (login != NULL &&
+ if (login != NULL && successsound &&
+ gdm_get_value_bool (GDM_KEY_SOUND_ON_LOGIN_SUCCESS) &&
d->attached &&
- successsound &&
! play_login_sound (successsound)) {
gdm_error (_("Login sound requested on non-local display or the play software "
"cannot be run or the sound does not exist."));