From 1d7ca2f81a3729167ad0be57d8e996d5accc6891 Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Sun, 29 Nov 2015 00:22:55 +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 887badc6..ad67f3b9 100755 --- a/terminatorlib/terminal_popup_menu.py +++ b/terminatorlib/terminal_popup_menu.py @@ -150,12 +150,16 @@ class TerminalPopupMenu(object): menu.append(gtk.MenuItem()) if not terminal.is_zoomed(): + sensitive = not terminal.get_toplevel() == terminal.get_parent() + item = gtk.MenuItem(_('_Zoom terminal')) item.connect('activate', terminal.zoom) + item.set_sensitive(sensitive) menu.append(item) item = gtk.MenuItem(_('Ma_ximise terminal')) item.connect('activate', terminal.maximise) + item.set_sensitive(sensitive) menu.append(item) menu.append(gtk.MenuItem())