Add a demo font selection button and a spin button for scrollback

This commit is contained in:
Thomas Hurst 2008-08-24 07:39:49 +01:00
parent 0a6acc19dc
commit cac821f58a
1 changed files with 25 additions and 11 deletions

View File

@ -29,6 +29,20 @@ class ProfileEditor:
value = Defaults[key]
widget = None
if key == 'font':
#widget = gtk.FontSelection()
#widget.set_preview_text("Terminator: The robot future of terminals")
#widget.set_font_name(value)
widget = gtk.FontButton(value)
elif key == 'scrollback_lines':
# estimated byte size per line according to g-t:
# sizeof(void *) + sizeof(char *) + sizeof(int) + (80 * (sizeof(int32) + 4)
widget = gtk.SpinButton()
widget.set_digits(0)
widget.set_increments(100, 1000)
widget.set_range(0, 100000)
widget.set_value(value)
else:
if type == "bool":
widget = gtk.CheckButton ()
widget.set_active (value)