Finish off the Compatibility tab and the other UI toggles in the profile tabs.

This commit is contained in:
Chris Jones 2010-01-09 11:52:30 +00:00
parent 56aab5708d
commit f273c198c9
2 changed files with 47 additions and 13 deletions

View File

@ -509,6 +509,7 @@
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_system_font_checkbutton_toggled"/>
</object>
<packing>
<property name="expand">False</property>
@ -787,6 +788,7 @@
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_use_custom_command_checkbutton_toggled"/>
</object>
<packing>
<property name="expand">False</property>
@ -899,7 +901,7 @@
<child type="tab">
<object class="GtkLabel" id="label38">
<property name="visible">True</property>
<property name="label" translatable="yes">Terminal Command</property>
<property name="label" translatable="yes">Command</property>
<property name="use_underline">True</property>
<property name="justify">center</property>
</object>
@ -1802,17 +1804,6 @@
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="scrollback-kb-label">
<property name="visible">True</property>
<property name="label">(about 120kB)</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">1</property>

View File

@ -162,6 +162,7 @@ class PrefsEditor:
# Use system font
widget = guiget('system-font-checkbutton')
widget.set_active(self.config['use_system_font'])
self.on_system_font_checkbutton_toggled(widget)
# Font selector
widget = guiget('font-selector')
widget.set_font_name(self.config['font'])
@ -190,7 +191,7 @@ class PrefsEditor:
widget = guiget('word-chars-entry')
widget.set_text(self.config['word_chars'])
## Teminal Command tab
## Command tab
# Login shell
widget = guiget('login-shell-checkbutton')
widget.set_active(self.config['login_shell'])
@ -200,6 +201,7 @@ class PrefsEditor:
# Use Custom command
widget = guiget('use-custom-command-checkbutton')
widget.set_active(self.config['use_custom_command'])
self.on_use_custom_command_checkbutton_toggled(widget)
# Custom Command
widget = guiget('custom-command-entry')
widget.set_text(self.config['custom_command'])
@ -290,6 +292,47 @@ class PrefsEditor:
widget.set_active(2)
else:
widget.set_active(1)
# Delete key
widget = guiget('delete-binding-combobox')
value = self.config['delete_binding']
if value == 'control-h':
widget.set_active(0)
elif value == 'escape-sequence':
widget.set_active(2)
else:
widget.set_active(1)
def on_use_custom_command_checkbutton_toggled(self, checkbox):
"""Toggling the use_custom_command checkbox needs to alter the
sensitivity of the custom_command entrybox"""
guiget = self.builder.get_object
widget = guiget('custom-command-entry')
if checkbox.get_active() == True:
widget.set_sensitive(True)
else:
widget.set_sensitive(False)
def on_system_font_checkbutton_toggled(self, checkbox):
"""Toggling the use_system_font checkbox needs to alter the
sensitivity of the font selector"""
guiget = self.builder.get_object
widget = guiget('font-selector')
if checkbox.get_active() == True:
widget.set_sensitive(False)
else:
widget.set_sensitive(True)
def on_reset_compatibility_clicked(self, widget):
"""Reset the confusing and annoying backspace/delete options to the
safest values"""
guiget = self.builder.get_object
widget = guiget('backspace-binding-combobox')
widget.set_active(1)
widget = guiget('delete-binding-combobox')
widget.set_active(2)
def on_background_type_toggled(self, widget):
"""The background type was toggled"""