From: Mike C. <mik...@us...> - 2002-09-14 17:25:08
|
Update of /cvsroot/maxima/maxima/interfaces/xmaxima In directory usw-pr-cvs1:/tmp/cvs-serv1961 Modified Files: xmaxima.tcl Log Message: Back out height/width change - it breaks plotting Index: xmaxima.tcl =================================================================== RCS file: /cvsroot/maxima/maxima/interfaces/xmaxima/xmaxima.tcl,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- xmaxima.tcl 13 Sep 2002 17:34:12 -0000 1.31 +++ xmaxima.tcl 14 Sep 2002 17:25:05 -0000 1.32 @@ -136,7 +136,7 @@ " If given, [url] will be opened in the help browser instead" \ " of the default starting page." \ "options:" \ - " --help: Display this usage message." + " --help: Display this usage message." if {$tcl_platform(platform) != "windows"} { lappend usage \ " -l <lisp>, --lisp=<lisp>: Use lisp implementation <lisp>." @@ -266,25 +266,25 @@ clearLocal $w oset $w heightDesired 80% set maxima_priv(maximaWindow) $w - + closeMaxima $w clearLocal $w # oset $w program $program - oset $w prompt "% " + oset $w prompt "% " catch { destroy $w } ; frame $fr.bottom -height 2 $fr.bottom config -cursor double_arrow bind $fr.bottom <B1-Motion> "changeSize $w %Y" pack $fr.bottom -side bottom -fill x - + text $w -background white -yscrollcommand "$fr.scroll set" set maxima_priv($w,inputTag) input resetMaximaFont $w scrollbar $fr.scroll -command "$w yview" pack $fr.scroll -side right -fill y bind $w <Destroy> "closeMaxima $w" - + $w mark set lastStart end $w mark gravity lastStart left bind $w <Configure> "resizeSubPlotWindows $w %w %h; resizeMaxima $w %w %h" @@ -309,14 +309,28 @@ vMAXSetCNTextBindings $w wm protocol . WM_DELETE_WINDOW [list vMAXExit $fr.text] - update - if {[set h [winfo reqheight .]] > \ - [set max [expr [winfo screenheight .] \ - - (2 * abs($fontSize))]]} { - set cur [$btext cget -height] - set delta [expr \ - int (($h - $max) / abs($fontSize))] - $btext config -height [expr $cur - $delta] + if {0} { + # Simple apporach won't work with plotting + update + if {[set h [winfo reqheight .]] > \ + [set max [expr [winfo screenheight .] \ + - (2 * abs($fontSize))]]} { + set cur [$btext cget -height] + set delta [expr \ + int (($h - $max) / abs($fontSize))] + $btext config -height [expr $cur - $delta] + } + + } else { + # There's voodo that makes this work with plotting + # May the force be with you. + desetq "width height" [getMaxDimensions] + wm geometry . ${width}x${height} + update + + if { [winfo height $fr] > .8 * [winfo height .] } { + $fr.text config -height 15 + } } |