add_item (MenuExtension)

         # File lib/json/editor.rb, line 231
    231:       def add_item(label, keyval = nil, klass = MenuItem, &callback)
    232:         label = "#{label} (C-#{keyval.chr})" if keyval
    233:         item = klass.new(label)
    234:         item.signal_connect(:activate, &callback)
    235:         if keyval
    236:           self.signal_connect('key-press-event''key-press-event') do |item, event|
    237:             if event.state & Gdk::Window::ModifierType::CONTROL_MASK != 0 and
    238:               event.keyval == keyval
    239:               callback.call item
    240:             end
    241:           end
    242:         end
    243:         menu.append item
    244:         item
    245:       end