GNOME Bugzilla – Bug 492943
Calling gtk_widget_add_accelerator on GtkMenuItem leads to '-/-' suffix on label
Last modified: 2009-08-07 21:20:05 UTC
Calling gtk_widget_add_accelerator() on a GtkMenuItem causes a '-/-' to be appended to the menu item label. OS: Ubuntu Gutsy (libgtk2.0 2.12.0) Occurs: Always Expected behaviour: Appropriate text appended to label (e.g. Ctrl-0) or nothing appending to label. Example program in PyGtk (expand window to see error, also works in C library): --- import gtk import gtk.gdk window = gtk.Window() item = gtk.MenuItem('GtkMenuItem') accelGroup = gtk.AccelGroup() item.add_accelerator('activate', accelGroup, ord('0'), gtk.gdk.CONTROL_MASK, 0) window.add(item) window.show_all() gtk.main() --- The label shows 'GtkMenuItem -/-'. I would expect it to be 'GtkMenuItem Ctrl-0'