Russell Strong wrote:
> Hi,
> 
> I have an idea for how I would like glade to handle option menus, which I
> have thought about implementing myself but from a quick look at the source...
>  It could take me quite some time to get up to speed on glade's
> implementation.  Any pointers would be appreciated on getting started.
> 
It actually isn't as hard as it might first appear.  It took me about
4-6 hours to come up to speed.  I encourage you to give it a go.  As far
as pointers are concerned, read the doc's in the source tarball, and get
yourself a decent editor (read, vim or emacs) with good tags support
:).  The glade source is a credit to Damon, very readable.  In your case
pay particular attention to the option menu specific files in gbwidgets/
and how they are called.  (All my notes/etc are at home--I'm emailing
from work).

> The problem I see with option menus is that it is not easy to attach
> callbacks to the items in the menu.  My solution has been to add a callback
> to the option menu so that when it is realised set the option menu's menu to
> a popup menu that I have created.  This is great because popup menus are
> easily configured with glade.

A possibly better solution to this would be to add an "Edit Menus..."
button to the Option Menu properties box, similar to what we have in the
Menu Bar.  Take a look at the code, have a play, submit a patch :).

> My Solution:  It would be great if I could use the property editor to tell 
> the option menu to use a menu I have already created instead of the list of
> strings it currently uses.

Andrae Muys

_______________________________________________
Glade-devel maillist  -  [EMAIL PROTECTED]
http://lists.helixcode.com/mailman/listinfo/glade-devel

Reply via email to