From 910396190281c5b0a98c4df7c21212b5afc4b58e Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Sun, 29 Nov 2015 00:22:57 +0100 Subject: [PATCH] Make Zoom/Maximize inactive if a single terminal --- terminatorlib/terminal_popup_menu.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/terminatorlib/terminal_popup_menu.py b/terminatorlib/terminal_popup_menu.py index 322f6be2..e9cd1b5d 100755 --- a/terminatorlib/terminal_popup_menu.py +++ b/terminatorlib/terminal_popup_menu.py @@ -151,12 +151,16 @@ class TerminalPopupMenu(object): menu.append(Gtk.MenuItem()) if not terminal.is_zoomed(): + sensitive = not terminal.get_toplevel() == terminal.get_parent() + item = Gtk.MenuItem.new_with_mnemonic(_('_Zoom terminal')) item.connect('activate', terminal.zoom) + item.set_sensitive(sensitive) menu.append(item) item = Gtk.MenuItem.new_with_mnemonic(_('Ma_ximise terminal')) item.connect('activate', terminal.maximise) + item.set_sensitive(sensitive) menu.append(item) menu.append(Gtk.MenuItem())