[PATCH] make sure transient's master exists
Keith Seitz
keiths@redhat.com
Wed Feb 13 18:38:00 GMT 2002
Hi,
When enabling the splash screen, Insight will not run. This happens
because ManagedWin::_create uses the first available SrcWin as the master
window. Of course, when the splash screen is displayed, no SrcWins exist
yet, and the code errors.
The following patch will make sure that there is a source window
available. If none are, it will use "." as the master window for the
transient.
Keith
ChangeLog
2002-02-13 Keith Seitz <keiths@redhat.com>
* library/managedwin.itb (_create): If given a transient window,
make sure that the SrcWin that is to become its master exists;
otherwise, use ".".
Patch
Index: library/managedwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/managedwin.itb,v
retrieving revision 1.23
diff -p -r1.23 managedwin.itb
*** library/managedwin.itb 2002/01/03 00:03:46 1.23
--- library/managedwin.itb 2002/02/14 02:36:07
*************** body ManagedWin::_create { class args }
*** 255,261 ****
if {$transient} {
wm resizable $top 0 0
! wm transient $top [winfo toplevel [namespace tail [lindex [ManagedWin::find SrcWin] 0]]]
} elseif {$::tcl_platform(platform) == "unix"} {
# Modal dialogs DONT get Icons...
if {[pref get gdb/use_icons] && ![$newwin isa ModalDialog]} {
--- 255,271 ----
if {$transient} {
wm resizable $top 0 0
!
! # If a SrcWin is around, use its toplevel as the master for
! # the transient. Otherwise use ".". (The splash screen will
! # need ".", for example.)
! set srcs [ManagedWin::find SrcWin]
! if {[llength $srcs] > 0} {
! set w [winfo toplevel [namespace tail [lindex $srcs 0]]]
! } else {
! set w .
! }
! wm transient $top $w
} elseif {$::tcl_platform(platform) == "unix"} {
# Modal dialogs DONT get Icons...
if {[pref get gdb/use_icons] && ![$newwin isa ModalDialog]} {
More information about the Insight
mailing list