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

List:       kde-panel-devel
Subject:    Re: Review Request: Folderview : label when empty folder
From:       "Iamluc" <luc () vieillescazes ! net>
Date:       2010-07-20 8:56:04
Message-ID: 20100720085604.10473.9614 () localhost
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On 2010-07-19 20:39:45, Aaron Seigo wrote:
> > /trunk/KDE/kdebase/apps/plasma/applets/folderview/iconview.cpp, lines 1234-1236
> > <http://reviewboard.kde.org/r/4519/diff/3/?file=30944#file30944line1234>
> > 
> > if it is a containment, rather than used as a widget, it probably shouldn't paint \
> > this.

Sorry, I am not sure to understand.

In Diff revision 1, instead of painting directly the message, a signal was emited to \
PopupView, which display a label with the text (As it works for the BusyWidget). Is \
this what you mean ?

Thanks for your review.


> On 2010-07-19 20:39:45, Aaron Seigo wrote:
> > /trunk/KDE/kdebase/apps/plasma/applets/folderview/iconview.cpp, lines 508-509
> > <http://reviewboard.kde.org/r/4519/diff/3/?file=30944#file30944line508>
> > 
> > this will cause a full repaint of the entire folderview widget every time the \
> > listing is completed. it would be good to find a way to trigger it only when \
> > needed. 
> > i assume this happens only when the file count change to or from 0.
> > 
> > this would probably mean having to keep some state to know when it is/was empty, \
> > and only when it becomes empty or is no longer empty then call for a full \
> > update().

It was like this in Diff revision 2. If it is OK, I can prepare a new version of the \
patch.


- Iamluc


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


On 2010-07-12 17:13:34, Iamluc wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/4519/
> -----------------------------------------------------------
> 
> (Updated 2010-07-12 17:13:34)
> 
> 
> Review request for Plasma.
> 
> 
> Summary
> -------
> 
> Hello,
> 
> This patch add a Plasma::Label with text "This folder is empty." in Folderview's \
> Popup when the folder is empty. 
> The related bug number in kde bugzilla is 201542.
> 
> Luc
> 
> 
> This addresses bug 201542.
> https://bugs.kde.org/show_bug.cgi?id=201542
> 
> 
> Diffs
> -----
> 
> /trunk/KDE/kdebase/apps/plasma/applets/folderview/iconview.cpp 1145373 
> 
> Diff: http://reviewboard.kde.org/r/4519/diff
> 
> 
> Testing
> -------
> 
> Delete/add files several times. The label disappears/appears correctly.
> 
> 
> Screenshots
> -----------
> 
> folderview empty folder
> http://reviewboard.kde.org/r/4519/s/444/
> version 2
> http://reviewboard.kde.org/r/4519/s/455/
> 
> 
> Thanks,
> 
> Iamluc
> 
> 


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








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On July 19th, 2010, 8:39 p.m., <b>Aaron 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="/r/4519/diff/3/?file=30944#file30944line508" style="color: black; font-weight: \
bold; text-decoration: \
underline;">/trunk/KDE/kdebase/apps/plasma/applets/folderview/iconview.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="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
white-space: pre-wrap; word-wrap: break-word;">void \
IconView::listingCompleted()</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; white-space: pre-wrap; \
word-wrap: break-word;"></pre></td>  <th bgcolor="#b1ebb0" style="border-left: 1px \
solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">505</font></th>  <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; white-space: pre-wrap; word-wrap: \
break-word;"></pre></td>  </tr>

  <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; white-space: pre-wrap; \
word-wrap: break-word;"></pre></td>  <th bgcolor="#b1ebb0" style="border-left: 1px \
solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">506</font></th>  <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; white-space: pre-wrap; word-wrap: break-word;">    \
<span class="n">update</span><span class="p">();</span></pre></td>  </tr>

 </tbody>

</table>

  <pre>this will cause a full repaint of the entire folderview widget every time the \
listing is completed. it would be good to find a way to trigger it only when needed.

i assume this happens only when the file count change to or from 0.

this would probably mean having to keep some state to know when it is/was empty, and \
only when it becomes empty or is no longer empty then call for a full update().</pre> \
</blockquote>





