[Tkabber-dev] r1488 - in trunk/tkabber: . ifacetk jabberlib plugins/general plugins/windows

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Mon Aug 25 14:14:35 MSD 2008


Author: sergei
Date: 2008-08-25 14:14:35 +0400 (Mon, 25 Aug 2008)
New Revision: 1488

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/ifacetk/systray.tcl
   trunk/tkabber/jabberlib/jlibauth.tcl
   trunk/tkabber/jabberlib/jlibcomponent.tcl
   trunk/tkabber/jabberlib/jlibcompress.tcl
   trunk/tkabber/jabberlib/jlibsasl.tcl
   trunk/tkabber/jabberlib/jlibtls.tcl
   trunk/tkabber/plugins/general/headlines.tcl
   trunk/tkabber/plugins/windows/taskbar.tcl
Log:
	* ifacetk/systray.tcl, jabberlib/jlibauth.tcl,
	  jabberlib/jlibcomponent.tcl, jabberlib/jlibcompress.tcl,
	  jabberlib/jlibsasl.tcl, jabberlib/jlibtls.tcl,
	  plugins/general/headlines.tcl, plugins/windows/taskbar.tcl: Fixed
	  usage of [namespace code] in callbacks. The previous behavior
	  reveals bug in Tcl/Tk 8.6a2 and newer due to a bug in Tcl 8.6a1 or
	  older.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2008-08-24 09:14:36 UTC (rev 1487)
+++ trunk/tkabber/ChangeLog	2008-08-25 10:14:35 UTC (rev 1488)
@@ -1,3 +1,13 @@
+2008-08-25  Sergei Golovan  <sgolovan at nes.ru>
+
+	* ifacetk/systray.tcl, jabberlib/jlibauth.tcl,
+	  jabberlib/jlibcomponent.tcl, jabberlib/jlibcompress.tcl,
+	  jabberlib/jlibsasl.tcl, jabberlib/jlibtls.tcl,
+	  plugins/general/headlines.tcl, plugins/windows/taskbar.tcl: Fixed
+	  usage of [namespace code] in callbacks. The previous behavior
+	  reveals bug in Tcl/Tk 8.6a2 and newer due to a bug in Tcl 8.6a1 or
+	  older.
+
 2008-08-24  Sergei Golovan  <sgolovan at nes.ru>
 
 	* plugins/unix/menu8.4.tcl: Enabled plugin for Tcl/Tk 8.6.

Modified: trunk/tkabber/ifacetk/systray.tcl
===================================================================
--- trunk/tkabber/ifacetk/systray.tcl	2008-08-24 09:14:36 UTC (rev 1487)
+++ trunk/tkabber/ifacetk/systray.tcl	2008-08-25 10:14:35 UTC (rev 1488)
@@ -61,12 +61,12 @@
 	}
     }
 
-    $state(create) $icon
+    uplevel #0 $state(create) [list $icon]
     update $icon ::curuserstatus
     update $icon ::tabcolors
 
     foreach var [list curuserstatus tabcolors] {
-        trace variable ::$var w [list [namespace code update] $icon]
+        trace variable ::$var w [namespace code [list update $icon]]
     }
 }
 
@@ -78,7 +78,7 @@
     catch {
 	upvar 0 [token $icon] state
 
-	$state(destroy) $icon
+	uplevel #0 $state(destroy) [list $icon]
 	unset state
 
 	set id [lsearch -exact $icons $icon]
@@ -88,7 +88,7 @@
     }
 
     foreach var [list curuserstatus tabcolors] {
-        trace vdelete ::$var w [list [namespace code update] $icon]
+        trace vdelete ::$var w [namespace code [list update $icon]]
     }
 }
 
@@ -247,7 +247,7 @@
     switch -- [string trimleft $name1 :] {
 	curuserstatus {
 	    if {$state(tray) == ""} {
-		$state(configure) $icon $curuserstatus
+		uplevel #0 $state(configure) [list $icon $curuserstatus]
 	    }
 	}
 
@@ -291,13 +291,13 @@
 	set state(tray) \
 	    [after 500 [list [namespace current]::toggle $icon [expr {!$ff}]]]
 	if {$ff} {
-	    $state(configure) $icon message$hitP
+	    uplevel #0 $state(configure) [list $icon message$hitP]
 	} else {
-	    $state(configure) $icon blank
+	    uplevel #0 $state(configure) [list $icon blank]
 	}
     } else {
 	set state(tray) message
-	$state(configure) $icon message$hitP
+	uplevel #0 $state(configure) [list $icon message$hitP]
     }
 }
 

