Accel group on buttons?



(I have written to gtkmm group but no answer. Maybe here? Below code is in C++ but I will accept in C too. )

Hello,
In my application I would like to activate buttons with
e.g. F1 key. How do I do that? AFAIK Mnemonics can be only one printable letter (Correct me if I'm wrong).
I fiddled around with AccelGroup of toplevel window but all I got
was:
Gtk-WARNING **: gtkwidget.c:3075: widget `gtkmm__GtkButton'
has no activatable signal "F1" without arguments"

The above result is because of code:
button->add_accelerator("F1",
w->get_accel_group(),
gdk_keyval_from_name( "F1"),
Gdk::RELEASE_MASK,
Gtk::ACCEL_MASK );

(w is toplevel window)

How do I define "activatable signal"?

Thanks in advance,
Radosław Grzanka



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