Add copy_on_selection, defaulting to false, which automatically copies selections to the clipboard. Resolves LP #241594.

This commit is contained in:
Thomas Hurst 2008-06-20 16:18:23 +01:00
parent 0a27442e64
commit 3717c8af1f
3 changed files with 56 additions and 48 deletions

View File

@ -133,5 +133,8 @@ Default value: \fBFalse\fR
.B cycle_term_tab .B cycle_term_tab
If this is set to true, when switching to the next/previous term, Terminator will cycle within the same tab. Ctrl-PageUp/PageDown can then be used to move from one tab to the other one. If this is set to true, when switching to the next/previous term, Terminator will cycle within the same tab. Ctrl-PageUp/PageDown can then be used to move from one tab to the other one.
Default value: \fBTrue\fR Default value: \fBTrue\fR
.B copy_on_selection
If set to True, text selections will be automatically copied to the clipboard, in addition to being made the Primary selection.
Default value: \fBFalse\fR
.SH "SEE ALSO" .SH "SEE ALSO"
.BR gnome\-terminal(1) .BR gnome\-terminal(1)

View File

@ -167,6 +167,9 @@ class TerminatorTerm (gtk.VBox):
self._vte.connect("drag-motion", self.on_drag_motion, self) self._vte.connect("drag-motion", self.on_drag_motion, self)
self._vte.connect("drag-data-received", self.on_drag_data_received, self) self._vte.connect("drag-data-received", self.on_drag_data_received, self)
if self.conf.copy_on_selection:
self._vte.connect ("selection-changed", lambda widget: self._vte.copy_clipboard ())
self._vte.connect ("composited-changed", self.on_composited_changed) self._vte.connect ("composited-changed", self.on_composited_changed)
self._vte.connect ("window-title-changed", self.on_vte_title_change) self._vte.connect ("window-title-changed", self.on_vte_title_change)
self._vte.connect ("grab-focus", self.on_vte_focus) self._vte.connect ("grab-focus", self.on_vte_focus)
@ -306,6 +309,7 @@ text/plain
data.terminator.add(self, widgetsrc,pos) data.terminator.add(self, widgetsrc,pos)
return return
def get_location(self, vte, x, y): def get_location(self, vte, x, y):
pos = "" pos = ""
#get the diagonales function for the receiving widget #get the diagonales function for the receiving widget

View File

@ -125,6 +125,7 @@ class TerminatorConfValuestore:
'f11_modifier' : False, 'f11_modifier' : False,
'force_no_bell' : False, 'force_no_bell' : False,
'cycle_term_tab' : True, 'cycle_term_tab' : True,
'copy_on_selection' : False,
} }
def __getattr__ (self, keyname): def __getattr__ (self, keyname):