summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2020-08-12 02:11:03 +0200
committerAki <please@ignore.pl>2020-08-12 02:11:03 +0200
commit60829d8cd9164d8b98327672c5363a301ae5dc39 (patch)
treee9a5ecee885ed8a2528ecee7fba4470aa37f11b7
parentd63c351679504d8e15b8fc4d4b58ca10e48a5239 (diff)
downloadbrowse-60829d8cd9164d8b98327672c5363a301ae5dc39.zip
browse-60829d8cd9164d8b98327672c5363a301ae5dc39.tar.gz
browse-60829d8cd9164d8b98327672c5363a301ae5dc39.tar.bz2
Added support for same window opening through opener and browse in html view
-rwxr-xr-xviewhtml7
1 files changed, 4 insertions, 3 deletions
diff --git a/viewhtml b/viewhtml
index 82dcac1..b56b6ac 100755
--- a/viewhtml
+++ b/viewhtml
@@ -54,9 +54,10 @@ proc click {w x y} {
global baseAddress
set range [$w tag prevrange href [$w index @$x,$y]]
set address [eval $w get $range]
- set presult [exec "./phttp" [makeAddress $address]]
- displayPage $w [lindex $presult 1] [lindex $presult 2]
- # TODO: In the end it must go through browse and opener anyway, to resolve the protocol and mime.
+ set result [exec ./browse -f ./viewhtml [makeAddress $address]]
+ if {[llength $result] == 2} {
+ displayPage $w [lindex $result 0] [lindex $result 1]
+ }
}
proc displayNode {w node tagList} {