make closing of group terminals work
This commit is contained in:
parent
830863d711
commit
c60aae8bed
|
@ -74,6 +74,12 @@ class Terminator(Borg):
|
|||
terminal.set_group(None, None)
|
||||
self.groups = []
|
||||
|
||||
def closegroupedterms(self, group):
|
||||
"""Close all terminals in a group"""
|
||||
for terminal in self.terminals:
|
||||
if terminal.group == group:
|
||||
terminal.close()
|
||||
|
||||
def group_hoover(self):
|
||||
"""Clean out unused groups"""
|
||||
|
||||
|
|
|
@ -126,6 +126,10 @@ class Terminal(gtk.VBox):
|
|||
if self.config['http_proxy'] and self.config['http_proxy'] != '':
|
||||
os.putenv('http_proxy', self.config['http_proxy'])
|
||||
|
||||
def close(self):
|
||||
"""Close ourselves"""
|
||||
self.emit('close-term')
|
||||
|
||||
def create_terminalbox(self):
|
||||
"""Create a GtkHBox containing the terminal and a scrollbar"""
|
||||
|
||||
|
@ -315,7 +319,7 @@ class Terminal(gtk.VBox):
|
|||
|
||||
item = gtk.MenuItem(_('Close group %s') % self.group)
|
||||
item.connect('activate', lambda x:
|
||||
self.terminator.closegroupedterms(self))
|
||||
self.terminator.closegroupedterms(self.group))
|
||||
menu.append(item)
|
||||
|
||||
menu.append(gtk.MenuItem())
|
||||
|
|
Loading…
Reference in New Issue