summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2001-12-21 21:36:21 +0000
committerKeith Seitz <keiths@redhat.com>2001-12-21 21:36:21 +0000
commit631c4ea0d0daa33317f9863df553b5a2377acdd4 (patch)
treecbd82397e8df52215ae441f7a004c06131570f23
parentb347672006fb5e5fee296ec286ceb037e4683b0f (diff)
downloadgdb-631c4ea0d0daa33317f9863df553b5a2377acdd4.tar.gz
* library/bpwin.ith (_select_and_popup): New private method.
* library/bpwin.itb (bp_select): Don't bind to Button-3. (build_win): Bind Button-3 to _select_and_popup. (_select_and_popup): New private method.
-rw-r--r--gdb/gdbtk/ChangeLog7
-rw-r--r--gdb/gdbtk/library/bpwin.itb22
-rw-r--r--gdb/gdbtk/library/bpwin.ith1
3 files changed, 24 insertions, 6 deletions
diff --git a/gdb/gdbtk/ChangeLog b/gdb/gdbtk/ChangeLog
index d7d4c8d940c..b19314bc26e 100644
--- a/gdb/gdbtk/ChangeLog
+++ b/gdb/gdbtk/ChangeLog
@@ -1,3 +1,10 @@
+2001-12-21 Keith Seitz <keiths@redhat.com>
+
+ * library/bpwin.ith (_select_and_popup): New private method.
+ * library/bpwin.itb (bp_select): Don't bind to Button-3.
+ (build_win): Bind Button-3 to _select_and_popup.
+ (_select_and_popup): New private method.
+
2001-12-18 Keith Seitz <keiths@redhat.com>
* library/memwin.itb (incr_addr): Fix typo.
diff --git a/gdb/gdbtk/library/bpwin.itb b/gdb/gdbtk/library/bpwin.itb
index 904504500b6..cb6377758ac 100644
--- a/gdb/gdbtk/library/bpwin.itb
+++ b/gdb/gdbtk/library/bpwin.itb
@@ -265,6 +265,7 @@ body BpWin::bp_add {bp_event {tracepoint 0}} {
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} {
@@ -427,6 +422,21 @@ body BpWin::bp_select { 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
+}
+
+# ------------------------------------------------------------------
# METHOD: bp_modify - modify a breakpoint entry
# ------------------------------------------------------------------
body BpWin::bp_modify {bp_event {tracepoint 0}} {
diff --git a/gdb/gdbtk/library/bpwin.ith b/gdb/gdbtk/library/bpwin.ith
index 9c6740a95fa..43d93cb990e 100644
--- a/gdb/gdbtk/library/bpwin.ith
+++ b/gdb/gdbtk/library/bpwin.ith
@@ -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}
}
}