icons in desktop menu patch

Biju Chacko biju_chacko at vsnl.net
Mon Jan 12 11:28:33 CET 2004


On Mon, 05 Jan 2004 14:53:31 -0600, Christopher Carroll wrote:

> If anyone is interested - I made a patch to add icons to xfdesktop's
> desktop menu.  Just add icon="path/to/icon/file" to any app entry in
> menu.xml.  It also works with builtin.  Also, I'm not sure how to
> dertermine the best icon height automatically, so if you don't like the
> default of 16 you can also set icon_size="24" or whatever you like. The
> patch was made against xfdesktop-4.0.2 (should be applied with -Np1 from
> the xfdesktop top source dir).
> 
> You cannot add icons to menu items that are submenus themselves. 
> xfdesktop uses an item factory to create the menu - and I don't think
> there's a way to have an item factory do this.  If I have some free time
> before school starts back up I may write a patch that manually creates
> the items so you can set icons on these enties too.
> 
> To any developers who read this:  I noticed that this was marked as TODO
> in the source code.  My method probably isn't the best way to add icons
> (I'm really just learning gtk) so this patch probably won't be too
> useful.  But it may save you someone a little time to know that to get
> the item factory to create icons the extra_data field of the entries
> must point to a serialized GdkPixdata bytestream (rather than a
> GdkPixbuf as the comments suggest).

Looks good ... you really ought to to post this to xfce4-dev mailing list if you
want it noticed by the developers.

-- b

-- 
------------------------------------------------------------------------
Biju Chacko             http://in.redhat.com                 Red Hat Inc



More information about the Xfce mailing list