Re: [gtk-list] Re: gtk-- menufactory callbacks
- From: Tim Janik <timj gtk org>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: gtk-- menufactory callbacks
- Date: Tue, 6 Oct 1998 02:34:00 +0200 (CEST)
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]