[EMAIL PROTECTED] writes:
> Hi!, is it possible to add shortcuts to buttons?
Somewhat painfully.
- create a GtkAccelGroup
- attach it to the toplevel window
- call gtk_label_parse_uline() on the label in the button,
with a string such as "_Foo" for the F shortcut,
and get back the return value which is a keysym
- add an accelerator with that keysym to the accel group
which invokes the "clicked" signal on the button
In GTK 2, this is a bit nicer:
button = gtk_button_new_with_mnemonic ("_Foo");
And that just works.
Havoc
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list