start fleshing out Terminal

This commit is contained in:
Chris Jones 2009-08-18 13:44:41 +01:00
parent 1fdd357058
commit 53f33109b4
1 changed files with 15 additions and 1 deletions

View File

@ -13,6 +13,8 @@ import pango
from cwd import get_pid_cwd, get_default_cwd from cwd import get_pid_cwd, get_default_cwd
from util import dbg, err, gerr from util import dbg, err, gerr
from config import Config from config import Config
from titlebar import Titlebar
from searchbox import Searchbox
try: try:
import vte import vte
@ -24,8 +26,12 @@ class Terminal(gtk.VBox):
"""Class implementing the VTE widget and its wrappings""" """Class implementing the VTE widget and its wrappings"""
vte = None vte = None
titlebar = None
searchbar = None
matches = None matches = None
config = None config = None
default_encoding = None
def __init__(self): def __init__(self):
"""Class initialiser""" """Class initialiser"""
@ -38,9 +44,17 @@ class Terminal(gtk.VBox):
self.vte.set_size(80, 24) self.vte.set_size(80, 24)
self.vte._expose_data = None self.vte._expose_data = None
self.vte.show() self.vte.show()
self.default_encoding = self.vte.get_encoding()
self.update_url_matches(self.config['try_posix_regexp']) self.update_url_matches(self.config['try_posix_regexp'])
self.titlebar = Titlebar()
self.searchbar = Searchbar()
self.show()
self.pack_start(self.titlebar, False)
self.pack_start(self.terminalbox)
self.pack_end(self.searchbar)
def update_url_matches(self, posix = True): def update_url_matches(self, posix = True):
"""Update the regexps used to match URLs""" """Update the regexps used to match URLs"""
userchars = "-A-Za-z0-9" userchars = "-A-Za-z0-9"