Accelerators, anyone?
| From: | Gregory Kaczmarczyk | Date: | Fri, 01 Feb 2002 23:02:03 +0000 |
| Subject: | Accelerators, anyone? | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-1100@lists.php.net to get a copy of this message | ||
Can I ask why this accelerator is not working for me?
$key_data = &new GtkAccelGroup();
$key_data->unlock(); //is this unecessary?
// ... create some menus
$filemenu_quit = &new GtkMenuItem("Quit");
$filemenu_quit->connect("activate", "quit");
$filemenu_quit->add_accelerator("activate", $key_data, GDK_KEY__q, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
$filemenu->append($filemenu_quit);
// ... finish menus
$key_data->lock(); //again, unnecessary?
I do not get any error messages when running this, however, when I attempt pressing 'Ctrl-q', nothing happens.
Oh, and it does display in my menu with "Quit" left justified & "Ctrl-Q" right justified.
Thanks for any help.