Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

commit/hgemail: add simple spellcheck support

does nothing when module gtkspell is not there
setting and switching language needs some more work

Changeset c9653a1ac112

Parent 0c0792f2df5c

by Simon Heimberg

Changes to 3 files · Browse files at c9653a1ac112 Showing diff from parent 0c0792f2df5c Diff from another changeset...

Change 1 of 1 Show Entire File hggtk/​commit.py Stacked
 
292
293
294
 
295
296
297
 
292
293
294
295
296
297
298
@@ -292,6 +292,7 @@
  self.text.connect('populate-popup', self.msg_add_to_popup)   self.text.modify_font(pango.FontDescription(self.fontcomment))   scroller.add(self.text) + gtklib.addspellcheck(self.text)     self.vpaned = gtk.VPaned()   self.vpaned.add1(vbox)
Change 1 of 1 Show Entire File hggtk/​gtklib.py Stacked
 
318
319
320
 
 
 
 
 
 
 
 
318
319
320
321
322
323
324
325
326
327
@@ -318,3 +318,10 @@
  if response == gtk.RESPONSE_OK:   return fname   return None + +def addspellcheck(textview): + try: + import gtkspell + gtkspell.Spell(textview) + except ImportError: + pass
Change 1 of 1 Show Entire File hggtk/​hgemail.py Stacked
 
178
179
180
 
181
182
183
 
178
179
180
181
182
183
184
@@ -178,6 +178,7 @@
  self.descview.set_editable(True)   self.descview.modify_font(pango.FontDescription('Monospace'))   self.descbuffer = self.descview.get_buffer() + gtklib.addspellcheck(self.descbuffer)   scrolledwindow = gtk.ScrolledWindow()   scrolledwindow.set_shadow_type(gtk.SHADOW_ETCHED_IN)   scrolledwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)