Minor cleanups after sound by audio player feature

- Correct configure.ac help string
- Issue warning if player is not executable

Also change sound server problem warning message from GSOD to dialog.
This commit is contained in:
Kim Woelders 2020-05-01 19:06:07 +02:00
parent 9a6825fadf
commit 42447b16d3
2 changed files with 18 additions and 5 deletions

View File

@ -85,7 +85,7 @@ AM_CONDITIONAL(ENABLE_GNOME, test "x$enable_hints_gnome" = "xyes")
AC_ARG_ENABLE(sound,
AC_HELP_STRING([--enable-sound],
[compile with sound support (pulseaudio/esound/sndio/no)@<:@default=pulseaudio@:>@]),,
[compile with sound support (pulseaudio/esound/sndio/player/no)@<:@default=pulseaudio@:>@]),,
enable_sound=pulseaudio)
case x$enable_sound in
xyes)

View File

@ -25,6 +25,7 @@
#if ENABLE_SOUND
#include "dialog.h"
#include "emodule.h"
#include "file.h"
#include "list.h"
#include "settings.h"
#include "sound.h"
@ -332,10 +333,22 @@ SoundInit(void)
if (!ops || ops->Init())
{
Conf_sound.enable = 0;
AlertX(_("Error initialising sound"), _("OK"), NULL, NULL,
_("Audio was enabled for Enlightenment but there was an error\n"
"communicating with the audio server (%s).\n"
"Audio will now be disabled.\n"), SOUND_SERVER_NAME);
DialogOK(_("Error initialising sound"),
_
("Audio was enabled for Enlightenment but there was an error\n"
"communicating with the audio server (%s).\n"
"Audio will now be disabled.\n"), SOUND_SERVER_NAME);
}
#elif USE_SOUND_PLAYER
if (!path_canexec0(SOUND_PLAYER_FMT))
{
Conf_sound.enable = 0;
DialogOK(_("Error initialising sound"),
_
("The sound player is not executable (%s).\n"
"Audio will now be disabled.\n"), SOUND_PLAYER_FMT);
}
#endif /* HAVE_SOUND_OPS */