[X2Go-Commits] [x2goclient] 18/31: src/pulsemanager.{cpp, h}: add show_startup_warning () for both PA server and (debug) startup sound playback.

git-admin at x2go.org git-admin at x2go.org
Sun Mar 5 23:22:24 CET 2017


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

x2go pushed a commit to branch master
in repository x2goclient.

commit 54efae521a3ac02fc5064fc064f3592ec19f8f64
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sat Feb 25 04:57:50 2017 +0100

    src/pulsemanager.{cpp,h}: add show_startup_warning () for both PA server and (debug) startup sound playback.
---
 debian/changelog     |  2 ++
 src/pulsemanager.cpp | 20 ++++++++++++++++++++
 src/pulsemanager.h   |  2 ++
 3 files changed, 24 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index e6a1392..321e641 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -106,6 +106,8 @@ x2goclient (4.1.0.1-0x2go1) UNRELEASED; urgency=medium
       Instead of aborting hard when the version number could not be detected,
       break out of the loops only. We can make stuff work, even if the version
       is unknown. Or just continue without PA support as such.
+    - src/pulsemanager.{cpp,h}: add show_startup_warning () for both PA server
+      and (debug) startup sound playback.
 
   [ Oleksandr Shneyder ]
   * New upstream version (4.1.0.1):
diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp
index 6442b19..67d78b4 100644
--- a/src/pulsemanager.cpp
+++ b/src/pulsemanager.cpp
@@ -931,3 +931,23 @@ void PulseManager::restart () {
 QProcess::ProcessState PulseManager::state () {
   return (state_);
 }
+
+void PulseManager::show_startup_warning (bool play_startup_sound) const {
+  QString main_text, informative_text;
+
+  if (!(play_startup_sound)) {
+    main_text = tr ("Unable to play startup sound.");
+  }
+  else {
+    main_text = tr ("PulseAudio failed to start!");
+    informative_text = tr ("Sound support will not be available.") + "\n\n";
+  }
+
+  informative_text += tr ("If you downloaded the bundled, pre-compiled version from the official home page "
+                          "or the upstream Linux packages, please report a bug on:\n"
+                          "<center><a href=\"https://wiki.x2go.org/doku.php/wiki:bugs\">"
+                            "https://wiki.x2go.org/doku.php/wiki:bugs"
+                          "</a></center>\n");
+
+  show_RichText_WarningMsgBox (main_text, informative_text, true);
+}
diff --git a/src/pulsemanager.h b/src/pulsemanager.h
index 5c852ed..c9359d7 100644
--- a/src/pulsemanager.h
+++ b/src/pulsemanager.h
@@ -90,6 +90,8 @@ class PulseManager: public QObject {
 
     bool is_server_running () const;
 
+    void show_startup_warning (bool play_startup_sound = false) const;
+
 
   private slots:
     void slot_on_pulse_finished (int exit_code);

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