Merge pull request #254 from mattrose/clear-select-on-smart-copy
Clear selection on smart copy
This commit is contained in:
commit
ff1860ad1b
@ -121,6 +121,7 @@ DEFAULTS = {
|
||||
'putty_paste_style' : False,
|
||||
'putty_paste_style_source_clipboard': False,
|
||||
'smart_copy' : True,
|
||||
'clear_select_on_copy' : False,
|
||||
'line_height' : 1.0,
|
||||
'case_sensitive' : True,
|
||||
},
|
||||
|
@ -605,7 +605,7 @@
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
@ -638,7 +638,7 @@
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
@ -673,7 +673,6 @@
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="width">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -754,7 +753,7 @@
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">6</property>
|
||||
<property name="width">3</property>
|
||||
<property name="width">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -770,7 +769,7 @@
|
||||
<signal name="toggled" handler="on_putty_paste_style_source_clipboard_toggled" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
@ -788,10 +787,43 @@
|
||||
<signal name="toggled" handler="on_putty_paste_style_source_clipboard_toggled" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="left_attach">3</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton">
|
||||
<property name="label" translatable="yes">Clear selection on copy</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_clear_select_on_copy_toggled" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
|
@ -824,6 +824,11 @@ class PrefsEditor:
|
||||
self.config['smart_copy'] = widget.get_active()
|
||||
self.config.save()
|
||||
|
||||
def on_clear_select_on_copy_toggled(self,widget):
|
||||
"""Clear selection on smart copy"""
|
||||
self.config['clear_select_on_copy'] = widget.get_active()
|
||||
self.config.save()
|
||||
|
||||
def on_cursor_blink_toggled(self, widget):
|
||||
"""Cursor blink setting changed"""
|
||||
self.config['cursor_blink'] = widget.get_active()
|
||||
|
@ -1773,6 +1773,8 @@ class Terminal(Gtk.VBox):
|
||||
|
||||
def key_copy(self):
|
||||
self.vte.copy_clipboard()
|
||||
if self.config['clear_select_on_copy']:
|
||||
self.vte.unselect_all()
|
||||
|
||||
def key_paste(self):
|
||||
self.paste_clipboard()
|
||||
|
Loading…
Reference in New Issue
Block a user