kwo pushed a commit to branch master.

http://git.enlightenment.org/e16/e16.git/commit/?id=42447b16d301b97a7b18666849e74f5550505152

commit 42447b16d301b97a7b18666849e74f5550505152
Author: Kim Woelders <k...@woelders.dk>
Date:   Fri May 1 19:06:07 2020 +0200

    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.
---
 configure.ac |  2 +-
 src/sound.c  | 21 +++++++++++++++++----
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index d3e615d0..3dae8a8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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)
diff --git a/src/sound.c b/src/sound.c
index a47bb72f..9dc796c3 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -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 */

-- 


Reply via email to