Add functions for emitting events
This commit is contained in:
parent
a51454e9f6
commit
39098fdefb
|
@ -143,6 +143,20 @@ class Terminator(Borg):
|
|||
for group in todestroy:
|
||||
self.groups.remove(group)
|
||||
|
||||
def group_emit(self, terminal, group, type, event):
|
||||
"""Emit to each terminal in a group"""
|
||||
dbg('Terminator::group_emit: emitting a keystroke for group %s' %
|
||||
group)
|
||||
for term in self.terminals:
|
||||
if term != terminal and term.group == group:
|
||||
term.vte.emit(type, event)
|
||||
|
||||
def all_emit(self, terminal, type, event):
|
||||
"""Emit to all terminals"""
|
||||
for term in self.terminals:
|
||||
if term != terminal:
|
||||
term.vte.emit(type, event)
|
||||
|
||||
def do_enumerate(self, widget, pad):
|
||||
"""Insert the number of each terminal in a group, into that terminal"""
|
||||
if pad:
|
||||
|
|
|
@ -394,6 +394,7 @@ class Terminal(gtk.VBox):
|
|||
if self.group == name:
|
||||
# already in this group, no action needed
|
||||
return
|
||||
dbg('Terminal::set_group: Setting group to %s' % name)
|
||||
self.group = name
|
||||
self.titlebar.set_group_label(name)
|
||||
self.terminator.group_hoover()
|
||||
|
|
Loading…
Reference in New Issue