[X2Go-Commits] [x2goclient] 109/173: pulsemanager.{cpp, h}: add new function start_generic () to split off common functionality.

git-admin at x2go.org git-admin at x2go.org
Wed Jun 1 22:25:26 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 6b0238d082538d23f11b73deb811210a0dec47a4
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Fri Oct 30 03:31:00 2015 +0100

    pulsemanager.{cpp,h}: add new function start_generic () to split off common functionality.
---
 debian/changelog     |    2 ++
 src/pulsemanager.cpp |   19 +++++++++++++++++++
 src/pulsemanager.h   |    1 +
 3 files changed, 22 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index e8e6851..c6c860f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -210,6 +210,8 @@ x2goclient (4.0.5.2-0x2go1) UNRELEASED; urgency=medium
     - pulsemanager.cpp: add Windows support to shutdown ().
     - pulsemanager.cpp: add cleanup support to on_pulse_finished ().
     - pulsemanager.cpp: add Windows stuff to initial env in constructor.
+    - pulsemanager.{cpp,h}: add new function start_generic () to split off
+      common functionality.
 
   [ Mike DePaulo ]
   * New upstream release (4.0.5.2):
diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp
index 8bb901e..6a3e9d8 100644
--- a/src/pulsemanager.cpp
+++ b/src/pulsemanager.cpp
@@ -80,6 +80,25 @@ void PulseManager::start () {
   }
 }
 
+void PulseManager::start_generic () {
+  pulse_server_->setProcessEnvironment (env_);
+  pulse_server_->setWorkingDirectory (server_working_dir_);
+
+  pulse_server_->start (server_binary_, server_args_);
+  if (pulse_server_->waitForStarted ()) {
+    x2goDebug << "pulse started with arguments" << server_args_ << "; waiting for finish...";
+    state_ = QProcess::Running;
+
+    connect (pulse_server_, SIGNAL (finished (int)),
+             this,          SLOT (slot_on_pulse_finished (int)));
+
+#ifdef DEBUG
+    // Give PA a little time to come up.
+    QTimer::singleShot (3000, this, SLOT (slot_play_startup_sound ()));
+#endif // defined (DEBUG)
+  }
+}
+
 void PulseManager::start_osx () {
   if (generate_server_config () && generate_client_config ()) {
     cleanup_client_dir ();
diff --git a/src/pulsemanager.h b/src/pulsemanager.h
index e5f4b87..be94414 100644
--- a/src/pulsemanager.h
+++ b/src/pulsemanager.h
@@ -62,6 +62,7 @@ class PulseManager: public QObject {
     void start_win ();
     // FIXME
     void start_linux ();
+    void start_generic ();
     void find_port (bool search_esd = false);
     bool generate_server_config ();
     bool generate_client_config ();

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