Fixed but untested

Fixes: https://launchpad.net/bugs/642778
This commit is contained in:
Tim Bentley 2010-09-20 06:06:18 +01:00
parent b73a921dbc
commit 293443ba61

View File

@ -43,9 +43,12 @@ class SpellTextEdit(QtGui.QPlainTextEdit):
QtGui.QPlainTextEdit.__init__(self, *args) QtGui.QPlainTextEdit.__init__(self, *args)
# Default dictionary based on the current locale. # Default dictionary based on the current locale.
if enchant_available: if enchant_available:
try:
self.dict = enchant.Dict() self.dict = enchant.Dict()
self.highlighter = Highlighter(self.document()) self.highlighter = Highlighter(self.document())
self.highlighter.setDict(self.dict) self.highlighter.setDict(self.dict)
except:
enchant_available = False
def mousePressEvent(self, event): def mousePressEvent(self, event):
if event.button() == QtCore.Qt.RightButton: if event.button() == QtCore.Qt.RightButton: