(self, menuitems, menu, terminal)
Add save menu item to the menu
Add save menu item to the menu
Add save menu item to the menu
def callback(self, menuitems, menu, terminal):
        """ Add save menu item to the menu"""
        vte_terminal = terminal.get_vte()
        if vte_terminal not in self.loggers:
            item = Gtk.MenuItem.new_with_mnemonic(_('Start _Logger'))
            item.connect("activate", self.start_logger, terminal)
        else:
            item = Gtk.MenuItem.new_with_mnemonic(_('Stop _Logger'))
            item.connect("activate", self.stop_logger, terminal)
            item.set_has_tooltip(True)
            item.set_tooltip_text("Saving at '" + self.loggers[vte_terminal]["filepath"] + "'")
        menuitems.append(item)
def callback ( self , menuitems , menu , terminal ) : vte_terminal = terminal . get_vte ( ) if vte_terminal not in self . loggers : item = Gtk . MenuItem . new_with_mnemonic ( _ ( 'Start _Logger' ) ) item . connect ( "activate" , self . start_logger , terminal ) else : item = Gtk . MenuItem . new_with_mnemonic ( _ ( 'Stop _Logger' ) ) item . connect ( "activate" , self . stop_logger , terminal ) item . set_has_tooltip ( True ) item . set_tooltip_text ( "Saving at '" + self . loggers [ vte_terminal ] [ "filepath" ] + "'" ) menuitems . append ( item )