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

List:       kde-panel-devel
Subject:    Re: Review Request: Keyboard navigation for calendar applet
From:       "Farhad Hedayati Fard" <hf.farhad () gmail ! com>
Date:       2011-02-24 5:41:17
Message-ID: 20110224054117.4737.21828 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On Feb. 23, 2011, 8:02 p.m., Marco Martin wrote:
> > libs/plasmaclock/calendar.cpp, line 212
> > <http://git.reviewboard.kde.org/r/100718/diff/3/?file=9968#file9968line212>
> > 
> > those ifs can be replaced by a switch, since it's just an enum

replace by a switch!


> On Feb. 23, 2011, 8:02 p.m., Marco Martin wrote:
> > libs/plasmaclock/calendar.cpp, line 219
> > <http://git.reviewboard.kde.org/r/100718/diff/3/?file=9968#file9968line219>
> > 
> > if isn't used, remove it alltogether

ops :D I just forgot to add the code for them here :P they're used to navigate one \
week forward/backward, added the code :)


- Farhad


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


On Feb. 23, 2011, 7:27 p.m., Farhad Hedayati Fard wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100718/
> -----------------------------------------------------------
> 
> (Updated Feb. 23, 2011, 7:27 p.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Summary
> -------
> 
> Added some keyboard shortcuts through "keyPressEvent"s 
> Key_Right -> next month
> Key_Left -> previous month
> Key_Return and Key_Enter -> today
> Key_PageUp -> next year
> Key_PageDown -> previous year
> 
> 
> This addresses bug https://bugs.kde.org/show_bug.cgi?id=249866.
> http://bugs.kde.org/show_bug.cgi?id=https://bugs.kde.org/show_bug.cgi?id=249866
> 
> 
> Diffs
> -----
> 
> libs/plasmaclock/calendar.h f0f1c09 
> libs/plasmaclock/calendar.cpp 57eecd6 
> libs/plasmaclock/clockapplet.h b75f286 
> libs/plasmaclock/clockapplet.cpp e81d549 
> plasma/generic/applets/calendar/calendar.h 94cbe93 
> plasma/generic/applets/calendar/calendar.cpp c83b9ee 
> 
> Diff: http://git.reviewboard.kde.org/r/100718/diff
> 
> 
> Testing
> -------
> 
> works fine here!
> 
> 
> Thanks,
> 
> Farhad
> 
> 


[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/100718/">http://git.reviewboard.kde.org/r/100718/</a>
  </td>
    </tr>
   </table>
   <br />








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On February 23rd, 2011, 8:02 p.m., <b>Marco \
Martin</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/100718/diff/3/?file=9968#file9968line212" \
style="color: black; font-weight: bold; text-decoration: \
underline;">libs/plasmaclock/calendar.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 3)

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

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
"></pre></td>  <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: \
0; ">void Calendar::keyPressEvent(QKeyEvent* event)</pre></td>

  </tr>
 </tbody>




 
 



 <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">212</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="k">if</span> <span class="p">(</span><span class="n">event</span><span \
class="o">-&gt;</span><span class="n">key</span><span class="p">()</span> <span \
class="o">==</span> <span class="n">Qt</span><span class="o">::</span><span \
class="n">Key_Right</span><span class="p">)</span> <span \
class="p">{</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;">those ifs can be \
replaced by a switch, since it&#39;s just an enum</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;">replace by \
a switch!</pre> <br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On February 23rd, 2011, 8:02 p.m., <b>Marco \
Martin</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/100718/diff/3/?file=9968#file9968line219" \
style="color: black; font-weight: bold; text-decoration: \
underline;">libs/plasmaclock/calendar.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 3)

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

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
"></pre></td>  <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: \
0; ">void Calendar::keyPressEvent(QKeyEvent* event)</pre></td>

  </tr>
 </tbody>




 
 



 <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">219</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="ew">      </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;">if isn&#39;t used, \
remove it alltogether</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;">ops :D I \
just forgot to add the code for them here :P they&#39;re used to navigate one week \
forward/backward, added the code :)</pre> <br />




<p>- Farhad</p>


<br />
<p>On February 23rd, 2011, 7:27 p.m., Farhad Hedayati Fard wrote:</p>






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

<div>Review request for Plasma.</div>
<div>By Farhad Hedayati Fard.</div>


<p style="color: grey;"><i>Updated Feb. 23, 2011, 7:27 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;">Added some keyboard shortcuts through &quot;keyPressEvent&quot;s  \
Key_Right -&gt; next month Key_Left -&gt; previous month
Key_Return and Key_Enter -&gt; today
Key_PageUp -&gt; next year
Key_PageDown -&gt; previous year</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;">works fine here!</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=https://bugs.kde.org/show_bug.cgi?id=249866">https://bugs.kde.org/show_bug.cgi?id=249866</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>libs/plasmaclock/calendar.h <span style="color: grey">(f0f1c09)</span></li>

 <li>libs/plasmaclock/calendar.cpp <span style="color: grey">(57eecd6)</span></li>

 <li>libs/plasmaclock/clockapplet.h <span style="color: grey">(b75f286)</span></li>

 <li>libs/plasmaclock/clockapplet.cpp <span style="color: grey">(e81d549)</span></li>

 <li>plasma/generic/applets/calendar/calendar.h <span style="color: \
grey">(94cbe93)</span></li>

 <li>plasma/generic/applets/calendar/calendar.cpp <span style="color: \
grey">(c83b9ee)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/100718/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