Modified: trunk/tkabber/jabberlib/jlibauth.tcl
===================================================================
--- trunk/tkabber/jabberlib/jlibauth.tcl	2008-08-24 09:14:36 UTC (rev 1487)
+++ trunk/tkabber/jabberlib/jlibauth.tcl	2008-08-25 10:14:35 UTC (rev 1488)
@@ -62,7 +62,7 @@
     eval [list configure $token] $args
 
     jlib::register_xmlns $state(-connid) $::NS(iq-auth) \
-	[list [namespace code parse] $token]
+	[namespace code [list parse $token]]
     
     return $token
 }
@@ -141,7 +141,7 @@
 
     jlib::trace_stream_features \
 	$state(-connid) \
-	[list [namespace code auth_continue] $token]
+	[namespace code [list auth_continue $token]]
 }
 
 ##########################################################################
@@ -168,7 +168,7 @@
 				     -chdata $state(-username)]]]
 
     jlib::send_iq get $data \
-	-command [list [namespace code auth_continue2] $token] \
+	-command [namespace code [list auth_continue2 $token]] \
 	-connection $state(-connid)
 }
 
@@ -254,7 +254,7 @@
 
     jlib::client status [::msgcat::mc "Waiting for authentication results"]
     jlib::send_iq set $data \
-	-command [list [namespace code finish] $token] \
+	-command [namespace code [list finish $token]] \
 	-connection $state(-connid)
 }
 

Modified: trunk/tkabber/jabberlib/jlibcomponent.tcl
===================================================================
--- trunk/tkabber/jabberlib/jlibcomponent.tcl	2008-08-24 09:14:36 UTC (rev 1487)
+++ trunk/tkabber/jabberlib/jlibcomponent.tcl	2008-08-25 10:14:35 UTC (rev 1488)
@@ -60,9 +60,9 @@
     eval [list configure $token] $args
 
     jlib::register_element $state(-connid) handshake \
-	[list [namespace code parse] $token]
+	[namespace code [list parse $token]]
     jlib::register_element $state(-connid) error \
-	[list [namespace code parse] $token]
+	[namespace code [list parse $token]]
     
     return $token
 }

Modified: trunk/tkabber/jabberlib/jlibcompress.tcl
===================================================================
--- trunk/tkabber/jabberlib/jlibcompress.tcl	2008-08-24 09:14:36 UTC (rev 1487)
+++ trunk/tkabber/jabberlib/jlibcompress.tcl	2008-08-25 10:14:35 UTC (rev 1488)
@@ -63,9 +63,9 @@
     eval [list configure $token] $args
 
     jlib::register_xmlns $state(-connid) $::NS(fcompress) \
-	[list [namespace code parse] $token]
+	[namespace code [list parse $token]]
     jlib::register_xmlns $state(-connid) $::NS(compress) \
-	[list [namespace code parse] $token]
+	[namespace code [list parse $token]]
 
     return $token
 }
@@ -144,7 +144,7 @@
     eval [list configure $token] $args
 
     jlib::trace_stream_features $state(-connid) \
-	[list [namespace code continue] $token]
+	[namespace code [list continue $token]]
 }
 
 ##########################################################################

Modified: trunk/tkabber/jabberlib/jlibsasl.tcl
===================================================================
--- trunk/tkabber/jabberlib/jlibsasl.tcl	2008-08-24 09:14:36 UTC (rev 1487)
+++ trunk/tkabber/jabberlib/jlibsasl.tcl	2008-08-25 10:14:35 UTC (rev 1488)
@@ -110,7 +110,7 @@
     eval [list configure $token] $args
 
     jlib::register_xmlns $state(-connid) $::NS(sasl) \
-	[list [namespace code parse] $token]
+	[namespace code [list parse $token]]
 
     return $token
 }
