This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
[patch] fix srctextwin warning
- From: "Martin M. Hunt" <hunt at redhat dot com>
- To: Insight Mailing List <insight at sources dot redhat dot com>
- Date: Fri, 11 Jan 2002 15:27:42 -0800
- Subject: [patch] fix srctextwin warning
- Organization: Red Hat Inc
I checked this in as an obvious fix.
--
Martin Hunt
GDB Engineer
Red Hat, Inc.
2002-01-11 Martin M. Hunt <hunt@redhat.com>
* library/srctextwin.itb: Check for existence of $twin.
Index: library/srctextwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/srctextwin.itb,v
retrieving revision 1.29
diff -u -p -r1.29 srctextwin.itb
--- srctextwin.itb 2002/01/03 21:13:03 1.29
+++ srctextwin.itb 2002/01/11 23:24:00
@@ -349,19 +349,19 @@ body SrcTextWin::enable {on} {
set status disabled
}
- bind $twin <B1-Motion> $bnd
- bind $twin <Double-1> $bnd
- bind $twin <Triple-1> $bnd
- enable_disable_src_tags $twin $status
+ if {[winfo exists $twin]} {
+ bind $twin <B1-Motion> $bnd
+ bind $twin <Double-1> $bnd
+ bind $twin <Triple-1> $bnd
+ enable_disable_src_tags $twin $status
+ $twin configure -cursor $glyph
+ }
+
if {$bwin != ""} {
bind $bwin <B1-Motion> $bnd
bind $bwin <Double-1> $bnd
bind $bwin <Triple-1> $bnd
enable_disable_src_tags $bwin $status
- }
-
- $twin configure -cursor $glyph
- if {$bwin != ""} {
$bwin configure -cursor $glyph
}
}