add "Insert Terminal Name" to the group menu

This commit is contained in:
Matthew Rose 2022-11-20 13:42:20 -05:00
parent 3d63c91517
commit 35e7e026cd
2 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,6 @@
from gi.repository import Gtk
import terminatorlib.plugin as plugin
from terminatorlib.terminator import Terminator
AVAILABLE = ['InsertTermName']
@ -10,7 +9,6 @@ class InsertTermName(plugin.MenuItem):
config = None
def __init__(self):
# self.connect_signals()
plugin.MenuItem.__init__(self)
def callback(self, menuitems, menu, terminal):

View File

@ -587,6 +587,10 @@ class Terminal(Gtk.VBox):
item.connect('activate', lambda x: self.emit('enumerate', True))
menu.append(item)
item = Gtk.MenuItem.new_with_mnemonic(_('Insert terminal _name'))
item.connect('activate', lambda x: self.emit('insert-term-name'))
menu.append(item)
return(menu)
def set_group(self, _item, name):