Add copy_on_selection to the profile editor

This commit is contained in:
Chris Jones 2010-06-24 21:56:18 +01:00
parent cc9ef57875
commit 29ee8ace1b
2 changed files with 24 additions and 3 deletions

View File

@ -895,6 +895,19 @@
<property name="position">3</property> <property name="position">3</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkCheckButton" id="copy_on_selection">
<property name="label" translatable="yes">Copy on selection</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_copy_on_selection_toggled"/>
</object>
<packing>
<property name="position">4</property>
</packing>
</child>
<child> <child>
<object class="GtkHBox" id="hbox136"> <object class="GtkHBox" id="hbox136">
<property name="visible">True</property> <property name="visible">True</property>
@ -928,7 +941,7 @@
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="position">4</property> <property name="position">5</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -1062,7 +1075,7 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">False</property> <property name="fill">False</property>
<property name="position">5</property> <property name="position">6</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -1163,7 +1176,7 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">False</property> <property name="fill">False</property>
<property name="position">6</property> <property name="position">7</property>
</packing> </packing>
</child> </child>
</object> </object>

View File

@ -321,6 +321,9 @@ class PrefsEditor:
# Show titlebar # Show titlebar
widget = guiget('show_titlebar') widget = guiget('show_titlebar')
widget.set_active(self.config['show_titlebar']) widget.set_active(self.config['show_titlebar'])
# Copy on selection
widget = guiget('copy_on_selection')
widget.set_active(self.config['copy_on_selection'])
# Word chars # Word chars
widget = guiget('word_chars_entry') widget = guiget('word_chars_entry')
widget.set_text(self.config['word_chars']) widget.set_text(self.config['word_chars'])
@ -542,6 +545,11 @@ class PrefsEditor:
self.config['show_titlebar'] = widget.get_active() self.config['show_titlebar'] = widget.get_active()
self.config.save() self.config.save()
def on_copy_on_selection_toggled(self, widget):
"""Copy on selection setting changed"""
self.config['copy_on_selection'] = widget.get_active()
self.config.save()
def on_cursor_blink_toggled(self, widget): def on_cursor_blink_toggled(self, widget):
"""Cursor blink setting changed""" """Cursor blink setting changed"""
self.config['cursor_blink'] = widget.get_active() self.config['cursor_blink'] = widget.get_active()