This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Make splash window go away after the specified time


A small bug prevented the splash screen to disapear automatically
after the specified time.

I checked the fix in.


	The following changes fix the problem of having to click on a splash
	window to make it disapear.
	* modal.tcl (post): Take as an argument "expire", the time a modal
	window is displayed.
	* managedwin.itb (open): Check for an "expire" argument and pass the
	value down to modal post method.





Index: library/modal.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/modal.tcl,v
retrieving revision 1.1.1.1
diff -c -p -r1.1.1.1 modal.tcl
*** modal.tcl	2000/02/07 00:19:42	1.1.1.1
--- modal.tcl	2001/01/04 17:52:05
*************** class ModalDialog {
*** 56,62 ****
    # ------------------------------------------------------------------
    #  METHOD:  post - posts the dialog box...
    # ------------------------------------------------------------------
!   public method post {{on_top 0}} {
  
      debug "POST $this"
      set top [winfo toplevel [namespace tail $this]]
--- 56,62 ----
    # ------------------------------------------------------------------
    #  METHOD:  post - posts the dialog box...
    # ------------------------------------------------------------------
!   public method post {{on_top 0} {expire 0}} {
  
      debug "POST $this"
      set top [winfo toplevel [namespace tail $this]]
Index: library/managedwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/managedwin.itb,v
retrieving revision 1.8
diff -c -p -r1.8 managedwin.itb
*** managedwin.itb	2000/12/11 18:40:12	1.8
--- managedwin.itb	2001/01/04 17:52:05
*************** body ManagedWin::open {class args} {
*** 115,121 ****
    set newwin [eval _open $class $args]
    if {$newwin != ""} {
      if {[$newwin isa ModalDialog]} {
!       after idle "$newwin reveal; $newwin post"
      } else {
        after idle "$newwin reveal"
      }
--- 115,122 ----
    set newwin [eval _open $class $args]
    if {$newwin != ""} {
      if {[$newwin isa ModalDialog]} {
!       parse_args [list {expire 0}]
!       after idle "$newwin reveal; $newwin post 0 $expire"
      } else {
        after idle "$newwin reveal"
      }

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]