docs: def _menuitem(self, label, icon, onclick, checked=None):
          """
          Create a generic menu item.
  
          :param str label: text
          :param Gtk.Image icon: icon (may be ``None``)
          :param onclick: onclick handler, either a callable or Gtk.Menu
          :returns: the menu item object
          :rtype: Gtk.MenuItem
          """
          if checked is not None:
              item = Gtk.CheckMenuItem()
              item.set_active(checked)
          elif icon is None:
              item = Gtk.MenuItem()
          else:
              item = Gtk.ImageMenuItem()
              item.set_image(icon)
              # I don't really care for the "show icons only for nouns, not
              # for verbs" policy:
              item.set_always_show_image(True)
          if label is not None:
              item.set_label(label)
          if isinstance(onclick, Gtk.Menu):
              item.set_submenu(onclick)
          elif onclick is not None:
              item.connect('activate', onclick)
          return item