[PATCH] libgui: remove bgerror.tcl script

Roland Schwingel <[email protected]> Thu, 22 Mar 2012 15:37:11 +0100
Newsgroups gmane.comp.debugging.insight
Message-ID <[email protected]>
Hi...

At least since the insight intree supplied tk 8.4 version there is 
bgerror handling script coming with tk. libgui has its own version, 
which is also not so nice than the tk version. The attached patch 
removes it in favor ot the tk version.
As tk 8.4 is anyway (still) the prerequisite for insight this change 
does not harm.

2012-03-22  Roland Schwingel <[email protected]>

     * library/Makefile.in: Remove reference to bgerror.tcl.
     * library/tclIndex: Ditto.
     * library/bgerror.tcl: Removed file.

Any comments? Is this ok?

Roland
libgui_delete_bgerror.patch (text/plain, 3.5 KB)
diff -ruN libgui_orig/library/Makefile.in libgui/library/Makefile.in
--- libgui_orig/library/Makefile.in	2010-02-22 16:26:07.000000000 +0100
+++ libgui/library/Makefile.in	2012-03-22 14:36:51.752537700 +0100
@@ -203,7 +203,7 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = cygnus
-TCL = advice.tcl balloon.tcl bbox.tcl bgerror.tcl bindings.tcl \
+TCL = advice.tcl balloon.tcl bbox.tcl bindings.tcl \
 canvas.tcl cframe.tcl center.tcl debug.tcl def.tcl internet.tcl	\
 font.tcl gensym.tcl gettext.tcl hooks.tcl lframe.tcl list.tcl \
 looknfeel.tcl menu.tcl mono.tcl multibox.tcl parse_args.tcl path.tcl \
diff -ruN libgui_orig/library/bgerror.tcl libgui/library/bgerror.tcl
--- libgui_orig/library/bgerror.tcl	2001-09-09 00:34:46.000000000 +0200
+++ libgui/library/bgerror.tcl	1970-01-01 01:00:00.000000000 +0100
@@ -1,64 +0,0 @@
-# bgerror.tcl - Send bug report in response to uncaught Tcl error.
-# Copyright (C) 1997, 1998, 1999 Cygnus Solutions.
-# Written by Tom Tromey <[email protected]>.
-
-proc bgerror err {
-  global errorInfo errorCode
-
-  set info $errorInfo
-  set code $errorCode
-
-  # log the error to the debug window or file
-  dbug E $info
-  dbug E $code
-
-  set command [list tk_dialog .bgerrorDialog [gettext "GDB Error"] \
-		 [format [gettext "Error: %s"] $err] \
-		 error 0 [gettext "OK"]]
-  lappend command [gettext "Stack Trace"]
-  
-  
-  set value [eval $command]
-  if {$value == 0} {
-    return
-  }
-
-  set w .bgerrorTrace
-  catch {destroy $w}
-  toplevel $w -class ErrorTrace
-  wm minsize $w 1 1
-  wm title $w "Stack Trace for Error"
-  wm iconname $w "Stack Trace"
-  button $w.ok -text OK -command "destroy $w" -default active
-  text $w.text -relief sunken -bd 2 -yscrollcommand "$w.scroll set" \
-    -setgrid true -width 60 -height 20
-  scrollbar $w.scroll -relief sunken -command "$w.text yview"
-  pack $w.ok -side bottom -padx 3m -pady 2m
-  pack $w.scroll -side right -fill y
-  pack $w.text -side left -expand yes -fill both
-  $w.text insert 0.0 "errorCode is $errorCode"
-  $w.text insert 0.0 $info
-  $w.text mark set insert 0.0
-
-  bind $w <Return> "destroy $w"
-  bind $w.text <Return> "destroy $w; break"
-
-  # Center the window on the screen.
-
-  wm withdraw $w
-  update idletasks
-  set x [expr [winfo screenwidth $w]/2 - [winfo reqwidth $w]/2 \
-	   - [winfo vrootx [winfo parent $w]]]
-  set y [expr [winfo screenheight $w]/2 - [winfo reqheight $w]/2 \
-	   - [winfo vrooty [winfo parent $w]]]
-  wm geom $w +$x+$y
-  wm deiconify $w
-
-  # Be sure to release any grabs that might be present on the
-  # screen, since they could make it impossible for the user
-  # to interact with the stack trace.
-
-  if {[grab current .] != ""} {
-    grab release [grab current .]
-  }
-}
diff -ruN libgui_orig/library/tclIndex libgui/library/tclIndex
--- libgui_orig/library/tclIndex	2002-12-04 00:03:16.000000000 +0100
+++ libgui/library/tclIndex	2012-03-22 13:15:53.438502700 +0100
@@ -18,7 +18,6 @@
 set auto_index(BALLOON_command_variable) [list source [file join $dir balloon.tcl]]
 set auto_index(balloon) [list source [file join $dir balloon.tcl]]
 set auto_index(standard_button_box) [list source [file join $dir bbox.tcl]]
-set auto_index(bgerror) [list source [file join $dir bgerror.tcl]]
 set auto_index(bind_widget_after_tag) [list source [file join $dir bindings.tcl]]
 set auto_index(bind_widget_after_class) [list source [file join $dir bindings.tcl]]
 set auto_index(bind_plain_key) [list source [file join $dir bindings.tcl]]