home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / tcl / 1925 < prev    next >
Encoding:
Text File  |  1992-11-22  |  1.9 KB  |  60 lines

  1. Newsgroups: comp.lang.tcl
  2. Path: sparky!uunet!newsgate.watson.ibm.com!yktnews!admin!ghostwind!shmdgljd
  3. From: shmdgljd@rchland.vnet.ibm.com (Jay Schmidgall)
  4. Subject: patch for tkfonts
  5. Sender: news@rchland.ibm.com
  6. Message-ID: <1992Nov23.165238.9010@rchland.ibm.com>
  7. Date: Mon, 23 Nov 1992 16:52:38 GMT
  8. Reply-To: jay@vnet.ibm.com
  9. Disclaimer: This posting represents the poster's views, not necessarily those of IBM
  10. References:  <1992Nov19.150554.25365@rchland.ibm.com>
  11. Nntp-Posting-Host: ghostwind.rchland.ibm.com
  12. Organization: IBM Rochester, MN
  13. Lines: 45
  14.  
  15. Apparently, 7x13b must just be a local alias for 7x13bold. Display font
  16. with Double button 1, rather than just Button1, and Button 3 to close
  17. the selected font. Also fixes a problem with font names that have spaces,
  18. e.g., *-new century schoolbook-*.  Ray Davis and Don Libes noted the 7x13b
  19. problem, Ray provided the Button3 to close/Double-1 to display.
  20.  
  21. I would've posted a context diff, but it'd be as long as the original.
  22.  
  23. 4c4,5
  24. <     global text
  25. ---
  26. >     global text font winlist
  27. >     set font [lindex "$args" 0]
  28. 5a7
  29. >     set winlist($font) $w
  30. 7c9
  31. <     wm title $w $args
  32. ---
  33. >     wm title $w "$font"
  34. 16c18
  35. <     text $w.t1 -font $args \
  36. ---
  37. >     text $w.t1 -font "$font" \
  38. 45c47
  39. <     -font 7x13b \
  40. ---
  41. >     -font 7x13bold \
  42. 49,50c51,60
  43. < bind .frame.list <ButtonRelease-1> \
  44. <     { showfont %t [%W get [%W curselection]] }
  45. ---
  46. > bind .frame.list <Double-Button-1> \
  47. > {
  48. >     if { [catch { wm withdraw $winlist([%W get [%W curselection]]) }] } {
  49. >     showfont %t [ %W get [%W curselection]]
  50. >     } else {
  51. >     wm deiconify $winlist([%W get [%W curselection]])
  52. >     }
  53. > }
  54. > bind .frame.list <ButtonRelease-3> \
  55. >     { catch { destroy $winlist([%W get [%W curselection]]) } }
  56.  
  57. -- 
  58. : jay          jay@vnet.ibm.com    My opinions and ideas, not my employer's.
  59. : shmdgljd@rchland.vnet.ibm.com    (c) Copyright 1992.  All rights reserved.
  60.