Add a demo font selection button and a spin button for scrollback
This commit is contained in:
parent
0a6acc19dc
commit
cac821f58a
|
@ -29,6 +29,20 @@ class ProfileEditor:
|
||||||
value = Defaults[key]
|
value = Defaults[key]
|
||||||
widget = None
|
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":
|
if type == "bool":
|
||||||
widget = gtk.CheckButton ()
|
widget = gtk.CheckButton ()
|
||||||
widget.set_active (value)
|
widget.set_active (value)
|
||||||
|
|
Loading…
Reference in New Issue