[9067] in The GTK GIMP ToolKit mailing list archive
[gtk-list] Re: gtk-- menufactory callbacks
daemon@ATHENA.MIT.EDU (Tim Janik)
Mon Oct 5 21:02:05 1998
From: Tim Janik <timj@gtk.org>
Date: Tue, 6 Oct 1998 02:34:00 +0200 (CEST)
To: gtk-list@redhat.com
In-Reply-To: <3615011D.D80EEE69@jps.net>
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
On Fri, 2 Oct 1998, Marsel Osipov wrote:
> Guillaume Laurent wrote:
>
> Chop chop......
>
> > Try this instead :
> >
> > menufactory->add_entry("<Main>/File/Load", "L",
> > &myotherclass_obj, &MyOtherClass::callback, static_cast<char*>0);
> >
>
> Thank you
>
> > > also, if I specify "Ctrl+L" as the accelerator for the Load menu, and
> > > "Ctrl+S" for save, and "Ctrl+Q" for quit, when the program is run, I get
> > > "C" as the accelerator for the Quit. Is that a bug or am I doing
> > > something wrong?
> >
> > No idea. Code sample please ?
> >
>
> menufactory->add_subfactory(subfactory, "<Main>");
> menufactory->add_entry("<Main>/File/Load", "Ctrl+L",
> MenuFactoryConnector<VAppMain, ignored>
> (this, &virtuoso_load_file_cb));
> menufactory->add_entry("<Main>/File/Save", "Ctrl+S",
> MenuFactoryConnector<VAppMain, ignored>
> (this, &virtuoso_save_file_cb));
> menufactory->add_entry("<Main>/File/<separator>", "", 0);
>
> menufactory->add_entry("<Main>/File/Quit", "Ctrl+Q",
> MenuFactoryConnector<VAppMain, ignored>
> (this, &virtuoso_quit_cb));
>
> When the program is run, accelerators for the menus are not present(and not visible) and only
> the Quit accelerator is there, and it's "C" instead of "Ctrl+Q".
none of "Ctrl+L", "Ctrl+S" and "Ctrl+Q" are valid accelerator names, what you
want is "<control>L", "<control>S" and "<control>Q", assuming you are using
gtk+-1.0.x, for the development branch, GtkItemFactory is provided.
> > Guillaume.
> > http://www.worldnet.fr/~glaurent
---
ciaoTJ
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null