From 29f6a44d06a222fc291f7c43340b59be0d9fe941 Mon Sep 17 00:00:00 2001 From: Nathaniel Morck Beaver Date: Sun, 26 Apr 2020 13:40:48 -0400 Subject: [PATCH] Add layout launcher to terminal popup menu. --- terminatorlib/terminal_popup_menu.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/terminatorlib/terminal_popup_menu.py b/terminatorlib/terminal_popup_menu.py index d0986ad3..14192ca1 100644 --- a/terminatorlib/terminal_popup_menu.py +++ b/terminatorlib/terminal_popup_menu.py @@ -13,6 +13,7 @@ from .util import err, dbg from .config import Config from .prefseditor import PrefsEditor from . import plugin +from layoutlauncher import LayoutLauncher class TerminalPopupMenu(object): """Class implementing the Terminal context menu""" @@ -211,6 +212,7 @@ class TerminalPopupMenu(object): submenu.append(item) self.add_encoding_items(menu) + self.add_layout_launcher(menu) try: menuitems = [] @@ -233,6 +235,11 @@ class TerminalPopupMenu(object): return(True) + def add_layout_launcher(self, menu): + """Add the layout list to the menu""" + item = Gtk.MenuItem.new_with_mnemonic(_('_Layouts...')) + item.connect('activate', lambda x: LayoutLauncher()) + menu.append(item) def add_encoding_items(self, menu): """Add the encoding list to the menu"""