[X2Go-Commits] [x2goclient] 116/138: pulsemanager.cpp: make startup sound playing via slot_play_startup_sound () Windows-compatible.

git-admin at x2go.org git-admin at x2go.org
Mon Jan 18 22:48:55 CET 2016


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch bugfix/osx
in repository x2goclient.

commit 786bfbb8b720f290f3206ed29a35ce018760ad42
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Fri Oct 30 03:47:37 2015 +0100

    pulsemanager.cpp: make startup sound playing via slot_play_startup_sound () Windows-compatible.
---
 debian/changelog     |    2 ++
 src/pulsemanager.cpp |   17 ++++++++++++++---
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f30fc1c..22c9557 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -213,6 +213,8 @@ x2goclient (4.0.5.1-0x2go1) UNRELEASED; urgency=low
     - pulsemanager.cpp: make generate_server_config () Windows-compatible.
     - pulsemanager.cpp: make generate_client_config () Windows-compatible.
     - pulsemanager.cpp: only play startup sound if DEBUG macro is defined.
+    - pulsemanager.cpp: make startup sound playing via
+      slot_play_startup_sound () Windows-compatible.
   * debian/control:
     - Change apache2-dev | libc6-dev build dependency back to apache2-dev
       only. Otherwise, apache2-dev is not installed at all, even though
diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp
index 421e54b..512b027 100644
--- a/src/pulsemanager.cpp
+++ b/src/pulsemanager.cpp
@@ -294,11 +294,22 @@ void PulseManager::create_client_dir () {
 void PulseManager::slot_play_startup_sound () {
 #ifdef DEBUG
   QProcess play_file (0);
+  QString play_file_binary = QString (app_dir_);
+  QString play_file_file = play_file_binary;
 
-  play_file.setWorkingDirectory (pulse_server_->workingDirectory ());
+#ifdef Q_OS_DARWIN
+  play_file_binary += "/../exe/paplay";
+  play_file_file += "/../Resources/startup.wav";
+#elif defined (Q_OS_WIN)
+  playFileBinary += "/pulse/paplay.exe";
+  playFileFile += "/startup.wav";
+#endif // defined (Q_OS_DARWIN)
+
+  QStringList args;
+  args << play_file_file;
+  play_file.setWorkingDirectory (server_working_dir_);
   play_file.setProcessEnvironment (env_);
-  play_file.start (app_dir_ + "/../exe/paplay "
-                   + app_dir_ + "/../Resources/startup.wav");
+  play_file.start (play_file_binary, args);
 
   if (play_file.waitForStarted ())
     play_file.waitForFinished ();

--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git


More information about the x2go-commits mailing list