OSDN Git Service

* library/bpwin.ith (_select_and_popup): New private method.
authorKeith Seitz <keiths@redhat.com>
Fri, 21 Dec 2001 21:36:21 +0000 (21:36 +0000)
committerKeith Seitz <keiths@redhat.com>
Fri, 21 Dec 2001 21:36:21 +0000 (21:36 +0000)
* 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.

gdb/gdbtk/ChangeLog
gdb/gdbtk/library/bpwin.itb
gdb/gdbtk/library/bpwin.ith

index d7d4c8d..b19314b 100644 (file)
@@ -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.
index 9045045..cb63777 100644 (file)
@@ -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}} {
index 9c6740a..43d93cb 100644 (file)
@@ -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}
   }
 
 }