This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
[PATCH] make sure transient's master exists
- From: Keith Seitz <keiths at redhat dot com>
- To: Insight Maling List <insight at sources dot redhat dot com>
- Date: Wed, 13 Feb 2002 18:38:54 -0800 (PST)
- Subject: [PATCH] make sure transient's master exists
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]} {