summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFernando Nasser <fnasser@redhat.com>2001-01-04 17:22:22 +0000
committerFernando Nasser <fnasser@redhat.com>2001-01-04 17:22:22 +0000
commit6fe433d51fede6703a0b9e41056e1fa1db8bda4a (patch)
tree5ee864dbbfface3a8708e96089f80f040c41b0c1
parent615d94b25915dc5b65aae2b0653933898b6f0f3b (diff)
downloadgdb-6fe433d51fede6703a0b9e41056e1fa1db8bda4a.tar.gz
Fix ChangeLog entry and commit typo (gdbmenubar should read srcmenubar).
-rw-r--r--gdb/gdbtk/ChangeLog2
-rw-r--r--gdb/gdbtk/library/srcmenubar.itcl63
2 files changed, 7 insertions, 58 deletions
diff --git a/gdb/gdbtk/ChangeLog b/gdb/gdbtk/ChangeLog
index a509b1d910e..d54056386c2 100644
--- a/gdb/gdbtk/ChangeLog
+++ b/gdb/gdbtk/ChangeLog
@@ -4,7 +4,7 @@
remote target (code previously at library/gdbmenubar.itcl).
(disconnect): Rename to...
(gdbtk_disconnect): New name for proc disconnect.
- * library/gdbmenubar.itcl (do_connect): Remove the code mentioned
+ * library/srcmenubar.itcl (do_connect): Remove the code mentioned
above and call the new interface proc gdbtk_connect.
Also, call ::update idletasks after changing the state of the
menu entries.
diff --git a/gdb/gdbtk/library/srcmenubar.itcl b/gdb/gdbtk/library/srcmenubar.itcl
index c308686c86f..58b88e3bae8 100644
--- a/gdb/gdbtk/library/srcmenubar.itcl
+++ b/gdb/gdbtk/library/srcmenubar.itcl
@@ -419,7 +419,7 @@ class SrcMenuBar {
# METHOD: do_detach: detach from a running target
# ------------------------------------------------------------------
method do_detach {menu} {
- ::disconnect
+ gdbtk_disconnect
gdbtk_idle
}
@@ -436,53 +436,8 @@ class SrcMenuBar {
# in asynch mode if async is 1
# ------------------------------------------------------------------
method do_connect {menu {async 0}} {
- global file_done
- debug "do_connect: menu=$menu async=$async"
-
- gdbtk_busy
-
- set result [gdbtk_attach_remote]
- switch $result {
- ATTACH_ERROR {
- set successful 0
- }
-
- ATTACH_TARGET_CHANGED {
- if {[pref get gdb/load/check] && $file_done} {
- set err [catch {gdb_cmd "compare-sections"} errTxt]
- if {$err} {
- set successful 0
- tk_messageBox -title "Error" -message $errTxt \
- -icon error -type ok
- break
- }
- }
-
- tk_messageBox -title "GDB" -message "Successfully connected" \
- -icon info -type ok
- set successful 1
- }
-
- ATTACH_CANCELED {
- tk_messageBox -title "GDB" -message "Connection Canceled" -icon info \
- -type ok
- set successful 0
- }
-
- ATTACH_TARGET_UNCHANGED {
- tk_messageBox -title "GDB" -message "Successfully connected" \
- -icon info -type ok
- set successful 1
- }
-
- default {
- dbug E "Unhandled response from gdbtk_attach_remote: \"$result\""
- set successful 0
- }
- }
-
- gdbtk_idle
+ set successful [gdbtk_connect $async]
if {$successful} {
$menu entryconfigure "Connect to target" -state disabled
@@ -492,8 +447,8 @@ class SrcMenuBar {
$menu entryconfigure "Disconnect" -state disabled
}
- # Whenever we attach, we need to do an update
- gdbtk_update
+ # Make the menu reflect this change
+ ::update idletasks
}
# ------------------------------------------------------------------
@@ -507,7 +462,7 @@ class SrcMenuBar {
# For now, these are the same, but they might be different...
#
- disconnect $async
+ gdbtk_disconnect $async
$menu entryconfigure "Connect to target" -state normal
$menu entryconfigure "Disconnect" -state disabled
@@ -664,13 +619,7 @@ Do you want to continue?" \
}
}
- debug "Enable list is: $enable_list"
- foreach {type state} $enable_list {
- set members [menubar_menu_class_find $type]
- if {[llength $members]} {
- menubar_change_menu_state $state $members
- }
- }
+ set_class_state $enable_list
}
####################################################################