[Tkabber-dev] r2007 - in trunk/tkabber: . plugins/general

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Tue Aug 21 19:18:08 MSK 2012


Author: sergei
Date: 2012-08-21 19:18:08 +0400 (Tue, 21 Aug 2012)
New Revision: 2007

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/default.tcl
   trunk/tkabber/plugins/general/ispell.tcl
Log:
	* default.tcl: Fixed using semicolons in browserurl if the webbrowser
	  variable is defined again.

	* plugins/general/ispell.tcl: Fixed error processing in case if Ispell
	  executable is missing or cannot be invoked. Also removed several
	  Tclx'isms.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2012-08-19 08:02:47 UTC (rev 2006)
+++ trunk/tkabber/ChangeLog	2012-08-21 15:18:08 UTC (rev 2007)
@@ -1,3 +1,12 @@
+2012-08-21  Sergei Golovan  <sgolovan at nes.ru>
+
+	* default.tcl: Fixed using semicolons in browserurl if the webbrowser
+	  variable is defined again.
+
+	* plugins/general/ispell.tcl: Fixed error processing in case if Ispell
+	  executable is missing or cannot be invoked. Also removed several
+	  Tclx'isms.
+
 2012-08-19  Sergei Golovan  <sgolovan at nes.ru>
 
 	* balloon.tcl: Apply override redirect just before deiconifying the

Modified: trunk/tkabber/default.tcl
===================================================================
--- trunk/tkabber/default.tcl	2012-08-19 08:02:47 UTC (rev 2006)
+++ trunk/tkabber/default.tcl	2012-08-21 15:18:08 UTC (rev 2007)
@@ -34,6 +34,7 @@
     if {[info exists ::webbrowser] && $::webbrowser != ""} {
 	# If user specified a browser, use it
 
+        set url [string map {; \\;} $url]
 	eval exec [format $::webbrowser $url] &
 	return
     }

Modified: trunk/tkabber/plugins/general/ispell.tcl
===================================================================
--- trunk/tkabber/plugins/general/ispell.tcl	2012-08-19 08:02:47 UTC (rev 2006)
+++ trunk/tkabber/plugins/general/ispell.tcl	2012-08-21 15:18:08 UTC (rev 2007)
@@ -69,17 +69,20 @@
     variable options
     variable pipe
 
-    set pipe [open "|[list $options(executable)] -a $options(command_line)" r+]
+    if {[catch {open "|[list $options(executable)] -a $options(command_line)" r+} pipe]} {
+	stop
+	return
+    }
 
     set version [gets $pipe]
-    if {[cequal $version ""]} {
+    if {[string equal $version ""]} {
 	stop
 	return
     }
 
     fconfigure $pipe -blocking off -buffering line
 
-    if {![cequal $options(dictionary_encoding) ""]} {
+    if {![string equal $options(dictionary_encoding) ""]} {
 	fconfigure $pipe -encoding $options(dictionary_encoding)
     }
 
@@ -165,7 +168,7 @@
     set line [$iw get "$insind linestart" "$insind lineend"]
     set wordstart [string wordstart $line $ins]
     set wordend   [expr {[string wordend $line $ins] - 1}]
-    set w [crange $line $wordstart $wordend]
+    set w [string range $line $wordstart $wordend]
     $iw mark set ispell_wordstart$wid "insert linestart +$wordstart chars"
     $iw mark set ispell_wordend$wid \
 	"insert linestart +$wordend chars +1 chars"
@@ -210,7 +213,7 @@
 
     switch -- $state($iw) {
 	0 {
-	    if {[cequal $sym ""]} {
+	    if {[string equal $sym ""]} {
 		set state($iw) 1
 		# in state 0 it's more likely that the word is to the left
 		# of cursor position
@@ -228,7 +231,7 @@
 	    }
 	}
 	1 {
-	    if {[cequal $sym ""]} {
+	    if {[string equal $sym ""]} {
 		# do nothing
 	    } elseif {![string is wordchar $sym]} {
 		process_word $iw [$iw index "$insert_prev -1 chars"]
@@ -275,7 +278,7 @@
     set line [$iw get "$ind linestart" "$ind lineend"]
     set wordstart [string wordstart $line $i]
     set wordend   [expr {[string wordend $line $i] - 1}]
-    set w [crange $line $wordstart $wordend]
+    set w [string range $line $wordstart $wordend]
     pipe_word $w
     if {[catch { string trim $response } r]} {
 	return



More information about the Tkabber-dev mailing list