Re: [gtk-list] Re: menu accelerators with Gtk--



Lixin Tang <tlxin@cco.caltech.edu> writes:

> > Guillaume Laurent wrote:
> > 
> > > Marsel Osipov <virtuoso@jps.net> writes:
> > >
> > > See testgtkmm.cc in the examples/ directory of Gtk--, and the
> > > add_entry() methods in src/menufactory.gen_h (the accelerator is the
> > > 2nd parameter).
> > 
> > I knew that, but it does not work.  When I press the accelerator key on a
> > keyboard(hm...let's say "Q" for quit), nothing happens.  Do you I need to set
> > up a Gtk_AcceleratorTable?  If yes, do you know how?
>
> I've encountered the same problem. In the gtk-- version (0.9.14) I am
> using, Gtk_MenuFactory::get_accelerator_table(), Gtk_Window::add/
> remove_accelerator_table() functions don't exist as in earlier versions.
> Do I need to set up Gtk_AccelGroup instead? and how if yes?

(answering both Marsel and Lixin).

Sorry for the dumb answer. Gtk_AccelGroup simply isn't fully
implemented yet (should be anytime now, Tero said he'd done it and was
about to check it in CVS, it's probably already in there), and a quick
check show that there are also a couple of accel_group related methods
missing from Gtk_Menu for 1.1.1 (I'll correct that tonight).

As for the exact method to use, sorry, I don't now :-(. According to
testgtk.c, just setting the accel_group should be enough.

-- 
					Guillaume.
					http://www.worldnet.fr/~glaurent



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