diff options
author | Nalin Dahyabhai <nalin@src.gnome.org> | 2002-10-10 16:57:30 +0000 |
---|---|---|
committer | Nalin Dahyabhai <nalin@src.gnome.org> | 2002-10-10 16:57:30 +0000 |
commit | 272bef21f4676bd586bbd9484890d6d2aa47fce7 (patch) | |
tree | 114959c018b65ad6587d485ff43c8f116f4157c1 /python | |
parent | 9705656987dfb648692f14556143fa999a28e5bb (diff) | |
download | vte-272bef21f4676bd586bbd9484890d6d2aa47fce7.tar.gz |
allow specifying the scrollback buffer size. if we don't have <wchar.h>,
* src/vteapp.c, python/vte-demo.py: allow specifying the scrollback buffer size.
* src/vte.c: if we don't have <wchar.h>, typedef wchar_t as a gunichar, not a
long.
* src/buffer.c, src/buffer.h: add.
* src/interpret.c, src/vte.c: use _vte_buffer structures instead of char arrays
with separate lengths. Use a scratch buffer for holding the results of
conversions.
* src/vte.c: separate the pango and pangox drawing paths so that they're easier
to tweak and compare to each other.
* src/vte.c: ditch the smooth scrolling change, which won't work right anyway
(expose events don't get processed until after we finish processing a
chunk of data unless we explicitly request it, so using a bbox is both
simpler and faster). Use a mask when creating the cursor we use for
hiding the cursor.
* vte.spec, gnome-pty-helper/Makefile.am: install gnome-pty-helper into the
libexecdir, not pkglibdir (#95085).
* src/vte.c: obey smooth/jump scrolling options, default is jump scroll.
* src/vte.c (vte_font_match): Fix over-aggressive Xft => Fc conversion - need
to call XftDefaultSubstitute to pick up Xft X resources, not
FcDefaultSubstitute. From otaylor.
Diffstat (limited to 'python')
-rwxr-xr-x | python/vte-demo.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/python/vte-demo.py b/python/vte-demo.py index 9b8902c2..de7ecf1e 100755 --- a/python/vte-demo.py +++ b/python/vte-demo.py @@ -1,5 +1,6 @@ #!/usr/bin/python2.2 import sys +import string import getopt import gtk import vte @@ -16,10 +17,11 @@ if __name__ == '__main__': command = None emulation = "xterm" font = "fixed 12" + scrollback = 100 transparent = 0 visible = 0 # Let the user override them. - (shorts, longs) = getopt.getopt(sys.argv[1:], "B:Tabc:f:t:v", ["background", "transparent", "audible", "blink", "command=", "font=", "terminal=", "visible"]) + (shorts, longs) = getopt.getopt(sys.argv[1:], "B:Tabc:f:n:t:v", ["background", "transparent", "audible", "blink", "command=", "font=", "scrollback=", "terminal=", "visible"]) for argpair in (shorts + longs): if ((argpair[0] == '-B') or (argpair[0] == '--background')): print "Setting background image to `" + argpair[1] + "'." @@ -39,6 +41,12 @@ if __name__ == '__main__': if ((argpair[0] == '-f') or (argpair[0] == '--font')): print "Setting font to `" + argpair[1] + "'." font = argpair[1] + if ((argpair[0] == '-n') or (argpair[0] == '--scrollback')): + scrollback = string.atoi(argpair[1]) + if (scrollback == 0): + scrollback = 100 + else: + print "Setting scrollback size to `" + str(scrollback) + "'." if ((argpair[0] == '-t') or (argpair[0] == '--terminal')): print "Setting terminal type to `" + argpair[1] + "'." emulation = argpair[1] @@ -54,6 +62,7 @@ if __name__ == '__main__': terminal.set_cursor_blinks(blink) terminal.set_emulation(emulation) terminal.set_font_from_string(font) + terminal.set_scrollback_lines(scrollback) terminal.set_audible_bell(audible) terminal.set_visible_bell(visible) terminal.connect("child-exited", child_exited_cb) |