[PATCH] Set program icon name by KAboutData

Olivier Goffart ogoffart at kde.org
Sat Apr 19 23:13:45 BST 2008


Le samedi 19 avril 2008, Friedrich W. H. Kossebau a écrit :
> Hi,
>
> I would like to propose to extend KAboutData about the property
> programIconName.
>
> While trying to find out what icon (names) are to be used for a program I
> saw that in the process to follow the freedesktop icon naming spec for
> those programs that use such an adapted icon (name) which differs from the
> program name there was an extra call added to (re)set the window icon, like
> QApplication::setWindowIcon( KIcon( "utilities-file-archiver" ) ); This is
> needed because KApplication sets on start the icon by the
> componentName, which is KAboutData->appName():
> 	q->setWindowIcon(KIcon(componentData.componentName()));
>
> I feel that a call like
> 	aboutData.setProgramIconName( "utilities-file-archiver" );
> would be much more consistent and readable for our plain developer.
> And KApplication would be adapted to simply use
> 	q->setWindowIcon(KIcon(componentData.aboutData()->programIconName()));
>
> Attached patch extends KAboutData about the property programIconName and
> makes KApplication use that property.
>
> Okay to apply on next Monday? I will also adapt all programs which directly
> set the icon.
>
> Friedrich

I don't like the word "program" but it's consistant with the rest of the 
KAboutData API.  (component would be more accurate)

You are missing the @since 4.1
You should document that the default value is the name of the component

But the code looks ok for me.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080420/3292f357/attachment.sig>


More information about the kde-core-devel mailing list