[PATCH] Folder icons reflect contents

Remi Villatel maxilys at tele2.fr
Tue Aug 8 21:43:30 BST 2006


On 2006-08-08 20:13, Aaron J. Seigo wrote:

	[---CUT---]

>> *kdebase/libkonq/kfileivi.cc.diff*



> your patch will fail if the folder icon doesn't start with "folder". probably 
> a more comprehensive fix would be to use something like:


Well, at least, that's already an improvement compared to what's 
currently available.

 
> 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 
an overlay is allowed only over directory icons that look like a 
folder... and in that case my patch goes in the right direction.

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

-- 
==================
Remi Villatel
maxilys_ at _tele2.fr
==================




More information about the kde-core-devel mailing list