Make Zoom/Maximize inactive if a single terminal

This commit is contained in:
Stephen Boddy 2015-11-29 00:22:55 +01:00
parent 3197d331df
commit 1d7ca2f81a
1 changed files with 4 additions and 0 deletions

View File

@ -150,12 +150,16 @@ class TerminalPopupMenu(object):
menu.append(gtk.MenuItem()) menu.append(gtk.MenuItem())
if not terminal.is_zoomed(): if not terminal.is_zoomed():
sensitive = not terminal.get_toplevel() == terminal.get_parent()
item = gtk.MenuItem(_('_Zoom terminal')) item = gtk.MenuItem(_('_Zoom terminal'))
item.connect('activate', terminal.zoom) item.connect('activate', terminal.zoom)
item.set_sensitive(sensitive)
menu.append(item) menu.append(item)
item = gtk.MenuItem(_('Ma_ximise terminal')) item = gtk.MenuItem(_('Ma_ximise terminal'))
item.connect('activate', terminal.maximise) item.connect('activate', terminal.maximise)
item.set_sensitive(sensitive)
menu.append(item) menu.append(item)
menu.append(gtk.MenuItem()) menu.append(gtk.MenuItem())