[X2Go-Commits] [x2goclient] 110/148: pulsemanager.cpp: let start_osx () use start_generic ().

git-admin at x2go.org git-admin at x2go.org
Wed May 4 23:28:56 CEST 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 546fbbbbfecc5cd1943955ebe4d65512af5d7819
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Fri Oct 30 03:37:09 2015 +0100

    pulsemanager.cpp: let start_osx () use start_generic ().
---
 debian/changelog     |    1 +
 src/pulsemanager.cpp |   41 ++++++++++++++---------------------------
 2 files changed, 15 insertions(+), 27 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 611ed42..fd018fc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -206,6 +206,7 @@ x2goclient (4.0.5.2-0x2go1) UNRELEASED; urgency=medium
     - pulsemanager.cpp: add Windows stuff to initial env in constructor.
     - pulsemanager.{cpp,h}: add new function start_generic () to split off
       common functionality.
+    - pulsemanager.cpp: let start_osx () use start_generic ().
 
   [ Mike DePaulo ]
   * New upstream release (4.0.5.2):
diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp
index 6a3e9d8..1041797 100644
--- a/src/pulsemanager.cpp
+++ b/src/pulsemanager.cpp
@@ -100,37 +100,24 @@ void PulseManager::start_generic () {
 }
 
 void PulseManager::start_osx () {
-  if (generate_server_config () && generate_client_config ()) {
-    cleanup_client_dir ();
-
-    pulse_server_->setProcessEnvironment (env_);
-
-    QStringList args;
-    args << "--exit-idle-time=-1" << "-n"
-         << "-F" << pulse_dir_.absolutePath () + "/config.pa"
-         << "-p"
-         << QDir (app_dir_
-                  + "/../Frameworks/pulse-2.0/modules").absolutePath ()
-         << "--high-priority";
+  server_args_ = QStringList ();
+  server_args_ << "--exit-idle-time=-1" << "-n"
+               << "-F" << pulse_dir_.absolutePath () + "/config.pa"
+               << "-p"
+               << QDir (app_dir_
+                        + "/../Frameworks/pulse-2.0/modules").absolutePath ()
+               << "--high-priority";
 #ifdef DEBUG
-    args << "--log-level=debug";
-#endif
-
-    pulse_server_->setWorkingDirectory (app_dir_ + "/../exe/");
-    pulse_server_->start (app_dir_ + "/../exe/pulseaudio", args);
+  server_args_ << "--log-level=debug";
+#endif // defined (DEBUG)
 
-    if (pulse_server_->waitForStarted ()) {
-      x2goDebug << "pulse started with" << args << "waiting for finish...";
-      state_ = QProcess::Running;
+  server_working_dir_ = QString (app_dir_ + "/../exe/");
+  server_binary_ = QString (server_working_dir_ + "/pulseaudio");
 
-      connect (pulse_server_, SIGNAL (finished (int)),
-               this,          SLOT (on_pulse_finished (int)));
+  if (generate_server_config () && generate_client_config ()) {
+    cleanup_client_dir ();
 
-#ifdef DEBUG
-      // Give PA a little time to come up.
-      QTimer::singleShot (5000, this, SLOT (slot_play_startup_sound ()));
-#endif // defined (DEBUG)
-    }
+    start_generic ();
   }
 }
 

--
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