Review Request: Folderview : label when empty folder

Aaron Seigo aseigo at kde.org
Wed Jul 21 02:30:40 CEST 2010



> 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.
> 
> Iamluc wrote:
>     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.

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


- Aaron


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20100721/b9a6d0ca/attachment.html 


More information about the Plasma-devel mailing list