[X2Go-Commits] [x2goclient] 17/18: src/pulsemanager.cpp: deduplicate warning/error messages - make use of show_startup_warning ().

git-admin at x2go.org git-admin at x2go.org
Sat Feb 25 06:19:51 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 a0ae3bc28afd04a8e5374e2c2d76177153e1097b
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sat Feb 25 05:07:13 2017 +0100

    src/pulsemanager.cpp: deduplicate warning/error messages - make use of show_startup_warning ().
    
    This does imply changes to the translation files, coming up next.
---
 debian/changelog     |    3 +++
 src/pulsemanager.cpp |   24 +++++++-----------------
 2 files changed, 10 insertions(+), 17 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 7b706f4..e4f1d21 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -114,6 +114,9 @@ x2goclient (4.1.0.1-0x2go1) UNRELEASED; urgency=medium
       could not be found in the constructor. We can live without PA and will
       show a warning message to the user later on when PA is supposed to be
       started.
+    - src/pulsemanager.cpp: deduplicate warning/error messages - make use of
+      show_startup_warning (). This does imply changes to the translation
+      files, coming up next.
 
   [ Oleksandr Shneyder ]
   * New upstream version (4.1.0.1):
diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp
index 69d909a..0a3e193 100644
--- a/src/pulsemanager.cpp
+++ b/src/pulsemanager.cpp
@@ -247,17 +247,14 @@ void PulseManager::start_generic () {
         QTimer::singleShot (3000, this, SLOT (slot_play_startup_sound ()));
       }
     }
+    else {
+      x2goErrorf (27) << "PulseAudio failed to start! Sound support will not be available.";
+      show_startup_warning ();
+    }
   }
   else {
-    x2goErrorf (27) << "PulseAudio failed to start! Sound support will not be available.";
-    show_RichText_WarningMsgBox (tr ("PulseAudio failed to start!"),
-                                 tr ("Sound support will not be available.\n\n"
-                                     "If you downloaded the bundled, pre-compiled version from the official home page, "
-                                     "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"),
-                                 true);
+    x2goErrorf (31) << "PulseAudio not detected on system! Sound support will not be available.";
+    show_startup_warning ();
   }
 }
 
@@ -770,14 +767,7 @@ void PulseManager::slot_play_startup_sound () {
     }
     else {
       x2goErrorf (26) << "Unable to play startup sound! Something may be wrong.";
-      show_RichText_WarningMsgBox (tr ("Unable to play startup sound."),
-                                   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"),
-                                   true);
+      show_startup_warning (true);
     }
   }
 }

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