From f97d1c49f80bb178b28be6aa21616c24cdd4cd1d Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Wed, 14 Jan 2009 13:36:32 +0100 Subject: [PATCH] Fix middle-click paste in broadcast mode into terminal with no group. Wasn't sent to other terms. Plus: slight reorg of get_target_terms --- terminatorlib/terminatorterm.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/terminatorlib/terminatorterm.py b/terminatorlib/terminatorterm.py index 1c87aa3e..dd6c1bef 100755 --- a/terminatorlib/terminatorterm.py +++ b/terminatorlib/terminatorterm.py @@ -326,17 +326,16 @@ text/plain dbg ('Drag drop on %s'%parent) def get_target_terms(self): - if self.terminator.groupsend == 0: - return [self] if self.terminator.groupsend == 2: return self.terminator.term_list - if self.terminator.groupsend == 1: + elif self.terminator.groupsend == 1: term_subset = [] for term in self.terminator.term_list: if term == self or (term._group != None and term._group == self._group): term_subset.append(term) return term_subset - return None + else: + return [self] def on_drag_data_received(self, widget, drag_context, x, y, selection_data, info, time, data): dbg ("Drag Data Received") @@ -690,7 +689,7 @@ text/plain # Left mouse button should transfer focus to this vte widget # we also need to give focus on the widget where the paste occured if event.button in (1 ,2): - if event.button == 2 and self._group: + if event.button == 2: self.paste_clipboard (True) return True self._vte.grab_focus ()