# HG changeset patch
# User Simon Heimberg <[email protected]>
# Date 1250381810 -7200
# Node ID 521492a22d874730ea90c56baf9dbd38aa33a956
# Parent 766003b87e58f907a777090f632ad272aa75a528
commit/hgemail: add simple spellcheck support
does nothing when module gtkspell is not there
setting and switching language needs some more work
diff -r 766003b87e58 -r 521492a22d87 hggtk/commit.py
--- a/hggtk/commit.py Sam Aug 15 19:30:01 2009 +0200
+++ b/hggtk/commit.py Son Aug 16 02:16:50 2009 +0200
@@ -283,6 +283,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)
diff -r 766003b87e58 -r 521492a22d87 hggtk/gtklib.py
--- a/hggtk/gtklib.py Sam Aug 15 19:30:01 2009 +0200
+++ b/hggtk/gtklib.py Son Aug 16 02:16:50 2009 +0200
@@ -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
diff -r 766003b87e58 -r 521492a22d87 hggtk/hgemail.py
--- a/hggtk/hgemail.py Sam Aug 15 19:30:01 2009 +0200
+++ b/hggtk/hgemail.py Son Aug 16 02:16:50 2009 +0200
@@ -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)
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop