Update for spell checking in Windows.

svn: r17633
This commit is contained in:
Peter Landgren 2011-05-31 07:48:27 +00:00
parent 2fa22e76d9
commit d05b5a100c

View File

@ -34,7 +34,7 @@ present, we default to no spell checking.
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gen.ggettext import gettext as _ from gen.ggettext import gettext as _
import locale import locale
import constfunc
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
# Set up logging # Set up logging
@ -50,6 +50,13 @@ LOG = logging.getLogger(".Spell")
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gtk import gtk
# In Windows (XP and 7) enchant must be imported before gtkspell
# otherwise import of gtkspell fails.
if constfunc.win():
try:
import enchant
except ImportError:
LOG.warn(_("pyenchant must be installed"))
try: try:
import gtkspell import gtkspell
HAVE_GTKSPELL = True HAVE_GTKSPELL = True