From: Keith Seitz <keiths@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Insight List <insight@sourceware.cygnus.com>
Subject: Re: feature suggestion
Date: Thu, 20 Dec 2001 22:19:00 -0000 [thread overview]
Message-ID: <Pine.GSO.4.33.0112202216090.3928-100000@makita.cygnus.com> (raw)
Message-ID: <20011220221900.nq6QmF_7AF5aGlcWuJO1wK3tnPaLDsoVEc-vd3esQNg@z> (raw)
In-Reply-To: <87sna5ktg8.fsf@creche.redhat.com>
On 20 Dec 2001, Tom Tromey wrote:
> I think that B3 on the breakpoint window should automatically select
> the breakpoint under the mouse. I keep trying to use the right button
> to bring up the menu, but first I have to select the item I'm
> interested in. This has happened 4-5 times already ... changing this
> would be convenient.
Your wish is my command...
Try this and let me know if you find any problems with it.
Keith
Index: gdbtk/library/bpwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/bpwin.itb,v
retrieving revision 1.9
diff -u -p -r1.9 bpwin.itb
--- gdbtk/library/bpwin.itb 2001/11/05 19:15:17 1.9
+++ gdbtk/library/bpwin.itb 2001/12/21 06:16:52
@@ -265,6 +265,7 @@ body BpWin::bp_add {bp_event {tracepoint
foreach thing $zz {
bind $twin.${thing}${i} <1> "$this bp_select $i"
bind $twin.${thing}${i} <Double-1> "$this goto_bp $i"
+ bind $twin.${thing}${i} <3> [code $this _select_and_popup $i %X %Y]
}
}
@@ -368,7 +369,6 @@ body BpWin::bp_select { r } {
foreach thing $zz {
$twin.${thing}${i} configure -fg [pref get gdb/font/select_fg] -bg $bg1
- bind $twin.${thing}${i} <3> break
}
}
@@ -386,17 +386,12 @@ body BpWin::bp_select { r } {
$itk_interior.m.bp entryconfigure "Disabled" -state disabled
$itk_interior.m.bp entryconfigure "Remove" -state disabled
- foreach thing $zz {
- bind $twin.${thing}${r} <3> break
- }
-
return
}
foreach thing $zz {
$twin.${thing}${r} configure -fg [pref get gdb/font/select_fg] \
-bg [pref get gdb/font/select_bg]
- bind $twin.${thing}${r} <3> "tk_popup $Menu %X %Y"
}
if {$tracepoints == 0} {
@@ -424,6 +419,21 @@ body BpWin::bp_select { r } {
$Menu entryconfigure "Remove" -command "$this bp_remove $r" -state normal
set selected $r
+}
+
+# ------------------------------------------------------------------
+# NAME: private method BpWin::_select_and_popup
+# DESCRIPTION: Select the given breakpoint and popup the options
+# menu at the given location.
+#
+# ARGUMENTS: None
+# RETURNS: Nothing
+# ------------------------------------------------------------------
+body BpWin::_select_and_popup {bp X Y} {
+ if {$selected != $bp} {
+ bp_select $bp
+ }
+ tk_popup $Menu $X $Y
}
# ------------------------------------------------------------------
Index: gdbtk/library/bpwin.ith
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/bpwin.ith,v
retrieving revision 1.2
diff -u -p -r1.2 bpwin.ith
--- gdbtk/library/bpwin.ith 2001/04/19 22:51:02 1.2
+++ gdbtk/library/bpwin.ith 2001/12/21 06:16:52
@@ -53,6 +53,7 @@ class BpWin {
method bp_add {bp_event {tracepoint 0}}
method bp_modify {bp_event {tracepoint 0}}
method bp_delete {bp_event}
+ method _select_and_popup {bp X Y}
}
}
next prev parent reply other threads:[~2001-12-20 22:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-16 10:16 Tom Tromey
2001-10-16 10:22 ` Keith Seitz [this message]
2001-10-16 10:30 ` Tom Tromey
2001-10-16 10:35 ` Keith Seitz
2001-12-21 13:37 ` Keith Seitz
2001-12-21 13:34 ` Tom Tromey
2001-12-20 22:19 ` Keith Seitz
2001-12-20 21:48 ` Tom Tromey
-- strict thread matches above, loose matches on Subject: below --
2001-10-06 13:22 Tom Tromey
2001-10-08 1:27 ` Keith Seitz
2001-10-08 14:34 ` Tom Tromey
2001-10-09 8:16 ` Keith Seitz
2001-12-05 9:08 ` Keith Seitz
2001-12-04 20:27 ` Tom Tromey
2001-12-04 11:36 ` Keith Seitz
2001-12-03 21:24 ` Tom Tromey
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.0112202216090.3928-100000@makita.cygnus.com \
--to=keiths@redhat.com \
--cc=insight@sourceware.cygnus.com \
--cc=tromey@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).