[PATCH] Folder icons reflect contents

Aaron J. Seigo aseigo at kde.org
Tue Aug 8 22:33:26 BST 2006


On Tuesday 08 August 2006 14:43, Remi Villatel wrote:
> > m_fileItem->iconName() != KMimeType::mimeType("inode/directory")->icon()
> >
> > as for performance, making that exact KMimeType call 1,000,000 times
> > takes ~8.7 seconds on my 1.8Ghz laptop ... so that shouldn't be a
> > problem.
>
> I think it's possible to go even faster. The original line is:
>
> if ( !m_fileitem->isDir() || m_fileitem->iconName() != "folder" )
>
> Wouldn't the following line be enough?
>
> if (!m_fileitem->isDir())
>
> The overlay can only apply to directories. To know if the item is a
> directory or not is all that matters, the icon is irrelevant... unless

the icon does matter, because it may be a directory but have a special 
non-folder icon. e.g. ~/Desktop or in the past the Trash directory (now it's 
a protocol, but yeah) .... it would look odd to have the Desktop icon with an 
overlay on it. this should be for just regular folder icons. whatever those 
are set to be =)

> an overlay is allowed only over directory icons that look like a
> folder... and in that case my patch goes in the right direction.

yes, it does go in the right direction. but there icon does matter and there 
is no guarantee that the folder icon's name is like *folder*.png

> >> Now, I'm gonna request my SVN account. I think I'm addicted to patching.
> >
> > hehe.. yep, it's quite addictive.. er.. fun! yeah. that's it. fun ;)
>
> Since you don't want to do my job, I guess I have no choice but to get
> this SVN account to satisfy my needs.  ;-)

yeah, i'm a cruel bastard sometimes ;)

-- 
Aaron J. Seigo
Undulate Your Wantonness
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060808/0709c663/attachment.sig>


More information about the kde-core-devel mailing list