[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-frameworks-devel
Subject:    Re: Review Request 128043: Allow to play the default system sound (beep) instead of a specific sound
From:       Martin Klapetek <martin.klapetek () gmail ! com>
Date:       2016-05-30 17:38:05
Message-ID: 20160530173805.24041.74969 () mimi ! kde ! org
[Download RAW message or body]

--===============8754455671808127164==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128043/#review96047
-----------------------------------------------------------




src/notifybyaudio.cpp (line 58)
<https://git.reviewboard.kde.org/r/128043/#comment64961>

    But this is not correct, if you disable the sound in the config, the \
soundFilename will be empty and this will cause ::beep() to be executed. But why if I \
choose no sound?


- Martin Klapetek


On May 29, 2016, 6:15 p.m., René J.V. Bertin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128043/
> -----------------------------------------------------------
> 
> (Updated May 29, 2016, 6:15 p.m.)
> 
> 
> Review request for KDE Software on Mac OS X and KDE Frameworks.
> 
> 
> Repository: knotifications
> 
> 
> Description
> -------
> 
> This is a follow-up to discussion on the plasma-devel ML. When not running under a \
> Plasma session it would be preferable if generic alert sounds are (can be) \
> delivered using the default system sound. The easiest way to do that is to call \
> `QApplication::beep()` ; at least on OS X this will play the user's selected alert \
> sound. 
> I have implemented this for now by assuming the existence of a virtual (relative) \
> `beep` sound file that always plays the default sound.  
> In addition, this patch provides better warning feedback if a soundfile isn't found \
> (making it easier to figure out which alert is misconfigured), and will play the \
> sysbeep in that case (so that the alert doesn't go lost if it's sound-only). \
> Finally, no Phonon::AudioOutput object is created until that is actually required. 
> 
> Diffs
> -----
> 
> src/notifybyaudio.cpp 903e996 
> 
> Diff: https://git.reviewboard.kde.org/r/128043/diff/
> 
> 
> Testing
> -------
> 
> Works as expected on OS X 10.9.5
> 
> 
> Thanks,
> 
> René J.V. Bertin
> 
> 


--===============8754455671808127164==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  \
<tr>  <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/128043/">https://git.reviewboard.kde.org/r/128043/</a>
  </td>
    </tr>
   </table>
   <br />











<div>



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/128043/diff/1/?file=467231#file467231line61" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/notifybyaudio.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">58</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">QApplication</span><span class="o">::</span><span \
class="n">beep</span><span class="p">();</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">But \
this is not correct, if you disable the sound in the config, the soundFilename will \
be empty and this will cause ::beep() to be executed. But why if I choose no \
sound?</p></pre>  </div>
</div>
<br />



<p>- Martin Klapetek</p>


<br />
<p>On May 29th, 2016, 6:15 p.m. CEST, René J.V. Bertin wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for KDE Software on Mac OS X and KDE Frameworks.</div>
<div>By René J.V. Bertin.</div>


<p style="color: grey;"><i>Updated May 29, 2016, 6:15 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
knotifications
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">This is a follow-up to discussion on the plasma-devel \
ML. When not running under a Plasma session it would be preferable if generic alert \
sounds are (can be) delivered using the default system sound. The easiest way to do \
that is to call <code style="text-rendering: inherit;color: #4444cc;padding: \
0;white-space: normal;margin: 0;line-height: inherit;">QApplication::beep()</code> ; \
at least on OS X this will play the user's selected alert sound.</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">I have implemented this for now by assuming the existence of a virtual \
(relative) <code style="text-rendering: inherit;color: #4444cc;padding: \
0;white-space: normal;margin: 0;line-height: inherit;">beep</code> sound file that \
always plays the default sound. </p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">In addition, this patch \
provides better warning feedback if a soundfile isn't found (making it easier to \
figure out which alert is misconfigured), and will play the sysbeep in that case (so \
that the alert doesn't go lost if it's sound-only). Finally, no Phonon::AudioOutput \
object is created until that is actually required.</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Works as expected on OS X 10.9.5</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/notifybyaudio.cpp <span style="color: grey">(903e996)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/128043/diff/" style="margin-left: \
3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>


--===============8754455671808127164==--


[Attachment #3 (text/plain)]

_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic