From: "Martin M. Hunt" <hunt@redhat.com>
To: "insight@sources.redhat.com" <insight@sources.redhat.com>
Subject: [patch] regwin highlight fixes
Date: Wed, 18 Dec 2002 17:12:00 -0000 [thread overview]
Message-ID: <1040260513.15465.1.camel@Dragon> (raw)
[-- Attachment #1: Type: text/plain, Size: 399 bytes --]
This improves highlighting of changed values when switching register
groups.
2002-12-18 Martin M. Hunt <hunt@redhat.com>
* library/regwin.itb (RegWin::update): When updating, check
that a cell still exists before checking its value.
(RegWin::_select_group): Clear cells with changed values before
changing group. After new group is selected, highlight any changed
values still visible.
[-- Attachment #2: p --]
[-- Type: text/x-patch, Size: 2118 bytes --]
Index: library/regwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/regwin.itb,v
retrieving revision 1.23
diff -p -r1.23 regwin.itb
*** library/regwin.itb 17 Dec 2002 20:29:12 -0000 1.23
--- library/regwin.itb 19 Dec 2002 01:08:47 -0000
*************** itcl::body RegWin::_update_register {rn}
*** 901,914 ****
# ------------------------------------------------------------------
itcl::body RegWin::_select_group {} {
set gr [$itk_component(frame).opt get]
if {$gr == ""} {
return
}
set _group $gr
# Clear gdb's change list
catch {gdb_reginfo changed}
- update ""
- _layout_table
}
--- 901,930 ----
# ------------------------------------------------------------------
itcl::body RegWin::_select_group {} {
set gr [$itk_component(frame).opt get]
+ debug $gr
if {$gr == ""} {
return
}
+
+ # Change anything on the old change list back to normal
+ foreach r $_change_list {
+ if {[info exists _cell($r)] && $_cell($r) != "hidden"} {
+ $itk_component(table) tag cell normal $_cell($r)
+ }
+ }
+
set _group $gr
+ _layout_table
+
+ # highlight changed registers if they still exist in the new group
+ foreach r $_change_list {
+ if {[info exists _cell($r)] && $_cell($r) != "hidden" && $_data($_cell($r)) != ""} {
+ $itk_component(table) tag cell highlight $_cell($r)
+ }
+ }
+
# Clear gdb's change list
catch {gdb_reginfo changed}
}
*************** itcl::body RegWin::update {event} {
*** 999,1005 ****
# Change anything on the old change list back to normal
foreach r $_change_list {
! if {$_cell($r) != "hidden"} {
$itk_component(table) tag cell normal $_cell($r)
}
}
--- 1015,1021 ----
# Change anything on the old change list back to normal
foreach r $_change_list {
! if {[info exists _cell($r)] && $_cell($r) != "hidden"} {
$itk_component(table) tag cell normal $_cell($r)
}
}
reply other threads:[~2002-12-19 1:12 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=1040260513.15465.1.camel@Dragon \
--to=hunt@redhat.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).