(self, menuitems, menu, terminal)
Add our menu items to the menu
Add our menu items to the menu
Add our menu items to the menu
def callback(self, menuitems, menu, terminal):
        """Add our menu items to the menu"""
        submenus = {}
        item = Gtk.MenuItem.new_with_mnemonic(_('_Run command on matches'))
        menuitems.append(item)

        submenu = Gtk.Menu()
        item.set_submenu(submenu)

        menuitem = Gtk.MenuItem.new_with_mnemonic(_('_Preferences'))
        menuitem.connect("activate", self.configure)
        submenu.append(menuitem)

        menuitem = Gtk.SeparatorMenuItem()
        submenu.append(menuitem)

        theme = Gtk.IconTheme.get_default()
def callback ( self , menuitems , menu , terminal ) : submenus = { } item = Gtk . MenuItem . new_with_mnemonic ( _ ( '_Run command on matches' ) ) menuitems . append ( item ) submenu = Gtk . Menu ( ) item . set_submenu ( submenu ) menuitem = Gtk . MenuItem . new_with_mnemonic ( _ ( '_Preferences' ) ) menuitem . connect ( "activate" , self . configure ) submenu . append ( menuitem ) menuitem = Gtk . SeparatorMenuItem ( ) submenu . append ( menuitem ) theme = Gtk . IconTheme . get_default ( )