[Tkabber-dev] r2172 - trunk/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Wed Feb 11 09:48:49 MSK 2015


Author: sergei
Date: 2015-02-11 09:48:48 +0300 (Wed, 11 Feb 2015)
New Revision: 2172

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/default.tcl
Log:
	* default.tcl: Made use of the $::webbrowser config variable more
	  robust (for example, allowed spaces inside the browser path).


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2015-02-08 18:47:18 UTC (rev 2171)
+++ trunk/tkabber/ChangeLog	2015-02-11 06:48:48 UTC (rev 2172)
@@ -1,3 +1,8 @@
+2015-02-11  Sergei Golovan  <sgolovan at nes.ru>
+
+	* default.tcl: Made use of the $::webbrowser config variable more
+	  robust (for example, allowed spaces inside the browser path).
+
 2015-02-08  Sergei Golovan  <sgolovan at nes.ru>
 
 	* datagathering.tcl: Destroy all open data windows on disconnect

Modified: trunk/tkabber/default.tcl
===================================================================
--- trunk/tkabber/default.tcl	2015-02-08 18:47:18 UTC (rev 2171)
+++ trunk/tkabber/default.tcl	2015-02-11 06:48:48 UTC (rev 2172)
@@ -1,7 +1,5 @@
 # $Id$
 
-package require textutil
-
 if {$tcl_platform(platform) == "windows"} {
     package require dde
 }
@@ -36,7 +34,16 @@
     if {[info exists ::webbrowser] && $::webbrowser != ""} {
 	# If user specified a browser, use it
 
-	eval exec [textutil::splitx [format $::webbrowser $url]] &
+	set cmd {exec}
+	if {[catch { llength $::webbrowser }]} {
+	    error "Can't process the \$::webbrowser variable. It must be a list of words."
+	} else {
+	    foreach word $::webbrowser {
+		lappend cmd [format $word $url]
+	    }
+	}
+	lappend cmd &
+	eval $cmd
 	return
     }
 



More information about the Tkabber-dev mailing list