Fix bug reported by Kees Cook - when in grouped mode, pasting did not apply to all grouped terms

This commit is contained in:
Chris Jones 2008-12-26 15:43:02 +00:00
parent 70e54005ee
commit 2228e2c3f3
1 changed files with 16 additions and 2 deletions

View File

@ -667,6 +667,9 @@ text/plain
# Left mouse button should transfer focus to this vte widget # Left mouse button should transfer focus to this vte widget
# we also need to give focus on the widget where the paste occured # we also need to give focus on the widget where the paste occured
if event.button in (1 ,2): if event.button in (1 ,2):
if event.button == 2 and self._group:
self.paste_clipboard (True)
return True
self._vte.grab_focus () self._vte.grab_focus ()
return False return False
@ -696,8 +699,19 @@ text/plain
else: else:
widget.show () widget.show ()
def paste_clipboard(self): def paste_clipboard(self, primary = False):
self._vte.paste_clipboard() if self._group:
for term in self.terminator.term_list:
if term._group == self._group:
if primary:
term._vte.paste_primary ()
else:
term._vte.paste_clipboard ()
else:
if primary:
self._vte.paste_primary ()
else:
self._vte.paste_clipboard ()
self._vte.grab_focus() self._vte.grab_focus()
#keybindings for the individual splited terminals (affects only the #keybindings for the individual splited terminals (affects only the