@@ -238,8 +238,7 @@
 	tclsasl {
 	    foreach id {authname pass getrealm cnonce} {
 		lappend callbacks \
-		    [list $id [list [namespace code tclsasl_callback] \
-				    $token]]
+		    [list $id [namespace code [list tclsasl_callback $token]]]
 	    }
 
 	    set state(-token) \
@@ -265,15 +264,15 @@
 		[SASL::new -service xmpp \
 			   -type client \
 			   -server $state(-server) \
-			   -callback [list [namespace code tcllib_callback] \
-					   $token]]
+			   -callback [namespace code [list tcllib_callback \
+							   $token]]]
 	    # Workaround a bug 1545306 in tcllib SASL module
 	    set ::SASL::digest_md5_noncecount 0
 	}
     }
 
     jlib::trace_stream_features $state(-connid) \
-	[list [namespace code auth_continue] $token]
+	[namespace code [list auth_continue $token]]
 }
 
 ##########################################################################
@@ -303,7 +302,7 @@
 		$state(-token) \
 		    -operation start \
 		    -mechanisms $state(-mechanisms) \
-		    -interact [list [namespace code interact] $token]
+		    -interact [namespace code [list interact $token]]
 	    } result]
 	}
 	tcllib {
@@ -405,7 +404,7 @@
 		$state(-token) \
 		    -operation step \
 		    -input     $serverin \
-		    -interact  [list [namespace code interact] $token]
+		    -interact  [namespace code [list interact $token]]
 	    } result]
 	}
 	tcllib {
@@ -548,7 +547,7 @@
 		       -connection $state(-connid)
 	
     jlib::trace_stream_features $state(-connid) \
-	[list [namespace code resource_bind] $token]
+	[namespace code [list resource_bind $token]]
 }
 
 ##########################################################################
@@ -563,7 +562,7 @@
 				      -chdata $state(-resource)]]]
 
     jlib::send_iq set $data \
-	-command [list [namespace code send_session] $token] \
+	-command [namespace code [list send_session $token]] \
 	-connection $state(-connid)
     
 }
@@ -597,7 +596,7 @@
 			  -vars [list xmlns $::NS(session)]]
 
 	    jlib::send_iq set $data \
-		-command [list [namespace code finish] $token] \
+		-command [namespace code [list finish $token]] \
 		-connection $state(-connid)
 	}
 	default {

Modified: trunk/tkabber/jabberlib/jlibtls.tcl
===================================================================
--- trunk/tkabber/jabberlib/jlibtls.tcl	2008-08-24 09:14:36 UTC (rev 1487)
+++ trunk/tkabber/jabberlib/jlibtls.tcl	2008-08-25 10:14:35 UTC (rev 1488)
@@ -61,7 +61,7 @@
     eval [list configure $token] $args
 
     jlib::register_xmlns $state(-connid) $::NS(tls) \
-	[list [namespace code parse] $token]
+	[namespace code [list parse $token]]
 
     return $token
 }
@@ -149,7 +149,7 @@
     eval [list configure $token] $args
 
     jlib::trace_stream_features $state(-connid) \
-	[list [namespace code tls_continue] $token]
+	[namespace code [list tls_continue $token]]
 }
 
 ##########################################################################

Modified: trunk/tkabber/plugins/general/headlines.tcl
===================================================================
--- trunk/tkabber/plugins/general/headlines.tcl	2008-08-24 09:14:36 UTC (rev 1487)
+++ trunk/tkabber/plugins/general/headlines.tcl	2008-08-25 10:14:35 UTC (rev 1488)
@@ -386,8 +386,8 @@
     if {$url != ""} {
         ::plugins::urls::render_url $wbody url $url {} \
 	    -title [::msgcat::mc "Read on..."] \
-            -add-command [list [namespace code action] markseen \
-			       [winfo parent $tw] $node]
+            -add-command [namespace code [list action markseen \
+			       [winfo parent $tw] $node]]
     }
 
     $wbody mark set sel_start end

Modified: trunk/tkabber/plugins/windows/taskbar.tcl
===================================================================
--- trunk/tkabber/plugins/windows/taskbar.tcl	2008-08-24 09:14:36 UTC (rev 1487)
+++ trunk/tkabber/plugins/windows/taskbar.tcl	2008-08-25 10:14:35 UTC (rev 1488)
@@ -106,7 +106,7 @@
     set m [ifacetk::systray::popupmenu .tray]
 
     winico taskbar add $icon -pos $s2p(unavailable) \
-	   -callback [list [namespace code callback] $m %m %x %y] \
+	   -callback [namespace code [list callback $m %m %x %y]] \
 	   -text [ifacetk::systray::balloon_text]
 }
 



More information about the Tkabber-dev mailing list