|
|
|
@ -484,6 +484,23 @@ class Interface(object):
|
|
|
|
|
update_area = gtk.VBox(True, 0) |
|
|
|
|
update_area.pack_start(update_box) |
|
|
|
|
|
|
|
|
|
""" Spell checking the update box """ |
|
|
|
|
spell_check_enabled = self._options[self.NAMESPACE]['spell_check'] |
|
|
|
|
if spell_check_enabled: |
|
|
|
|
try: |
|
|
|
|
import gtkspell |
|
|
|
|
import locale |
|
|
|
|
self.spell_check_support = True |
|
|
|
|
language = locale.getlocale()[0] |
|
|
|
|
self.spell_check = gtkspell.Spell(self._update_text, language) |
|
|
|
|
_log.debug('Spell checking turned on with language: %s' \ |
|
|
|
|
% (language)) |
|
|
|
|
except: |
|
|
|
|
self._options[self.NAMESPACE]['spell_check'] = False |
|
|
|
|
self.spell_check_support = False |
|
|
|
|
_log.debug('Error initializing spell checking: ' \ |
|
|
|
|
'spell checking disabled') |
|
|
|
|
|
|
|
|
|
return update_area |
|
|
|
|
|
|
|
|
|
def _create_statusbar(self): |
|
|
|
@ -885,3 +902,12 @@ class Interface(object):
|
|
|
|
|
default='blue', |
|
|
|
|
conflict_group='interface', |
|
|
|
|
is_cmd_option=False) |
|
|
|
|
options.add_option( |
|
|
|
|
group=self.NAMESPACE, |
|
|
|
|
option='spell_check', |
|
|
|
|
help='Spell checking update text', |
|
|
|
|
type='boolean', |
|
|
|
|
metavar='SPELL', |
|
|
|
|
default=False, |
|
|
|
|
conflict_group='interface', |
|
|
|
|
is_cmd_option=False) |
|
|
|
|