public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] make sure transient's master exists
@ 2002-02-13 18:38 Keith Seitz
  0 siblings, 0 replies; only message in thread
From: Keith Seitz @ 2002-02-13 18:38 UTC (permalink / raw)
  To: Insight Maling List

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]} {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-02-14  2:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-13 18:38 [PATCH] make sure transient's master exists Keith Seitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).