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:
|
for group in todestroy:
|
||||||
self.groups.remove(group)
|
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):
|
def do_enumerate(self, widget, pad):
|
||||||
"""Insert the number of each terminal in a group, into that terminal"""
|
"""Insert the number of each terminal in a group, into that terminal"""
|
||||||
if pad:
|
if pad:
|
||||||
|
|
|
@ -394,6 +394,7 @@ class Terminal(gtk.VBox):
|
||||||
if self.group == name:
|
if self.group == name:
|
||||||
# already in this group, no action needed
|
# already in this group, no action needed
|
||||||
return
|
return
|
||||||
|
dbg('Terminal::set_group: Setting group to %s' % name)
|
||||||
self.group = name
|
self.group = name
|
||||||
self.titlebar.set_group_label(name)
|
self.titlebar.set_group_label(name)
|
||||||
self.terminator.group_hoover()
|
self.terminator.group_hoover()
|
||||||
|
|
Loading…
Reference in New Issue