create_menubar function



Hi,  It's almost a year since I wrote to this list, but
I hope I didn't miss much. I'm just getting back to using
GTK, the last version I was using was 1.2.0 (just as it came out).

I am now porting a Motif application over to GTK,
unfortunately I couldn't get GTK to compile on AIX 4.1, so
that version of my application has to stay in Motif.
But I'm trying to get my application to GTK for Solaris.

So now my problem. I need to make menu bars with accelerators,
and when I tried using the menu factory, it mistook a menu name
"Lock / Unlock" as another submenu.  Since this menu name is
a requirement, I need to keep it in.  So I went over to the "hard" way
of handling menus. Now I fought with accelerators and I'm still
finding bugs.

Since I read a lot of people having problems with the manual menu
I came up with a "simpler"  way of handling menubars.  But since
I'm new to this, I was hoping that someone with a little time and
curiosity could take a look at it and give some pointers.

Since I've read on this list a lot of people having trouble
with the manual menus, but can't use the menu factory, this
function may be worth while.

I made this quickly and it can (and should) be done more 
properly. But please take a look at this code.

It can be found at
http://home.stny.rr.com/rostedt/gtk

createmenu.c contains the create_menubar function that does all
the work.

createmenu.h is the header to go along with it (obviously)

testcreatemenu.c contains some code on how to use it.

Makefile - if you don't know, don't bother.

createmenu.tgz - is a tarball that contains the previous 4 files.
 NOTE: This tarball DOES NOT create a separate directory,
    so please make a directory, cd to it, THEN try this out.

TIA

Steven Rostedt
rostedt@goodmis.org

If you have a comment that you don't think the
rest of the world should see, please email me directly
so that the rest of the gtk-list won't have to get it.
Thank you.

Also note, I tried to send from my home account, but
that mailing address is not on the gtk-list. So if 
you mail to me, use the "rostedt@goodmis.org" instead
of the reply. Thats my work address, and I'm off for a 
week.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]