</blockquote>
<pre style="margin-left: 1em">It was like this in Diff revision 2. If it is OK, I can \
prepare a new version of the patch.</pre> <br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On July 19th, 2010, 8:39 p.m., <b>Aaron 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="/r/4519/diff/3/?file=30944#file30944line1234" style="color: black; font-weight: \
bold; text-decoration: \
underline;">/trunk/KDE/kdebase/apps/plasma/applets/folderview/iconview.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="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
white-space: pre-wrap; word-wrap: break-word;">void IconView::paint(QPainter \
*painter, const QStyleOptionGraphicsItem *option, QWidget *widget)</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; white-space: pre-wrap; \
word-wrap: break-word;"></pre></td>  <th bgcolor="#b1ebb0" style="border-left: 1px \
solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">1231</font></th>  <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; white-space: pre-wrap; word-wrap: break-word;">    \
<span class="k">if</span> <span class="p">(</span><span class="n">m_model</span><span \
class="o">-&gt;</span><span class="n">rowCount</span><span class="p">()</span> <span \
class="o">==</span> <span class="mi">0</span> <span class="o">&amp;&amp;</span> <span \
class="o">!</span><span class="n">listingInProgress</span><span class="p">())</span> \
<span class="p">{</span></pre></td>  </tr>

  <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; white-space: pre-wrap; \
word-wrap: break-word;"></pre></td>  <th bgcolor="#b1ebb0" style="border-left: 1px \
solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">1232</font></th>  <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; white-space: pre-wrap; word-wrap: break-word;">    \
<span class="n">paintMessage</span><span class="p">(</span><span \
class="n">painter</span><span class="p">,</span> <span class="n">cr</span><span \
class="p">,</span> <span class="n">i18n</span><span class="p">(</span> <span \
class="s">&quot;This folder is empty.&quot;</span> <span class="p">),</span> <span \
class="n">KIcon</span><span class="p">()</span> <span class="p">);</span></pre></td>  \
</tr>

  <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; white-space: pre-wrap; \
word-wrap: break-word;"></pre></td>  <th bgcolor="#b1ebb0" style="border-left: 1px \
solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">1233</font></th>  <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; white-space: pre-wrap; word-wrap: break-word;">    \
<span class="p">}</span></pre></td>  </tr>

 </tbody>

</table>

  <pre>if it is a containment, rather than used as a widget, it probably \
shouldn&#39;t paint this.</pre>  </blockquote>





</blockquote>
<pre style="margin-left: 1em">Sorry, I am not sure to understand.

In Diff revision 1, instead of painting directly the message, a signal was emited to \
PopupView, which display a label with the text (As it works for the BusyWidget). Is \
this what you mean ?

Thanks for your review.</pre>
<br />




<p>- Iamluc</p>


<br />
<p>On July 12th, 2010, 5:13 p.m., Iamluc wrote:</p>




<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://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 Iamluc.</div>


<p style="color: grey;"><i>Updated 2010-07-12 17:13:34</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;">Hello,

This patch add a Plasma::Label with text &quot;This folder is empty.&quot; in \
Folderview&#39;s Popup when the folder is empty.

The related bug number in kde bugzilla is 201542.

Luc</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;">Delete/add files several times. The label \
disappears/appears correctly.</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="https://bugs.kde.org/show_bug.cgi?id=201542">201542</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>/trunk/KDE/kdebase/apps/plasma/applets/folderview/iconview.cpp <span \
style="color: grey">(1145373)</span></li>

</ul>

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



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

<div>

 <a href="http://reviewboard.kde.org/r/4519/s/444/"><img \
src="http://reviewboard.kde.org/media/uploaded/images/2010/07/03/folderview_400x100.png" \
style="border: 1px black solid;" alt="folderview empty folder" /></a>

 <a href="http://reviewboard.kde.org/r/4519/s/455/"><img \
src="http://reviewboard.kde.org/media/uploaded/images/2010/07/08/folderview2_400x100.png" \
style="border: 1px black solid;" alt="version 2" /></a>

</div>


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