table.patch 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. Description: Patch restores blt::table command which was renamed to
  2. blt::blttable in 2.5.3.
  3. TODO: Make the blttable alias if necessary.
  4. Author: Sergei Golovan
  5. Last-Modified: Fri, 04 Jul 2014 09:22:10 +0400
  6. --- a/demos/tour.tcl
  7. +++ b/demos/tour.tcl
  8. @@ -22,7 +22,7 @@
  9. # --------------------------------------------------------------------------
  10. if { $tcl_version >= 8.0 } {
  11. namespace import -force blt::*
  12. - interp alias {} table {} blttable
  13. + #interp alias {} table {} blttable
  14. #namespace import -force blt::tile::*
  15. }
  16. source scripts/demo.tcl
  17. --- a/generic/bltTable.c
  18. +++ b/generic/bltTable.c
  19. @@ -24,7 +24,7 @@
  20. * out of or in connection with the use or performance of this
  21. * software.
  22. *
  23. - * The "blttable" geometry manager was created by George Howlett.
  24. + * The "table" geometry manager was created by George Howlett.
  25. */
  26. /*
  27. @@ -85,7 +85,7 @@
  28. static Tk_GeomMgr tableMgrInfo =
  29. {
  30. - "blttable", /* Name of geometry manager used by winfo */
  31. + "table", /* Name of geometry manager used by winfo */
  32. WidgetGeometryProc, /* Procedure to for new geometry requests */
  33. WidgetCustodyProc, /* Procedure when widget is taken away */
  34. };
  35. @@ -4955,7 +4955,7 @@
  36. Blt_TableInit(interp)
  37. Tcl_Interp *interp;
  38. {
  39. - static Blt_CmdSpec cmdSpec = {"blttable", TableCmd, };
  40. + static Blt_CmdSpec cmdSpec = {"table", TableCmd, };
  41. TableInterpData *dataPtr;
  42. dataPtr = GetTableInterpData(interp);
  43. --- a/library/graph.tcl
  44. +++ b/library/graph.tcl
  45. @@ -434,50 +434,50 @@
  46. set row 1
  47. set col 0
  48. label $top.title -text "PostScript Options"
  49. - blttable $top $top.title -cspan 7
  50. + blt::table $top $top.title -cspan 7
  51. foreach bool { center landscape maxpect preview decorations } {
  52. set w $top.$bool-label
  53. label $w -text "-$bool" -font *courier*-r-*12*
  54. - blttable $top $row,$col $w -anchor e -pady { 2 0 } -padx { 0 4 }
  55. + blt::table $top $row,$col $w -anchor e -pady { 2 0 } -padx { 0 4 }
  56. set w $top.$bool-yes
  57. global $graph.$bool
  58. radiobutton $w -text "yes" -variable $graph.$bool -value 1
  59. - blttable $top $row,$col+1 $w -anchor w
  60. + blt::table $top $row,$col+1 $w -anchor w
  61. set w $top.$bool-no
  62. radiobutton $w -text "no" -variable $graph.$bool -value 0
  63. - blttable $top $row,$col+2 $w -anchor w
  64. + blt::table $top $row,$col+2 $w -anchor w
  65. incr row
  66. }
  67. label $top.modes -text "-colormode" -font *courier*-r-*12*
  68. - blttable $top $row,0 $top.modes -anchor e -pady { 2 0 } -padx { 0 4 }
  69. + blt::table $top $row,0 $top.modes -anchor e -pady { 2 0 } -padx { 0 4 }
  70. set col 1
  71. foreach m { color greyscale } {
  72. set w $top.$m
  73. radiobutton $w -text $m -variable $graph.colormode -value $m
  74. - blttable $top $row,$col $w -anchor w
  75. + blt::table $top $row,$col $w -anchor w
  76. incr col
  77. }
  78. set row 1
  79. frame $top.sep -width 2 -bd 1 -relief sunken
  80. - blttable $top $row,3 $top.sep -fill y -rspan 6
  81. + blt::table $top $row,3 $top.sep -fill y -rspan 6
  82. set col 4
  83. foreach value { padx pady paperwidth paperheight width height } {
  84. set w $top.$value-label
  85. label $w -text "-$value" -font *courier*-r-*12*
  86. - blttable $top $row,$col $w -anchor e -pady { 2 0 } -padx { 0 4 }
  87. + blt::table $top $row,$col $w -anchor e -pady { 2 0 } -padx { 0 4 }
  88. set w $top.$value-entry
  89. global $graph.$value
  90. entry $w -textvariable $graph.$value -width 8
  91. - blttable $top $row,$col+1 $w -cspan 2 -anchor w -padx 8
  92. + blt::table $top $row,$col+1 $w -cspan 2 -anchor w -padx 8
  93. incr row
  94. }
  95. - blttable configure $top c3 -width .125i
  96. + blt::table configure $top c3 -width .125i
  97. button $top.cancel -text "Cancel" -command "destroy $top"
  98. - blttable $top $row,0 $top.cancel -width 1i -pady 2 -cspan 3
  99. + blt::table $top $row,0 $top.cancel -width 1i -pady 2 -cspan 3
  100. button $top.reset -text "Reset" -command "destroy $top"
  101. - #blttable $top $row,1 $top.reset -width 1i
  102. + #blt::table $top $row,1 $top.reset -width 1i
  103. button $top.print -text "Print" -command "blt::ResetPostScript $graph"
  104. - blttable $top $row,4 $top.print -width 1i -pady 2 -cspan 2
  105. + blt::table $top $row,4 $top.print -width 1i -pady 2 -cspan 2
  106. }
  107. proc blt::ResetPostScript { graph } {
  108. --- a/library/tabnotebook.tcl
  109. +++ b/library/tabnotebook.tcl
  110. @@ -215,7 +215,7 @@
  111. set top "$widget.toplevel-$id"
  112. toplevel $top
  113. $widget tab tearoff $tab $top.container
  114. - blttable $top $top.container -fill both
  115. + table $top $top.container -fill both
  116. incr rootX 10 ; incr rootY 10
  117. wm geometry $top +$rootX+$rootY