Make gio optional; it's way too soon to expect everyone to have this. Fix keybindings error handling.

This commit is contained in:
Thomas Hurst 2008-10-28 22:24:42 +00:00
parent 565b3d2bb8
commit e244329725
2 changed files with 12 additions and 4 deletions

View File

@ -34,7 +34,11 @@ up, set a default for it first."""
import os, platform, sys, re
import pwd
import gtk, pango
import gio
try:
import gio
except ImportError:
pass
# set this to true to enable debugging output
# These should be moved somewhere better.
@ -209,9 +213,12 @@ class TerminatorConfValuestoreRC (TerminatorConfValuestore):
dbg(" VS_RCFile: config file located at %s" % self.rcfilename)
self.call_parser(True)
try:
monfile = gio.File(self.rcfilename)
monmon = monfile.monitor_file()
monmon.connect("changed", self.file_changed)
except NameError:
dbg ("gio module not found, config file monitoring disabled")
def set_reconfigure_callback (self, function):
dbg (" VS_RCFile: setting callback to: %s"%function)

View File

@ -1,6 +1,7 @@
import re, gtk
import terminatorlib.config
from terminatorlib.config import err
class KeymapError(Exception):
def __init__(self, value):