<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#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">-></span><span class="n">rowCount</span><span class="p">()</span> <span class="o">==</span> <span class="mi">0</span> <span class="o">&&</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">"This folder is empty."</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't paint this.</pre>
</blockquote>
<p>On July 20th, 2010, 8:54 a.m., <b>Iamluc</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre>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>
</blockquote>
</blockquote>
<pre style="margin-left: 1em">what i mean is when Folderview is used as the Desktop Activity, we probably don't want "This folder is empty" in the middle of the screen if the desktop folder doesn't have anything in it. personally, i'd probably do something like:
if (!m_errorMessage.isEmpty()) {
paintMessage(painter, cr, m_errorMessage, KIcon("dialog-error"));
} else if (m_model->rowCount() == 0 && !listingInProgress()) {
Plasma::Containment *containment = qobject_cast<Plasma::Containment*>(parentWidget());
if (!containment || !containment->isContainment()) {
paintMessage(painter, cr, i18n( "This folder is empty." ), KIcon() );
}
}
with that change, it looks good and is a ShipIt! from me...</pre>
<br />
<p>- Aaron</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 "This folder is empty." in Folderview'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>