On Thu, May 11, 2006 at 08:58:33AM -0500, Jonathon Jongsma wrote: > On 5/11/06, Mohammed Sameer <msameer foolab org> wrote: > >Hi all, > >I'm still a gtkmm newbie. > > > >I'm subclassing Gtk::Window and creating a menubar in the > >constructor "see the attached code please". > > > >The menubar is created but it has no sub menus, > >Did I hit a bug ? Or am I doing something wrong ? > > > >Attached a code sample: > >g++ -o m m.cc `pkg-config gtkmm-2.4 --cflags --libs` > > > > I haven't looked at your example code closely yet, but I would highly > recommend that you look into using UIManager instead of building the > menus manually. UIManager offers a lot of advantages, including > easily defining a menu structure as an XML tree. In addition, it > allows you to define menu items in terms of "Actions". You can then > assign the same action to a toolbar button so that the Open item in > your menu and the Open button on your toolbar will do exactly the same > thing. Because of this, you can then enable / disable these two > things together, and other things. I've found it to be very easy to > use. See this section in the tutorial for information: > http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch11.html I know about the UIManager but I'm porting from C/Gtk to C++/Gtkmm. I really don't want to change the way I build the UI as I want it to run on older gtkmm versions as well. There's also the "hacker" attitude, You can't hit a problem and simply switch to another approach before understanding what's going on ;-) Many thanks for your reply. -- GNU/Linux registered user #224950 Proud Egyptian GNU/Linux User Group <www.eglug.org> Member. Life powered by Debian, Homepage: www.foolab.org -- Don't send me any attachment in Micro$oft (.DOC, .PPT) format please Read http://www.gnu.org/philosophy/no-word-attachments.html Preferable attachments: .PDF, .HTML, .TXT Thanx for adding this text to Your signature
Attachment:
signature.asc
Description: Digital signature