From: Pat Thoyts Date: Thu, 21 Mar 2002 00:42:55 +0000 (+0000) Subject: Ammending the wish startup line. X-Git-Tag: r5_1_6p7~6 X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=21e459fb6c031f4b3076b2dc02e68f4ba1c032be;p=tkinspect Ammending the wish startup line. Added DDE implementation of 'send' for Windows. Fixed bug in closing the application under windows. Ammended the UI of the comm connection dialog. --- diff --git a/ChangeLog b/ChangeLog index 29ab3aa..ac9a719 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +Thu Mar 21 00:32:17 2002 Pat Thoyts + + * tkinspect.tcl: Fixed problem with application not closing + properly if not closed via the menu item. + * tkinspect.tcl: Added OK and Cancel buttons to improve the + handling of the comm connection dialog. + +Tue Mar 19 09:12:54 2002 Pat Thoyts + + * tkinspect.tcl: Added a dde implementation of 'send' for use on + Windows. + Thu Mar 14 12:09:24 2002 Pat Thoyts * classes_list.tcl: Updated to support itcl 3.2 info syntax diff --git a/install.tcl b/install.tcl index c5c70ff..b24375a 100644 --- a/install.tcl +++ b/install.tcl @@ -1,6 +1,6 @@ #!/bin/sh # \ -exec wish "$0" "$*" +exec wish "$0" ${1+"$@"} # # $Id$ # @@ -176,8 +176,8 @@ proc install {} { cmdline.tcl interface.tcl tclIndex names.tcl classes_list.tcl objects_list.tcl Intro.html Lists.html Procs.html Globals.html Windows.html - Images.html Canvases.html Menus.html - Value.html Miscellany.html Notes.html WhatsNew.html ChangeLog.html + Images.html Canvases.html Menus.html Classes.html + Value.html Miscellany.html Notes.html WhatsNew.html }] { return } diff --git a/tkinspect.tcl b/tkinspect.tcl index 4f35552..43ace19 100644 --- a/tkinspect.tcl +++ b/tkinspect.tcl @@ -1,6 +1,6 @@ #!/bin/sh #\ -exec @wish@ "$0" ${1+"$@"} +exec wish "$0" ${1+"$@"} # # $Id$ # @@ -42,6 +42,16 @@ if [file exists @tkinspect_library@/tclIndex] { lappend auto_path [set tkinspect_library .] } +# Emulate the 'send' command using the dde package if available. +if {[info command send] == {}} { + if {![catch {package require dde}]} { + dde servername TkInspect-[pid] + proc send {app args} { + eval dde eval [list $app] $args + } + } +} + # Provide non-send based support using tklib's comm package. if {![catch {package require comm}]} { # defer the cleanup for 2 seconds to allow other events to process @@ -168,12 +178,12 @@ dialog tkinspect_main { method reconfig {} { } method destroy {} { + global tkinspect object_delete $slot(windows_info) + if {[incr tkinspect(main_window_count) -1] == 0} tkinspect_exit } method close {} { - global tkinspect after 0 destroy $self - if {[incr tkinspect(main_window_count) -1] == 0} tkinspect_exit } method set_target {target} { set slot(target) $target @@ -213,10 +223,17 @@ dialog tkinspect_main { method fill_interp_menu {} { set m $self.menu.file.m.interps catch {$m delete 0 last} - foreach interp [winfo interps] { - $m add command -label $interp \ - -command [list $self set_target $interp] - } + if {[package present dde]} { + foreach service [dde services TclEval {}] { + $m add command -label [lindex $service 1] \ + -command [list $self set_target [lindex $service 1]] + } + } else { + foreach interp [winfo interps] { + $m add command -label $interp \ + -command [list $self set_target $interp] + } + } } method fill_comminterp_menu {} { set m $self.menu.file.m.comminterps @@ -354,10 +371,12 @@ dialog connect_interp { label $self.l -text "Connect to:" entry $self.e -bd 2 -relief sunken bind $self.e "$self connect" + bind $self.e "destroy $self" pack $self.l -in $self.top -side left pack $self.e -in $self.top -fill x -expand 1 - button $self.close -text "Close" -command "destroy $self" - pack $self.close -side left + button $self.close -text "OK" -width 8 -command "$self connect" + button $self.cancel -text "Cancel" -width 8 -command "destroy $self" + pack $self.close $self.cancel -side left wm title $self "Connect to Interp.." wm iconname $self "Connect to Interp.." focus $self.e diff --git a/value.tcl b/value.tcl index 95984db..0a717f1 100644 --- a/value.tcl +++ b/value.tcl @@ -9,7 +9,7 @@ proc value_no_filter {text} { } widget value { - param width 80 + param width 100 param height 20 param main param savehist 15