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