KIconDialog and KIconButton behavior change

Zack Rusin zackrat at att.net
Tue Apr 9 20:37:41 BST 2002


Ave,

Problem: 
when specifying user = true to 
KIconDialog::selectIcon(KIcon::Group group=KIcon::Desktop, 
KIcon::Context context=KIcon::Application, bool user=false)
there's no way of specifying a custom directory in which the dialog 
should start. This makes picking custom icons rather cumbersome, 
because whenever people pick custom icons somewhere from their home 
directories, they have to remember where those icons were. This is 
especially the case for KIconButton, from which we often call setIcon 
method to set a custom icon inside of it (the path to the icon is 
usually stored inside a config file), but then when the button is 
pressed the dialogs opens in a completely different directory from the 
one in which the icon on the button resides.

Solution:
cache the directory of the lastly picked icon in 
KIconDialog::KIconDialogPrivate and use it whenever "user = true", make 
the KIconButton call new KIconDialog::setCustomLocation method to set a 
custom starting location for the dialog whenever its setIcon method is 
called. 

Patch attached. One of the new features in KMail would really profit 
from this one. OK to commit?

Zack

-- 
"The Internet is like a gateway to the net" - Bob Dole
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iconsp.diff
Type: text/x-diff
Size: 4269 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20020409/1ca0ca5c/attachment.diff>


More information about the kde-core-devel mailing list