xfce code help

Jannis Pohlmann jannis at xfce.org
Mon Aug 3 03:43:17 CEST 2009


On Sun, 2 Aug 2009 21:28:17 -0400
Roberto Sobral Lima <betolima1 at gmail.com> wrote:

> Hi,
> 
> 
> Really sorry for bothering with this stupid question, but I've been
> studying Xfce code for more than months now, read all tutorials and
> docs I could, and still didn't find what I'm looking for ..
> 
> I'm not quite familiar on gtk and choose xfce for learning it, and
> perhaps, I wish, contribute with free software someday .. for start
> I'd like to add some fancy features on menu, like "windows style
> right-click to add or remove entries" kind of thing ..

Ugh, don't start with this one. Menu editing is actually quite complex
and will only get you frustrated unless you know what you're doing. I'd
suggest to wait with it until garcon, the rewrite of libxfce4menu,
matures and gains a menu editing API which will allow you to implement
this feature with a few lines of code.
 
> After a lot of thinking and
> compiling/gdb'ing/erasing/screeming/keyboard breaking, I still pretty
> much lost in how xfce uses all those xfce_menubutton, xfce-menu-item,
> xfce-appmenuitem .. specially where to attach a signal for right
> clicks ... 

The correct signal for right clicks should be the 'button-press-event'
signal of the GtkMenuItem that is created based on XfceMenuItems in
xfdesktop/modules/menu/desktop-menu.c.

> I tried a lot of combinations but every time it lacks
> something, sometimes the component doesn't accept the signal,
> sometimes doesn't have the information about the menu file where it
> comes from ..

http://standards.freedesktop.org/menu-spec/menu-spec-latest.html - this
is where the menu format is defined. Again, it's relatively complex and
you might want to start with something easier.

  - Jannis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://mail.xfce.org/pipermail/xfce4-dev/attachments/20090803/02baeb3d/attachment.pgp>


More information about the Xfce4-dev mailing list