Make Zoom/Maximize inactive if a single terminal

This commit is contained in:
Stephen Boddy 2015-11-29 00:22:57 +01:00
parent c1f92495d8
commit 9103961902
1 changed files with 4 additions and 0 deletions

View File

@ -151,12 +151,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.new_with_mnemonic(_('_Zoom terminal')) item = Gtk.MenuItem.new_with_mnemonic(_('_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.new_with_mnemonic(_('Ma_ximise terminal')) item = Gtk.MenuItem.new_with_mnemonic(_('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())