Review Request: Add IconThemePath to org.kde.StatusNotifierItem 1/2

Aurélien Gâteau agateau at kde.org
Thu Mar 11 23:44:34 CET 2010



> On 2010-03-11 17:53:03, Marco Martin wrote:
> > hmm, i just want to be really sure about a concrete use case before adding stuff to the api.
> > also, couldn't apps just pass an absolute path if they don't want to use the default theme?

It's not about using a different theme: it's about applications providing icons which are not part of a theme. For example, I ported KAlarm to KStatusNotifierItem: it uses custom images as overlays to indicate specific states. These images are installed in $KDEDIR/share/apps/kalarm/icons/hicolor/8x8/emblems/. Without IconThemePath, the visualisation has no way to load them.

Using an absolute path is not the way to go because it would prevent visualisation from picking an appropriate size for the images.

This is even more important for dbusmenu* because applications often provide custom action icons.

*: These two patches are indeed the beginning of me sending dbusmenu patches for review to trunk :)


- Aurélien


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3261/#review4475
-----------------------------------------------------------


On 2010-03-11 17:04:44, Aurélien Gâteau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/3261/
> -----------------------------------------------------------
> 
> (Updated 2010-03-11 17:04:44)
> 
> 
> Review request for Plasma.
> 
> 
> Summary
> -------
> 
> (This is part 1/2 of the IconThemePath patch, part 2 is here: http://reviewboard.kde.org/r/3262/ )
> 
> Applications may wish to use icons which are installed in $KDEDIR/share/apps/$app/icons in their StatusNotifierItem. To do so they need to publish the dir where these icons are installed. This can be done by adding an IconThemePath property to the StatusNotifierItem, pointing to an application-specif icon theme dir.
> 
> The patch adds the property and initialize it with the first dir returned by KGlobal::dirs()->findDirs("appdata", "icons")
> 
> 
> Diffs
> -----
> 
>   trunk/KDE/kdelibs/kdeui/notifications/kstatusnotifieritem.cpp 1101797 
>   trunk/KDE/kdelibs/kdeui/notifications/kstatusnotifieritemdbus_p.h 1101797 
>   trunk/KDE/kdelibs/kdeui/notifications/kstatusnotifieritemdbus_p.cpp 1101797 
>   trunk/KDE/kdelibs/kdeui/notifications/kstatusnotifieritemprivate_p.h 1101797 
>   trunk/KDE/kdelibs/kdeui/notifications/org.kde.StatusNotifierItem.xml 1101797 
>   trunk/KDE/kdelibs/kdeui/tests/kstatusnotifieritemtest.cpp 1101797 
> 
> Diff: http://reviewboard.kde.org/r/3261/diff
> 
> 
> Testing
> -------
> 
> (To test you need to apply http://reviewboard.kde.org/r/3262/ which makes the systemtray applet aware of this new property)
> 
> - Create $KDEDIR/share/apps/kstatusnotifieritem/icons/hicolor/22x22/
> - Copy a 22x22 icon in this dir under the name customicon.png
> - Start kstatusnotifieritemtest with "--active-icon customicon.png"
> - Icon in the systemtray applet should be customicon.png
> 
> 
> Thanks,
> 
> Aurélien
> 
>



More information about the Plasma-devel mailing list