[Tkabber-dev] r806 - in trunk/tkabber: . plugins/unix

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sat Nov 25 01:20:58 MSK 2006


Author: sergei
Date: 2006-11-25 01:20:54 +0300 (Sat, 25 Nov 2006)
New Revision: 806

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/plugins/unix/ispell.tcl
Log:
	* plugins/unix/ispell.tcl: Added processing of nonletter
	  keys, which was broken after input methods were fixed
	  2006-10-11.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2006-11-24 21:00:09 UTC (rev 805)
+++ trunk/tkabber/ChangeLog	2006-11-24 22:20:54 UTC (rev 806)
@@ -1,5 +1,9 @@
 2006-11-24  Sergei Golovan  <sgolovan at nes.ru>
 
+	* plugins/unix/ispell.tcl: Added processing of nonletter
+	  keys, which was broken after input methods were fixed
+	  2006-10-11.
+
 	* plugins/richtext/urls.tcl: Add URL prefixes ftp:// or
 	  http:// to URLs without them.
 

Modified: trunk/tkabber/plugins/unix/ispell.tcl
===================================================================
--- trunk/tkabber/plugins/unix/ispell.tcl	2006-11-24 21:00:09 UTC (rev 805)
+++ trunk/tkabber/plugins/unix/ispell.tcl	2006-11-24 22:20:54 UTC (rev 806)
@@ -251,6 +251,16 @@
     $iw insert $wordstart $sub
 }
 
+proc ispell::key_process {iw key} {
+    if {$key == 65288} {
+	# BackSpace
+	after_process $iw "\u0008"
+    } elseif {$key >= 65280} {
+	# All nonletters
+	after_process $iw ""
+    }
+}
+
 proc ispell::after_process {iw sym} {
     variable state
     variable after_id
@@ -267,6 +277,7 @@
 
 proc ispell::setup_bindings {iw} {
     clear_ispell $iw
+    bind $iw <KeyPress> [list [namespace current]::key_process $iw %N]
     bind $iw <Return> +[list [namespace current]::clear_ispell $iw]
     bind $iw <3> [list [namespace current]::popup_menu $iw %x %y]
     $iw tag configure err -foreground [option get $iw errorColor Text]



More information about the Tkabber-dev mailing list