+2005-09-12 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * tkcon.tcl (::tkcon::AtSource): do not require argv to be defined
+ (edit): enable text -undo in editor
+ (::tkcon::InitUI): shrink aqua resize control space alloted
+
2005-07-14 Jeff Hobbs <jeffh@ActiveState.com>
* tkcon.tcl: add ::tkcon::OPT(maxlinelen) (default 0 == unlimited)
grid rowconfigure $sbar 0 -weight 1
grid rowconfigure $PRIV(tabframe) 0 -weight 1
if {$::tcl_version >= 8.4 && [tk windowingsystem] == "aqua"} {
- # give space for the corner resize handle
- grid columnconfigure $sbar [lindex [grid size $sbar] 0] -minsize 20
+ # resize control space
+ grid columnconfigure $sbar [lindex [grid size $sbar] 0] -minsize 16
}
## Create console tab
if {$idx != -1} { catch {load {} Tbcload $tmp} }
lappend PRIV(interps) [$tmp eval [list tk appname \
"[tk appname] $tmp"]]
- if {[info exist argv0]} {$tmp eval [list set argv0 $argv0]}
- $tmp eval set argc $argc
- $tmp eval [list set argv $argv]
+ if {[info exists argv0]} {$tmp eval [list set argv0 $argv0]}
+ if {[info exists argc]} {$tmp eval [list set argc $argc]}
+ if {[info exists argv]} {$tmp eval [list set argv $argv]}
$tmp eval [list namespace eval ::tkcon {}]
$tmp eval [list set ::tkcon::PRIV(name) $tmp]
$tmp eval [list set ::tkcon::PRIV(SCRIPT) $::tkcon::PRIV(SCRIPT)]
-background $::tkcon::COLOR(bg) \
-insertbackground $::tkcon::COLOR(cursor) \
-font $::tkcon::OPT(font)
+ catch {$w.text configure -undo 1}
scrollbar $w.sx -orient h -takefocus 0 -bd 1 \
-command [list $w.text xview]
scrollbar $w.sy -orient v -takefocus 0 -bd 1 \
## Initialize only if we haven't yet, and do other stuff that prepares to
## run. It only actually inits (and runs) tkcon if it is the main script.
##
-proc ::tkcon::AtSource {argv} {
+proc ::tkcon::AtSource {} {
variable PRIV
# the info script assumes we always call this while being sourced
if {(![info exists PRIV(root)] || ![winfo exists $PRIV(root)]) \
&& (![info exists ::argv0] || $PRIV(SCRIPT) == $::argv0)} {
- eval ::tkcon::Init $argv
+ global argv
+ if {[info exists argv]} {
+ eval ::tkcon::Init $argv
+ } else {
+ ::tkcon::Init
+ }
}
}
-tkcon::AtSource $argv
+tkcon::AtSource
package provide tkcon $::tkcon::VERSION