This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
[RFA] 100494 fix
Better?
* change targetselection.ith (run_method): Add variable for
"Run Program" and "Continue..." buttons
* change targetselection.itb (build_win): put "Run Program" and
"Continue From..." buttons into a frame and save them in new
run_method variable.
* change targetselection.itb (change_target) disables "Run
Program" and "Continue..." buttons when the target is "exec",
enables them for all others.
Index: targetselection.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/targetselection.itb,v
retrieving revision 1.5
diff -u -r1.5 targetselection.itb
--- targetselection.itb 2000/10/26 20:47:57 1.5
+++ targetselection.itb 2000/10/31 19:20:03
@@ -487,21 +487,33 @@
set var [pref varname gdb/src/run_load]
checkbutton $frame.load -text {Download Program} -variable $var
+ set rm_frame [iwidgets::labeledframe $frame.run_method -labelpos nw
-labeltext "Run Method" ]
+ set run_method [ $rm_frame childsite ]
+
+ set rm_label [label $frame.label -text "Run Method:"]
set var [pref varname gdb/src/run_cont]
- radiobutton $frame.cont -text {Continue from Last Stop} -value 1
-variable $var \
+ radiobutton $run_method.cont -text {Continue from Last Stop} -value 1
-variable $var \
-command [code $this set_run run]
set var [pref varname gdb/src/run_run]
- radiobutton $frame.run -text {Run Program} -value 1 -variable $var \
+ radiobutton $run_method.run -text {Run Program} -value 1 -variable
$var \
-command [code $this set_run cont]
# The after attaching command entry
set _after_entry [entry $frame.aftere]
label $frame.afterl -text {Command to issue after attaching:}
- grid $frame.attach $frame.run -sticky w
- grid $frame.load $frame.cont -sticky w
- grid $frame.afterl -sticky we -columnspan 2
- grid $frame.aftere -sticky we -columnspan 2
+
+ grid $frame.label -column 1 -row 0 -sticky w
+ grid $frame.attach -column 0 -row 1 -ipady 2
+ grid $frame.load -column 0 -row 2 -ipady 2
+
+ grid $run_method.run -column 0 -row 1 -sticky w -ipady 2
+ grid $run_method.cont -column 0 -row 2 -sticky w -ipady 2
+
+ grid $rm_frame -column 1 -row 1 -rowspan 2 -sticky nsew -ipady 2
+
+ grid $frame.afterl -row 4 -sticky we -columnspan 2 -ipady 2
+ grid $frame.aftere -sticky we -columnspan 2 -ipady 2
grid columnconfigure $frame 0 -weight 1
grid columnconfigure $frame 1 -weight 1
@@ -722,6 +734,15 @@
body TargetSelection::change_target {w {name ""}} {
if {$name == ""} {return}
set target [get_target $name]
+
+ if { "$target" == "exec" } {
+ $run_method.run configure -state disabled -value 1
+ $run_method.cont configure -state disabled
+ } else {
+ $run_method.run configure -state normal
+ $run_method.cont configure -state normal
+ }
+
debug "$target"
set defbaud $gdb_target($target,defbaud)
pref define gdb/load/$target-baud $defbaud
Index: targetselection.ith
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/targetselection.ith,v
retrieving revision 1.2
diff -u -r1.2 targetselection.ith
--- targetselection.ith 2000/03/10 23:41:47 1.2
+++ targetselection.ith 2000/10/31 19:20:03
@@ -55,6 +55,8 @@
variable MoreButton
variable MoreFrame
variable MoreLabel
+
+ variable run_method
proc _init_prefs {}
proc default_port {}