- Russian help files was conerting into utf-8 encode
This commit is contained in:
@@ -715,21 +715,12 @@ proc GoToURL {url} {
|
||||
|
||||
proc launchBrowser {url} {
|
||||
global tcl_platform
|
||||
|
||||
if {$tcl_platform(platform) eq "windows"} {
|
||||
# first argument to "start" is "window title", which is not used here
|
||||
set command [list {*}[auto_execok start] {}]
|
||||
# (older) Windows shell would start a new command after &, so shell escape it with ^
|
||||
#set url [string map {& ^&} $url]
|
||||
# but 7+ don't seem to (?) so this nonsense is gone
|
||||
if {[file isdirectory $url]} {
|
||||
# if there is an executable named eg ${url}.exe, avoid opening that instead:
|
||||
set url [file nativename [file join $url .]]
|
||||
}
|
||||
} elseif {$tcl_platform(os) eq "Darwin"} {
|
||||
# It *is* generally a mistake to use $tcl_platform(os) to select functionality,
|
||||
# particularly in comparison to $tcl_platform(platform). For now, let's just
|
||||
# regard it as a stylistic variation subject to debate.
|
||||
set command [list open]
|
||||
} else {
|
||||
set command [list xdg-open]
|
||||
@@ -737,24 +728,15 @@ proc launchBrowser {url} {
|
||||
exec {*}$command $url &
|
||||
}
|
||||
|
||||
proc _launchBrowser {url} {
|
||||
if [catch {launchBrowser $url} err] {
|
||||
tk_messageBox -icon error -message "error '$err' with '$command'"
|
||||
}
|
||||
}
|
||||
|
||||
## SEND EMAIL PROCEDURE ##
|
||||
proc SendEmail {mail} {
|
||||
global env tcl_platform
|
||||
if {$tcl_platform(platform) == "windows"} {
|
||||
|
||||
} elseif {$tcl_platform(platform) == "mac"} {
|
||||
|
||||
} elseif {$tcl_platform(platform) == "unix"} {
|
||||
set pipe [open "|xdg-open $mail" "r"]
|
||||
fileevent $pipe readable
|
||||
fconfigure $pipe -buffering none -blocking no
|
||||
|
||||
}
|
||||
}
|
||||
## QUIT PROJECT MANAGER PROCEDURE ##
|
||||
@@ -1102,3 +1084,4 @@ proc GetExtention {node} {
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user