Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix disappearing text in clickLink proc |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
9207cda0d880106b84cd26d8d451cb82 |
User & Date: | kevin 2019-08-24 15:01:29 |
Context
2019-08-24
| ||
15:41 | More fixes check-in: c1e83138e0 user: kevin tags: trunk | |
15:01 | Fix disappearing text in clickLink proc check-in: 9207cda0d8 user: kevin tags: trunk | |
2019-08-21
| ||
06:18 | UI pretty much working now, need to polish and update user docs check-in: bb18dda27a user: kevin tags: trunk | |
Changes
Changes to libs/manpower/manpower-main.tcl.
︙ | ︙ | |||
19 20 21 22 23 24 25 | R0lGODlhDgAOAJEAANnZ2YCAgPz8/P///yH5BAEAAAAALAAAAAAOAA4AAAImhI+ py+1LIsJHiBAh+BgmiEAJQITgW6DgUQIAECH4JN8IPqYuNxUAOw==} image create photo downArrow -data { R0lGODlhDgAOAJEAANnZ2YCAgPz8/P///yH5BAEAAAAALAAAAAAOAA4AAAInhI+ py+1I4ocQ/IgDEYIPgYJICUCE4F+YIBolEoKPEJKZmVJK6ZACADs=} image create photo noArrow -height 14 -width 14 | < < < > | | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | R0lGODlhDgAOAJEAANnZ2YCAgPz8/P///yH5BAEAAAAALAAAAAAOAA4AAAImhI+ py+1LIsJHiBAh+BgmiEAJQITgW6DgUQIAECH4JN8IPqYuNxUAOw==} image create photo downArrow -data { R0lGODlhDgAOAJEAANnZ2YCAgPz8/P///yH5BAEAAAAALAAAAAAOAA4AAAInhI+ py+1I4ocQ/IgDEYIPgYJICUCE4F+YIBolEoKPEJKZmVJK6ZACADs=} image create photo noArrow -height 14 -width 14 #handle "get URL" event for man page proc showManURL {man} { global manitem set manitem [lindex [split $man "//"] 2] singleManPage } #main AppleScript command proc showPage {man} { global manitem set manitem "" set manitem $man singleManPage set text [.middle.right.lower.right.log get 1.0 end] return $text |
︙ | ︙ | |||
488 489 490 491 492 493 494 | global manitem global manterm global status global rmanpath global cachedir .middle.left.tree selection remove [.middle.left.tree selection] | < < < | | 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 | global manitem global manterm global status global rmanpath global cachedir .middle.left.tree selection remove [.middle.left.tree selection] clearData clearText .middle.right.lower.right.log configure -state normal set rawman [exec man $manitem > $cachedir/$manitem-man.txt 2>$cachedir/manerror] set getman [exec $rmanpath -f Tk $cachedir/$manitem-man.txt > $cachedir/$manitem.txt 2>$cachedir/rmanerror] after 50 set readman [open $cachedir/$manitem.txt ] set mantext [read $readman] close $readman |
︙ | ︙ | |||
521 522 523 524 525 526 527 528 529 530 531 532 533 534 | global manitem global status global rmanpath global cachedir set item [lindex [.middle.right.upper.frame.listbox item [.middle.right.upper.frame.listbox selection] -values] 0] #parse man page name from list set mansplit [split $item \(] set manitem [lindex $mansplit 0] set mansection [lindex [split [lindex $mansplit 1] \)] 0] | > > > > | 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 | global manitem global status global rmanpath global cachedir set item [lindex [.middle.right.upper.frame.listbox item [.middle.right.upper.frame.listbox selection] -values] 0] if {$item == ""} { return } #parse man page name from list set mansplit [split $item \(] set manitem [lindex $mansplit 0] set mansection [lindex [split [lindex $mansplit 1] \)] 0] |
︙ | ︙ | |||
761 762 763 764 765 766 767 | set getman [exec $rmanpath -f HTML $cachedir/$manitem-man.txt > $cachedir/$manitem.html 2>$cachedir/htmlerror] after 50 file copy -force $cachedir/$manitem.html $HTMLfile } | < < > > | 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 | set getman [exec $rmanpath -f HTML $cachedir/$manitem-man.txt > $cachedir/$manitem.html 2>$cachedir/htmlerror] after 50 file copy -force $cachedir/$manitem.html $HTMLfile } #bindings for clicking on link proc clickLink { xpos ypos } { global manitem global rmanpath .middle.right.lower.right.log configure -cursor pointinghand .tool.toolbar.frame.browser delete 0 end set i [ .middle.right.lower.right.log index @$xpos,$ypos] set range [ .middle.right.lower.right.log tag prevrange manref $i] set final [eval .middle.right.lower.right.log get $range] set new [lindex [split $final \(] 0] set manitem $new singleManPage .middle.right.lower.right.log configure -cursor arrow } #print data to default printer proc printFile {} { global manitem |
︙ | ︙ | |||
857 858 859 860 861 862 863 | proc getManPagefromBookmark {} { global bookmarklist global manitem set manitem [ .bookmarks.top.list get [.bookmarks.top.list curselection]] | < < | 856 857 858 859 860 861 862 863 864 865 866 867 868 869 | proc getManPagefromBookmark {} { global bookmarklist global manitem set manitem [ .bookmarks.top.list get [.bookmarks.top.list curselection]] singleManPage } #read bookmarks proc readBookMarks {} { |
︙ | ︙ | |||
896 897 898 899 900 901 902 | #"about application" command proc tkAboutDialog {} { aboutWindow } | < < < < < | 893 894 895 896 897 898 899 900 901 902 903 904 905 906 | #"about application" command proc tkAboutDialog {} { aboutWindow } #initialize the app proc startUp {} { global appname global appversion global datadir global rmanpath global cachedir |
︙ | ︙ | |||
964 965 966 967 968 969 970 | #handle program shutdown via command-q proc ::tk::mac::Quit {} { exit } | < < < < < < < < < < < < < | < | 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 | #handle program shutdown via command-q proc ::tk::mac::Quit {} { exit } #command for services menu proc ::tk::mac::PerformService {} { global manitem set manitem [clipboard get] singleManPage } #custom "about" dialog proc aboutWindow {} { tk_messageBox -parent . -icon info -title "About Manpower" -message "Manpower: Man Page Viewer" -detail "Version 7.0\n(c) 2019 WordTech Communications LLC" } #raise window if closed--dock click proc ::tk::mac::ReopenApplication {} { if { [wm state .] == "withdrawn"} { wm state . normal raise . } else { wm deiconify . raise . } } startUp |