From: Keith Seitz <keiths@cygnus.com>
To: Insight Maling List <insight@sources.redhat.com>
Subject: [PATCH] Update tdump.tcl and whack tix
Date: Tue, 28 Aug 2001 16:37:00 -0000 [thread overview]
Message-ID: <Pine.GSO.4.33.0108281636080.2633-100000@makita.cygnus.com> (raw)
Hi,
Ok, the tracing stuff isn't used altogether too much (why?), but here's a
small update of the Trace Dump window to bring it up to snuff and whack
tix.
Keith
ChangeLog
2001-08-28 Keith Seitz <keiths@redhat.com>
* library/tdump.tcl (class TdumpWin): Inherit from GDBWin
and ManagedWin.
(constructor): Remove old itcl2 handling code and name the
window.
(build_win): Use iwidgets::scrolledtext instead of
tixScrolledText.
(twin): Remove unused variable. Use itk_component(stext)
instead.
(maxwidth): Remove unused variable.
(destructor): Remove unused method.
(config): Ditto.
Patch
Index: library/tdump.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/tdump.tcl,v
retrieving revision 1.2
diff -u -p -r1.2 tdump.tcl
--- tdump.tcl 2001/06/04 15:49:53 1.2
+++ tdump.tcl 2001/08/28 23:25:34
@@ -1,5 +1,5 @@
-# Trace dump window for GDBtk.
-# Copyright 1998, 1999 Cygnus Solutions
+# Trace dump window for Insight
+# Copyright 1998, 1999, 2001 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GPL) as published by
@@ -28,28 +28,16 @@
#
# ----------------------------------------------------------------------
-itcl_class TdumpWin {
+class TdumpWin {
+ inherit ManagedWin GDBWin
+
# ------------------------------------------------------------------
# CONSTRUCTOR - create new tdump window
# ------------------------------------------------------------------
- constructor {config} {
- #
- # Create a window with the same name as this object
- #
- set class [$this info class]
- set hull [namespace tail $this]
- set old_name $this
- ::rename $this $this-tmp-
- ::frame $hull -class $class
- ::rename $hull $old_name-win-
- ::rename $this $old_name
-
- set top [winfo toplevel [namespace tail $this]]
- wm withdraw $top
-
+ constructor {args} {
+ window_name "Trace Dump"
build_win
- after idle [list wm deiconify $top]
-
+ eval itk_initialize $args
}
@@ -57,14 +45,24 @@ itcl_class TdumpWin {
# METHOD: build_win - build the main tdump window
# ------------------------------------------------------------------
method build_win {} {
+ global tcl_platform
- tixScrolledText [namespace tail $this].stext -scrollbar y -height 200 -width 500
- set twin [[namespace tail $this].stext subwidget text]
-
- # make window non editable
- $twin configure -insertwidth 0
+ if {[string compare $tcl_platform(platform) "windows"] == 0} {
+ set mode static
+ ide_sizebox $itk_interior.sbox
+ place $itk_interior.sbox -relx 1.0 -rely 1.0 -anchor se
+ } else {
+ set mode dynamic
+ }
- pack append [namespace tail $this] [namespace tail $this].stext {left expand fill}
+ itk_component add stext {
+ iwidgets::scrolledtext $itk_interior.stext -hscrollmode $mode \
+ -vscrollmode $mode -textfont src-font \
+ -background [pref get gdb/font/normal_bg]
+ } {}
+ [$itk_component(stext) component text] configure \
+ -background [pref get gdb/font/normal_bg]
+ pack $itk_component(stext) -side left -expand yes -fill both
update dummy
}
@@ -79,7 +77,7 @@ itcl_class TdumpWin {
if { $tframe_num!=-1 } {
debug "doing tdump"
- $twin delete 1.0 end
+ $itk_component(stext) delete 1.0 end
if {[catch {gdb_cmd "tdump $tframe_num" 0} tdump_output]} {
tk_messageBox -title "Error" -message $tdump_output -icon error \
@@ -87,37 +85,17 @@ itcl_class TdumpWin {
} else {
#debug "tdum output is $tdump_output"
- $twin insert end $tdump_output
- $twin see insert
+ $itk_component(stext) insert end $tdump_output
+ $itk_component(stext) see insert
}
}
gdbtk_idle
}
# ------------------------------------------------------------------
- # DESTRUCTOR - destroy window containing widget
- # ------------------------------------------------------------------
- destructor {
- set top [winfo toplevel [namespace tail $this]]
- destroy $this
- destroy $top
- }
-
- # ------------------------------------------------------------------
- # METHOD: config - used to change public attributes
- # ------------------------------------------------------------------
- method config {config} {}
-
- # ------------------------------------------------------------------
# METHOD: reconfig - used when preferences change
# ------------------------------------------------------------------
method reconfig {} {
}
-
- #
- # PROTECTED DATA
- #
- protected maxwidth 0
- protected twin
}
reply other threads:[~2001-08-28 16:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.GSO.4.33.0108281636080.2633-100000@makita.cygnus.com \
--to=keiths@cygnus.com \
--cc=insight@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).