(self, menuitems, menu, terminal)
Add our menu item to the menu
Add our menu item to the menu
Add our menu item to the menu
def callback(self, menuitems, menu, terminal):
        """Add our menu item to the menu"""
        item = Gtk.CheckMenuItem.new_with_mnemonic(_('Watch for _activity'))
        item.set_active(terminal in self.watches)
        if item.get_active():
            item.connect("activate", self.unwatch, terminal)
        else:
            item.connect("activate", self.watch, terminal)
        menuitems.append(item)
        dbg('Menu item appended')
def callback ( self , menuitems , menu , terminal ) : item = Gtk . CheckMenuItem . new_with_mnemonic ( _ ( 'Watch for _activity' ) ) item . set_active ( terminal in self . watches ) if item . get_active ( ) : item . connect ( "activate" , self . unwatch , terminal ) else : item . connect ( "activate" , self . watch , terminal ) menuitems . append ( item ) dbg ( 'Menu item appended' )