[Tkabber-dev] r2170 - trunk/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Feb 8 17:24:46 MSK 2015


Author: sergei
Date: 2015-02-08 17:24:46 +0300 (Sun, 08 Feb 2015)
New Revision: 2170

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/datagathering.tcl
   trunk/tkabber/default.tcl
Log:
	* datagathering.tcl: Destroy all open data windows on disconnect
	  because the forms they access expire.

	* default.tcl: Escape $ sign in the browsing URLs.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2014-12-27 07:25:08 UTC (rev 2169)
+++ trunk/tkabber/ChangeLog	2015-02-08 14:24:46 UTC (rev 2170)
@@ -1,3 +1,10 @@
+2015-02-08  Sergei Golovan  <sgolovan at nes.ru>
+
+	* datagathering.tcl: Destroy all open data windows on disconnect
+	  because the forms they access expire.
+
+	* default.tcl: Escape $ sign in the browsing URLs.
+
 2014-12-27  Sergei Golovan  <sgolovan at nes.ru>
 
 	* muc.tcl: Added title to the configure room dialog window for the

Modified: trunk/tkabber/datagathering.tcl
===================================================================
--- trunk/tkabber/datagathering.tcl	2014-12-27 07:25:08 UTC (rev 2169)
+++ trunk/tkabber/datagathering.tcl	2015-02-08 14:24:46 UTC (rev 2170)
@@ -462,6 +462,20 @@
     return $w
 }
 
+proc data::destroy_windows {xlib} {
+    foreach w [winfo children .] {
+	if {![string match .datagathering* $w]} continue
+
+	# HACK: search for $xlib in the send data command for the window
+	set cmd [$w.bbox itemcget 0 -command]
+	if {[string match "* $xlib *" $cmd]} {
+	    destroy $w
+	}
+    }
+}
+
+hook::add disconnected_hook [namespace current]::data::destroy_windows
+
 ###############################################################################
 
 proc data::request_data {xmlns xlib jid node args} {

Modified: trunk/tkabber/default.tcl
===================================================================
--- trunk/tkabber/default.tcl	2014-12-27 07:25:08 UTC (rev 2169)
+++ trunk/tkabber/default.tcl	2015-02-08 14:24:46 UTC (rev 2170)
@@ -26,7 +26,7 @@
     update idletask
 
     set url [string map {\u0009 %09 \u000a %0a \u000d %0d \u0020 %20
-			 \" %22 \' %27 \< %3c \> %3e
+			 \" %22 \$ %24 \' %27 \< %3c \> %3e
 			 \{ %7b \| %7c \} %7d \\ %5c} $url]
 
     debugmsg browseurl "Mapped URL: '$url'"



More information about the Tkabber-dev mailing list