summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorFernando Nasser <fnasser@redhat.com>2001-01-03 15:13:16 +0000
committerFernando Nasser <fnasser@redhat.com>2001-01-03 15:13:16 +0000
commit6ec8be22a841462bf09834c483793a8809c8c1da (patch)
tree150fa34d482598e55f9687fc91fcc286a4c55e86 /gdb
parent57b1d4c4e1432764cd88d80942c60bcb60b43241 (diff)
downloadgdb-6ec8be22a841462bf09834c483793a8809c8c1da.tar.gz
2001-01-03 Fernando Nasser <fnasser@totem.toronto.redhat.com>
* library/prefs.tcl (pref_set_defaults): Define gdb/src/top_control to allow the source window controls to be placed at the top. * library/srcwin.itb (_build_win): Test for gdb/src/top_control and place the controls accordingly.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/gdbtk/ChangeLog7
-rw-r--r--gdb/gdbtk/library/prefs.tcl1
-rw-r--r--gdb/gdbtk/library/srcwin.itb36
3 files changed, 35 insertions, 9 deletions
diff --git a/gdb/gdbtk/ChangeLog b/gdb/gdbtk/ChangeLog
index 357ab12f7aa..1bca48b349b 100644
--- a/gdb/gdbtk/ChangeLog
+++ b/gdb/gdbtk/ChangeLog
@@ -1,3 +1,10 @@
+2001-01-03 Fernando Nasser <fnasser@totem.toronto.redhat.com>
+
+ * library/prefs.tcl (pref_set_defaults): Define gdb/src/top_control
+ to allow the source window controls to be placed at the top.
+ * library/srcwin.itb (_build_win): Test for gdb/src/top_control
+ and place the controls accordingly.
+
2001-01-02 Fernando Nasser <fnasser@totem.toronto.redhat.com>
* library/gdbmenubar.itcl: New file. Define the GDBMenuBar class,
diff --git a/gdb/gdbtk/library/prefs.tcl b/gdb/gdbtk/library/prefs.tcl
index 26676c6a5f3..dc1037ba232 100644
--- a/gdb/gdbtk/library/prefs.tcl
+++ b/gdb/gdbtk/library/prefs.tcl
@@ -305,6 +305,7 @@ proc pref_set_defaults {} {
pref define gdb/src/tab_size 8
pref define gdb/src/linenums 1
pref define gdb/src/thread_fg pink
+ pref define gdb/src/top_control 0; # 1 srctextwin controls on top, 0 bottom
# Define the run button's functions. These are defined here in case
# we do a "run" with an exec target (which never causes target.tcl to
diff --git a/gdb/gdbtk/library/srcwin.itb b/gdb/gdbtk/library/srcwin.itb
index 4c75adaded4..750a38faafc 100644
--- a/gdb/gdbtk/library/srcwin.itb
+++ b/gdb/gdbtk/library/srcwin.itb
@@ -87,15 +87,19 @@ body SrcWin::_build_win {} {
-updatecommand [list $this toggle_updates] \
-updatevalue $do_updates
- # add a SrcTextWin container
- set srcwin [conAdd src]
- set twin [SrcTextWin $srcwin -Tracing $Tracing -parent $this]
- pack $srcwin -expand 1 -fill both
-
- # add status line
- set _status [conAdd status -resizable 0]
- label $_status -relief sunken -bd 3 -font global/status -height 1
- pack $_status -expand 1 -fill both
+ # if user likes control on bottom...
+ if {! [pref get gdb/src/top_control]} {
+
+ # add a SrcTextWin container
+ set srcwin [conAdd src]
+ set twin [SrcTextWin $srcwin -Tracing $Tracing -parent $this]
+ pack $srcwin -expand 1 -fill both
+
+ # add status line
+ set _status [conAdd status -resizable 0]
+ label $_status -relief sunken -bd 3 -font global/status -height 1
+ pack $_status -expand 1 -fill both
+ }
# add a status bar container
set _statbar [conAdd stat -resizable 0]
@@ -136,6 +140,20 @@ body SrcWin::_build_win {} {
pack $_statbar.frame.search -fill x -expand yes
+ # if user likes control on top...
+ if {[pref get gdb/src/top_control]} {
+
+ # add a SrcTextWin container
+ set srcwin [conAdd src]
+ set twin [SrcTextWin $srcwin -Tracing $Tracing -parent $this]
+ pack $srcwin -expand 1 -fill both
+
+ # add status line
+ set _status [conAdd status -resizable 0]
+ label $_status -relief sunken -bd 3 -font global/status -height 1
+ pack $_status -expand 1 -fill both
+ }
+
set_execution_status
# balloon help