Icon choosing in kedittoolbar

David Faure faure at kde.org
Wed Apr 28 11:11:55 BST 2004


I implemented today something that I wanted to do for a long time:
being able to set a custom icon to an action in kedittoolbar.
(I was reminded by wish #80450, but I'm sure there are older wishes for it)

It works perfectly, see attached patch (which also factorizes some code)
     - except that one cannot choose the icon :-}
KIconChooser is in libkio (kio/kfile/) since it needs KFileDialog, and
KEditToolbar is in kdeui so it can't use it.

The only solutions I can think of are:
1) using KProcess to launch "kdialog --chooseicon" (which doesn't exist yet)
2) moving KEditToolbar to kio/kfile - but this isn't BC, for the (rare?) applications
    that would use kdeui and not kio.
3) waiting for KDE 4 before moving kedittoolbar to kio/kfile :(
4) implementing a custom iconchooser with no filedialog. Code duplication and limited functionality...

Any other solution I'm missing?
I guess 1) is the best bet, assuming that the window manager behaves properly
(--embed <winid> will make it modal to the kedittoolbar dialog, right?).

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: changeicon.diff
Type: text/x-diff
Size: 20705 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040428/a9988937/attachment.diff>


More information about the kde-core-devel mailing list