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

List:       kde-panel-devel
Subject:    Re: Review Request 110122: Patch to handle notifications with low timeouts masking earlier important
From:       "Marco Martin" <notmart () gmail ! com>
Date:       2013-05-03 18:27:50
Message-ID: 20130503182750.28441.21347 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On April 25, 2013, 2:02 p.m., Aaron J. Seigo wrote:
> > plasma/generic/applets/notifications/contents/ui/LastNotificationPopup.qml, line \
> > 188 <http://git.reviewboard.kde.org/r/110122/diff/1/?file=140373#file140373line188>
> >  
> > this tends to lead to accidental timers running when the code changes later (QML \
> > makes it a little too easy to accomplish that at times ;) 
> > would prefer that this stays as a single shot and is restarted as needed.
> 
> James Pike wrote:
> Yes I totally agree with you, unfortunately due to a limitation of the timer class, \
> when used from QML, this is not possible (you can't "re-arm" the timer from inside \
> of a timer callback). 
> James Pike wrote:
> I actually implemented it as you would have preferred in my first shot, this lead \
> me to discover the timer limitation. I had to re-implement it to use repeat in this \
> way later.

hmm, youcan actually call timer.restart(), that should work just fine


- Marco


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110122/#review31563
-----------------------------------------------------------


On April 25, 2013, 1:58 p.m., James Pike wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110122/
> -----------------------------------------------------------
> 
> (Updated April 25, 2013, 1:58 p.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Description
> -------
> 
> Currently the timeout of the last notification to arrive is used as a basis for \
> hiding the notification display. This means that a notification with a high timeout \
> can get hidden by a new notification arriving with a much lower timeout. 
> This patch simply changes the behaviour to, when expiring a timer, go back through \
> the stack and display the most recent unexpired timer. If all timers are expired \
> the notification is closed as before. 
> 
> This addresses bug 318295.
> http://bugs.kde.org/show_bug.cgi?id=318295
> 
> 
> Diffs
> -----
> 
> plasma/generic/applets/notifications/contents/ui/LastNotificationPopup.qml 2fa1b11 
> 
> Diff: http://git.reviewboard.kde.org/r/110122/diff/
> 
> 
> Testing
> -------
> 
> Test script in https://bugs.kde.org/show_bug.cgi?id=318295
> 
> 
> Thanks,
> 
> James Pike
> 
> 


[Attachment #5 (text/html)]

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










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On April 25th, 2013, 2:02 p.m. UTC, <b>Aaron J. \
Seigo</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  



<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="http://git.reviewboard.kde.org/r/110122/diff/1/?file=140373#file140373line188" \
style="color: black; font-weight: bold; text-decoration: \
underline;">plasma/generic/applets/notifications/contents/ui/LastNotificationPopup.qml</a>
  <span style="font-weight: normal;">

     (Diff revision 1)

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



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">160</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span \
class="k">repeat:</span> <span class="kc">false</span></pre></td>  <th \
bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">188</font></th>  <td bgcolor="#fdfebc" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="k">repeat:</span> <span class="kc">true</span> <span class="c1">// to \
allow re-arm from onTriggered</span></pre></td>  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">this tends to lead to \
accidental timers running when the code changes later (QML makes it a little too easy \
to accomplish that at times ;)

would prefer that this stays as a single shot and is restarted as needed.</pre>
 </blockquote>



 <p>On April 25th, 2013, 2:11 p.m. UTC, <b>James Pike</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yes I totally agree with \
you, unfortunately due to a limitation of the timer class, when used from QML, this \
is not possible (you can&#39;t &quot;re-arm&quot; the timer from inside of a timer \
callback).</pre>  </blockquote>





 <p>On April 25th, 2013, 2:17 p.m. UTC, <b>James Pike</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I actually implemented \
it as you would have preferred in my first shot, this lead me to discover the timer \
limitation. I had to re-implement it to use repeat in this way later.</pre>  \
</blockquote>







</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">hmm, youcan \
actually call timer.restart(), that should work just fine</pre> <br />




<p>- Marco</p>


<br />
<p>On April 25th, 2013, 1:58 p.m. UTC, James Pike wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Plasma.</div>
<div>By James Pike.</div>


<p style="color: grey;"><i>Updated April 25, 2013, 1:58 p.m.</i></p>






<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;">Currently the timeout of the last notification to arrive is used as a \
basis for hiding the notification display. This means that a notification with a high \
timeout can get hidden by a new notification arriving with a much lower timeout.

This patch simply changes the behaviour to, when expiring a timer, go back through \
the stack and display the most recent unexpired timer. If all timers are expired the \
notification is closed as before.</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;">Test script in https://bugs.kde.org/show_bug.cgi?id=318295</pre>  </td>
 </tr>
</table>



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


 <a href="http://bugs.kde.org/show_bug.cgi?id=318295">318295</a>


</div>


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

 <li>plasma/generic/applets/notifications/contents/ui/LastNotificationPopup.qml <span \
style="color: grey">(2fa1b11)</span></li>

</ul>

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







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








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



_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


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

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