OSDN Git Service

2002-03-05 Martin M. Hunt <hunt@redhat.com>
authorhunt <hunt>
Tue, 5 Mar 2002 22:22:18 +0000 (22:22 +0000)
committerhunt <hunt>
Tue, 5 Mar 2002 22:22:18 +0000 (22:22 +0000)
* library/prefs.tcl (pref_read): If a preference specifies
"src-font", substitute "global/fixed".
(pref_set_defaults): Change defaults from "src-font" to
"global/fixed". Do not create font object "src-font". Do
not add hook to trace its changes.
(pref_src-font_trace): Remove.

* library/console.itb (Console::_update_option): Remove
font update because this happens automatically.

* library/globalpref.itb: No need to set
changed flag for fonts; updates happen automatically
when prefs are updated.

* library/bpwin.itb: Replaced src-font with global/fixed.
* library/browserwin.itb: Ditto.
* library/mempref.itb: Ditto.
* library/memwin.itb: Ditto.
* library/process.itb: Ditto.
* library/regwin.itb: Ditto.
* library/srcbar.itcl: Ditto.
* library/srcpref.itb: Ditto.
* library/srctextwin.itb: Ditto.
* library/srcwin.itb: Ditto.
* library/stackwin.itb: Ditto.
* library/tdump.tcl: Ditto.
* library/tracedlg.tcl: Ditto.
* library/variables.tcl: Ditto.
* library/watch.tcl: Ditto.

19 files changed:
gdb/gdbtk/ChangeLog
gdb/gdbtk/library/bpwin.itb
gdb/gdbtk/library/browserwin.itb
gdb/gdbtk/library/console.itb
gdb/gdbtk/library/globalpref.itb
gdb/gdbtk/library/mempref.itb
gdb/gdbtk/library/memwin.itb
gdb/gdbtk/library/prefs.tcl
gdb/gdbtk/library/process.itb
gdb/gdbtk/library/regwin.itb
gdb/gdbtk/library/srcbar.itcl
gdb/gdbtk/library/srcpref.itb
gdb/gdbtk/library/srctextwin.itb
gdb/gdbtk/library/srcwin.itb
gdb/gdbtk/library/stackwin.itb
gdb/gdbtk/library/tdump.tcl
gdb/gdbtk/library/tracedlg.tcl
gdb/gdbtk/library/variables.tcl
gdb/gdbtk/library/watch.tcl

index 213e48c..db03967 100644 (file)
@@ -1,3 +1,35 @@
+2002-03-05  Martin M. Hunt  <hunt@redhat.com>
+
+       * library/prefs.tcl (pref_read): If a preference specifies
+       "src-font", substitute "global/fixed".
+       (pref_set_defaults): Change defaults from "src-font" to 
+       "global/fixed". Do not create font object "src-font". Do
+       not add hook to trace its changes.
+       (pref_src-font_trace): Remove.
+
+       * library/console.itb (Console::_update_option): Remove 
+       font update because this happens automatically.
+
+       * library/globalpref.itb: No need to set
+       changed flag for fonts; updates happen automatically
+       when prefs are updated.
+
+       * library/bpwin.itb: Replaced src-font with global/fixed.
+       * library/browserwin.itb: Ditto.
+       * library/mempref.itb: Ditto.
+       * library/memwin.itb: Ditto.
+       * library/process.itb: Ditto.
+       * library/regwin.itb: Ditto.
+       * library/srcbar.itcl: Ditto.
+       * library/srcpref.itb: Ditto.
+       * library/srctextwin.itb: Ditto.
+       * library/srcwin.itb: Ditto.
+       * library/stackwin.itb: Ditto.
+       * library/tdump.tcl: Ditto.
+       * library/tracedlg.tcl: Ditto.
+       * library/variables.tcl: Ditto.
+       * library/watch.tcl: Ditto.
+       
 2002-03-01  Keith Seitz  <keiths@redhat.com>
 
        * generic/gdbtk-register.c (register_changed_p): Don't use REGISTER_BYTES.
index cb63777..6f10b3c 100644 (file)
@@ -1,5 +1,5 @@
-# Breakpoint window for GDBtk.
-# Copyright 1997, 1998, 1999, 2001 Red Hat, Inc.
+# Breakpoint window for Insight.
+# Copyright 1997, 1998, 1999, 2001, 2002 Red Hat, Inc.
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License (GPL) as published by
@@ -64,22 +64,22 @@ body BpWin::build_win {} {
   # write header
   if {$tracepoints} {
     label $twin.num0 -text "Num" -relief raised -bd 2 -anchor center \
-      -font src-font
+      -font global/fixed
   } 
   label $twin.thread0 -text "Thread" -relief raised -bd 2 -anchor center \
-    -font src-font
+    -font global/fixed
   label $twin.addr0 -text "Address" -relief raised -bd 2 -anchor center \
-    -font src-font
+    -font global/fixed
   label $twin.file0 -text "File" -relief raised -bd 2 -anchor center \
-    -font src-font
+    -font global/fixed
   label $twin.line0 -text "Line" -relief raised -bd 2 -anchor center \
-    -font src-font
+    -font global/fixed
   label $twin.func0 -text "Function" -relief raised -bd 2 -anchor center \
-    -font src-font
+    -font global/fixed
 
   if {$tracepoints} {
     label $twin.pass0 -text "PassCount" -relief raised -borderwidth 2 \
-      -anchor center -font src-font
+      -anchor center -font global/fixed
     grid x $twin.num0 $twin.addr0 $twin.file0 $twin.line0 $twin.func0 $twin.pass0 \
       -sticky new
   } else {
@@ -238,9 +238,9 @@ body BpWin::bp_add {bp_event {tracepoint 0}} {
   }
 
   if {$tracepoints} {
-    label $twin.num$i -text "$number " -relief flat -anchor e -font src-font -bg $bg1
+    label $twin.num$i -text "$number " -relief flat -anchor e -font global/fixed -bg $bg1
   }
-  label $twin.addr$i -text "[$bp_event get address] " -relief flat -anchor e -font src-font -bg $bg1
+  label $twin.addr$i -text "[$bp_event get address] " -relief flat -anchor e -font global/fixed -bg $bg1
   if {[info exists _files(short,$file)]} {
     set file $_files(short,$file)
   } else {
@@ -249,13 +249,13 @@ body BpWin::bp_add {bp_event {tracepoint 0}} {
   }
   if {$show_threads} {
     if {$thread == "-1"} {set thread "ALL"}
-    label $twin.thread$i -text "$thread " -relief flat -anchor e -font src-font -bg $bg1
+    label $twin.thread$i -text "$thread " -relief flat -anchor e -font global/fixed -bg $bg1
   }
-  label $twin.file$i -text "$file " -relief flat -anchor e -font src-font -bg $bg1
-  label $twin.line$i -text "[$bp_event get line] " -relief flat -anchor e -font src-font -bg $bg1
-  label $twin.func$i -text "[$bp_event get function] " -relief flat -anchor e -font src-font -bg $bg1
+  label $twin.file$i -text "$file " -relief flat -anchor e -font global/fixed -bg $bg1
+  label $twin.line$i -text "[$bp_event get line] " -relief flat -anchor e -font global/fixed -bg $bg1
+  label $twin.func$i -text "[$bp_event get function] " -relief flat -anchor e -font global/fixed -bg $bg1
   if {$tracepoints} {
-    label $twin.pass$i -text "[$bp_event get pass_count] " -relief flat -anchor e -font src-font -bg $bg1
+    label $twin.pass$i -text "[$bp_event get pass_count] " -relief flat -anchor e -font global/fixed -bg $bg1
   }
 
   if {$mbar} {
index ff062bb..874fcd5 100644 (file)
@@ -1,5 +1,5 @@
 # Browswer window for Insight.
-# Copyright 1998, 1999, 2001 Red Hat
+# Copyright 1998, 1999, 2001, 2002 Red Hat
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License (GPL) as published by
@@ -89,14 +89,14 @@ body BrowserWin::_build_win {} {
 
   itk_component add filt_label {
     label [$itk_component(filter) childsite].lbl -text {Show if function } \
-      -font src-font
+      -font global/fixed
   }
 
   itk_component add filt_type {
     combobox::combobox [$itk_component(filter) childsite].type -height 4 \
       -width 15 -editable 0 \
       -command [code $this _set_filter_mode] \
-      -font src-font
+      -font global/fixed
   } { }
 
   # Fill the filter mode combo-box
@@ -112,7 +112,7 @@ body BrowserWin::_build_win {} {
   $itk_component(filt_type) entryset $cur_filter_mode
 
   itk_component add filt_entry {
-    entry [$itk_component(filter) childsite].ent -font src-font \
+    entry [$itk_component(filter) childsite].ent -font global/fixed \
       -textvariable [pref varname gdb/search/last_symbol] -background white
   } {
     usual Entry
@@ -280,13 +280,12 @@ body BrowserWin::_build_win {} {
   }
 
   itk_component add view_name {
-    label $itk_component(view_hidden).name -font src-font
+    label $itk_component(view_hidden).name -font global/fixed
   }
 
   itk_component add view_func {
     combobox::combobox $itk_component(view_bottom).combo -maxheight 15 \
-      -font src-font \
-      -command [code $this _goto_func]
+      -font global/fixed -command [code $this _goto_func]
   } {
     # Should be able to do this, but can't cause the combobox doesn't
     # fake up a MegaWidget well enough
@@ -295,16 +294,14 @@ body BrowserWin::_build_win {} {
   
   itk_component add view_mode {
     combobox::combobox $itk_component(view_bottom).mode -width 9 \
-      -font src-font \
-      -command [code $this mode]
+      -font global/fixed -command [code $this mode]
   } {
     #rename -background -textbackground textBackground Background
   }
 
   itk_component add view_search {
     entry $itk_component(view_bottom).search -borderwidth 2 \
-      -font src-font -width 10 \
-      -background white
+      -font global/fixed -width 10 -background white
   } {
     rename -background -textbackground textBackground Background
   }
index 3ae767a..6495669 100644 (file)
@@ -20,17 +20,18 @@ body Console::constructor {args} {
   _build_win
   eval itk_initialize $args
   add_hook gdb_no_inferior_hook [list $this idle dummy]
-
-  # Right now the preferences window directly uses preference
-  # variables.  This means that if we track the preference changes
-  # here, things will appear weird to the user -- the console window
-  # will change before the user chooses Accpet in the prefs window.
-  # Until the preference window is fixed we can't enable this
-  # dynamic tracking.  FIXME.
-  # foreach option {gdb/console/wrap gdb/console/prompt_fg \
-  #                gdb/console/error_fg gdb/console/font} {
-  #  pref add_hook $option [code $this _update_option]
-  # }
+  
+  # There are a bunch of console prefs that have no UI
+  # for the user to modify them.  In the event that the user
+  # really wants to change them, they will have to be modified
+  # in prefs.tcl or by editing .gdbtkinit.  When these prefs
+  # gain a prefs UI, the user may change them dynamically
+  # and the console window will need notification that they
+  # have changed.  Add them to the following list and
+  # Console::_update_option.
+  foreach option {gdb/console/wrap} {
+    pref add_hook $option [code $this _update_option]
+  }
 
   set gdbtk_state(console) $this
 }
@@ -39,11 +40,6 @@ body Console::destructor {} {
   global gdbtk_state
   set gdbtk_state(console) ""
   remove_hook gdb_no_inferior_hook [list $this idle dummy]
-
-  # foreach option {gdb/console/wrap gdb/console/prompt_fg \
-  #                gdb/console/error_fg gdb/console/font} {
-  #   pref remove_hook $option [code $this _update_option]
-  # }
 }
 
 body Console::_build_win {} {
@@ -681,10 +677,6 @@ body Console::_update_option {name value} {
     gdb/console/error_fg {
       $_twin tag configure err_tag -foreground $value
     }
-
-    gdb/console/font {
-      $_twin configure -font $value
-    }
   }
 }
 
index 058c5e8..96d02b2 100644 (file)
@@ -1,5 +1,5 @@
-# Global preference class implementation for GDBtk.
-# Copyright 1997, 1998, 1999 Cygnus Solutions
+# Global preference class implementation for Insight.
+# Copyright 1997, 1998, 1999, 2002 Red Hat
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License (GPL) as published by
@@ -387,7 +387,6 @@ body GlobalPref::_apply {{deleteMe 0}} {
     set font [font configure test-$thunk-font]
     if {[pref get global/font/$thunk] != $font} {
       pref set global/font/$thunk $font
-      set changed_something 1
     }
   }
 
index ceae9a3..7da5d88 100644 (file)
@@ -1,5 +1,5 @@
-# Memory display preferences window for GDBtk.
-# Copyright 1998, 1999 Cygnus Solutions
+# Memory display preferences window for Insight.
+# Copyright 1998, 1999, 2002 Red Hat
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License (GPL) as published by
@@ -153,7 +153,7 @@ body MemPref::build_win {} {
   label $fr.2.l -text "Bytes Per Row "
   set Widgets(b-bytes_per_row) [::combobox::combobox $fr.2.c \
                                  -command [code $this set_bytes_per_row]  \
-                                 -width 4 -editable 0 -font src-font]
+                                 -width 4 -editable 0 -font global/fixed]
   $fr.2.c list insert end 4
   $fr.2.c list insert end 8
   $fr.2.c list insert end 16
index c684e82..2e69837 100644 (file)
@@ -104,7 +104,7 @@ body MemWin::build_win {} {
 
   table $itk_interior.t -titlerows 1 -titlecols 1 -variable ${this}_memval \
     -roworigin -1 -colorigin -1 -bg $bg \
-    -browsecmd "$this changed_cell %s %S" -font src-font\
+    -browsecmd "$this changed_cell %s %S" -font global/fixed\
     -colstretch unset -rowstretch unset -selectmode single \
     -xscrollcommand "$itk_interior.sx set" -resizeborders none \
     -cols $numcols -rows $numrows -autoclear 1
index f8809b6..1a001f1 100644 (file)
@@ -1,5 +1,5 @@
-# Local preferences functions for GDBtk.
-# Copyright 1997, 1998, 1999 Cygnus Solutions
+# Local preferences functions for Insight.
+# Copyright 1997, 1998, 1999, 2002 Red Hat
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License (GPL) as published by
@@ -117,6 +117,8 @@ proc pref_read {} {
            } elseif {$section == "global"} {
              pref setd $section/$name $val
            } else {
+             # backwards compatibility. recognize old src-font name
+             if {$val == "src-font"} {set val "global/fixed"}
              pref setd gdb/$section/$name $val
            }
          }
@@ -320,7 +322,7 @@ proc pref_set_defaults {} {
   pref define gdb/console/error_fg        red
   pref define gdb/console/log_fg          green 
   pref define gdb/console/target_fg       blue
-  pref define gdb/console/font            src-font
+  pref define gdb/console/font            global/fixed
 
   # Source window defaults
   pref define gdb/src/PC_TAG              green
@@ -330,7 +332,7 @@ proc pref_set_defaults {} {
   pref define gdb/src/bp_fg               red
   pref define gdb/src/temp_bp_fg          orange
   pref define gdb/src/disabled_fg         black
-  pref define gdb/src/font                src-font
+  pref define gdb/src/font                global/fixed
   pref define gdb/src/break_fg            black
   pref define gdb/src/source2_fg          navy
   pref define gdb/src/variableBalloons    1
@@ -353,19 +355,12 @@ proc pref_set_defaults {} {
 
   pref define gdb/src/disassembly-flavor  ""
 
-  # set up src-font
-  set val [pref get global/font/fixed]
-  eval font create src-font $val
-
-  # Trace the global/font/fixed preference
-  pref add_hook global/font/fixed pref_src-font_trace
-
   # Variable Window defaults
-  pref define gdb/variable/font           src-font
+  pref define gdb/variable/font           global/fixed
   pref define gdb/variable/disabled_fg    gray
 
   # Stack Window
-  pref define gdb/stack/font              src-font
+  pref define gdb/stack/font              global/fixed
 
   # Register Window
   pref define gdb/reg/rows                16
@@ -414,8 +409,3 @@ proc pref_set_defaults {} {
   pref define gdb/editor ""
 }
 
-# This traces the global/fixed font and forces src-font to
-# to be the same.
-proc pref_src-font_trace {varname val} {
-  eval font configure src-font $val
-}
index 32e5ba5..3cdb71a 100644 (file)
@@ -1,5 +1,5 @@
 # Process window for Insight.
-# Copyright 1998, 1999, 2001 Red Hat, Inc.
+# Copyright 1998, 1999, 2001, 2002 Red Hat, Inc.
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License (GPL) as published by
@@ -51,7 +51,7 @@ body ProcessWin::build_win {} {
       -background [pref get gdb/font/normal_bg] \
       -selectbackground green \
       -selectforeground black \
-      -textfont src-font \
+      -textfont global/fixed \
       -exportselection false \
       -selectioncommand [code $this change_context]
   } {}
index 5c3b1de..0edec9d 100644 (file)
@@ -1,5 +1,5 @@
 # Register display window for Insight.
-# Copyright 1998, 1999, 2001 Red Hat, Inc.
+# Copyright 1998, 1999, 2001, 2002 Red Hat, Inc.
 #
 # Written by Keith Seitz (keiths@redhat.com)
 # based on work by Martin Hunt (hunt@redhat.com)
@@ -92,7 +92,7 @@ body RegWin::_build_win {} {
   itk_component add table {
     ::table $itk_interior.tbl -variable [scope _data] \
       -bg [pref get gdb/font/normal_bg] -fg [pref get gdb/font/normal_fg] \
-      -browsecmd [code $this _select_cell %S] -font src-font \
+      -browsecmd [code $this _select_cell %S] -font global/fixed \
       -colstretch unset -rowstretch unset -selectmode single \
       -resizeborders none -multiline false -colwidth 18 \
       -autoclear 0 -bg [pref get gdb/font/normal_bg] \
index bfae66a..dbfb821 100644 (file)
@@ -535,9 +535,9 @@ class SrcBar {
     }
 
     # Add find in file entry box.
-    $Tool add label findlabel "Find:" "" -anchor e -font src-font
+    $Tool add label findlabel "Find:" "" -anchor e -font global/fixed
     $Tool add custom searchbox entry "Search in editor" \
-       -bd 3 -font src-font -width 10
+       -bd 3 -font global/fixed -width 10
 
     set callback [code $source search]
     $Tool itembind searchbox <Return> \
index d524729..20a7858 100644 (file)
@@ -1,5 +1,5 @@
-# Source preferences dialog for GDBtk.
-# Copyright 1998, 1999 Cygnus Solutions
+# Source preferences dialog for Insight.
+# Copyright 1998, 1999, 2002 Red Hat
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License (GPL) as published by
@@ -158,8 +158,8 @@ body SrcPref::_build_win {} {
     set have_disassembly_flavor 1
     frame $f.dis
     label $f.dis.l -text "Disassembly Flavor: "
-    combobox::combobox $f.dis.combo -maxheight 15 -width 15 -font src-font -editable 0 \
-      -command [code $this _set_flavor]
+    combobox::combobox $f.dis.combo -maxheight 15 -width 15 \
+      -font global/fixed -editable 0 -command [code $this _set_flavor]
     
     foreach elem $vals {
       $f.dis.combo list insert end $elem
index 3a862be..4b16949 100644 (file)
@@ -406,7 +406,7 @@ body SrcTextWin::makeBreakDot {size colorList {image {}}} {
 # METHOD: setTabs - set the tabs for the assembly/src windows
 # ------------------------------------------------------------------
 body SrcTextWin::setTabs {win {asm S}} {
-  set fsize [font measure src-font "W"]
+  set fsize [font measure [pref get gdb/src/font] "W"]
   set tsize [pref get gdb/src/tab_size]
   set rest ""
   
@@ -753,7 +753,7 @@ body SrcTextWin::reconfig {} {
 #  debug
   
   # Make sure we redo the break images when we reconfigure
-  set size [font measure src-font "W"]
+  set size [font measure [pref get gdb/src/font] "W"]
   makeBreakDot $size [pref get gdb/src/bp_fg] $break_images(bp)
   makeBreakDot $size [pref get gdb/src/temp_bp_fg] $break_images(temp_bp)
   makeBreakDot $size [pref get gdb/src/disabled_fg] $break_images(disabled_bp)
index ca94b15..e2ef8fc 100644 (file)
@@ -96,15 +96,15 @@ body SrcWin::_build_win {} {
   frame $_statbar
   pack $_statbar -expand 1 -fill both
 
-  combobox::combobox $_statbar.name -maxheight 15 -font src-font\
+  combobox::combobox $_statbar.name -maxheight 15 -font global/fixed\
     -command [code $this _name]
   
   set need_files 1
   
-  combobox::combobox $_statbar.func -maxheight 15 -font src-font\
+  combobox::combobox $_statbar.func -maxheight 15 -font global/fixed\
     -command [code $this goto_func]
   combobox::combobox $_statbar.mode -width 9 -editable false \
-    -font src-font -command [code $this mode]
+    -font global/fixed -command [code $this mode]
   
   $_statbar.mode list insert end SOURCE
   $_statbar.mode list insert end ASSEMBLY
@@ -136,9 +136,9 @@ body SrcWin::_build_win {} {
 
     # add address and line number indicators
     label $_statusframe.addr -text "" -width 10 -relief sunken \
-      -bd 1 -anchor e -font src-font
+      -bd 1 -anchor e -font global/fixed
     label $_statusframe.line -text "" -width 6 -relief sunken \
-      -bd 1 -anchor e -font src-font
+      -bd 1 -anchor e -font global/fixed
 
     balloon register $_statusframe.addr "Address"
     balloon register $_statusframe.line "Line number"
@@ -473,7 +473,7 @@ body SrcWin::location {tag linespec} {
     # 32-bit address plus "0x"
     set width 10
   }
-  $_statusframe.addr configure -text $addr -font src-font -width $width
+  $_statusframe.addr configure -text $addr -font global/fixed -width $width
   $_statusframe.line configure -text $line
 
   # set function combobox
index e94c5d0..f475db7 100644 (file)
@@ -1,5 +1,5 @@
-# Stack window for GDBtk.
-# Copyright 1997, 1998, 1999 Cygnus Solutions
+# Stack window for Insight.
+# Copyright 1997, 1998, 1999, 2002 Red Hat
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License (GPL) as published by
@@ -44,7 +44,7 @@ body StackWin::build_win {} {
       -textbackground [pref get gdb/font/normal_bg] \
       -foreground [pref get gdb/font/normal_fg] \
       -visibleitems 30x15 \
-      -textfont src-font -selectioncommand [code $this change_frame]
+      -textfont global/fixed -selectioncommand [code $this change_frame]
   } {}
 
   # Add sizebox for windows
index 60ef99f..a5a16ca 100644 (file)
@@ -1,5 +1,5 @@
 # Trace dump window for Insight
-# Copyright 1998, 1999, 2001 Red Hat, Inc.
+# Copyright 1998, 1999, 2001, 2002 Red Hat, Inc.
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License (GPL) as published by
@@ -57,7 +57,7 @@ class TdumpWin {
 
     itk_component add stext {
       iwidgets::scrolledtext $itk_interior.stext -hscrollmode $mode \
-       -vscrollmode $mode -textfont src-font \
+       -vscrollmode $mode -textfont global/fixed \
        -background [pref get gdb/font/normal_bg]
     } {}
     [$itk_component(stext) component text] configure \
index f5462ca..2305116 100644 (file)
@@ -1,5 +1,5 @@
 # Trace configuration dialog for Insight
-# Copyright 1997, 1998, 1999, 2001 Red Hat, Inc.
+# Copyright 1997, 1998, 1999, 2001, 2002 Red Hat, Inc.
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License (GPL) as published by
@@ -313,8 +313,8 @@ class TraceDlg {
     pack $act_frame.lb -side bottom -fill both -expand 1 -padx 5 -pady 5
 
     # New actions
-    combobox::combobox $new_frame.combo -maxheight 15 -editable 0 -font src-font \
-      -command [code $this set_action_type]
+    combobox::combobox $new_frame.combo -maxheight 15 -editable 0 \
+      -font global/fixed -command [code $this set_action_type]
     $new_frame.combo list insert end collect while-stepping
     $new_frame.combo entryset collect
 
index 584f344..dee5e90 100644 (file)
@@ -1,5 +1,5 @@
 # Variable display window for Insight.
-# Copyright 1997, 1998, 1999, 2001 Red Hat
+# Copyright 1997, 1998, 1999, 2001, 2002 Red Hat
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License (GPL) as published by
@@ -48,7 +48,7 @@ class VariableWin {
     method build_win {f} {
        global tixOption tcl_platform Display
        #    debug
-       set width [font measure src-font "W"]
+       set width [font measure global/fixed "W"]
        # Choose the default width to be...
        set width [expr {40 * $width}]
        if {$tcl_platform(platform) == "windows"} {
@@ -84,21 +84,21 @@ class VariableWin {
        set sbg [$Hlist cget -bg]
        set fg [$Hlist cget -fg]
        set bg $tixOption(input1_bg)
-       set width [font measure src-font $LengthString]
+       set width [font measure global/fixed $LengthString]
        $Hlist configure -indent $width -bg $bg \
            -selectforeground $fg -selectbackground $sbg \
-           -selectborderwidth 0 -separator . -font src-font
+           -selectborderwidth 0 -separator . -font global/fixed
 
        # Get display styles
        set normal_fg    [$Hlist cget -fg]
        set highlight_fg [pref get gdb/font/highlight_fg]
        set disabled_fg  [pref get gdb/variable/disabled_fg]
        set NormalTextStyle [tixDisplayStyle text -refwindow $Hlist \
-                                -bg $bg -fg $normal_fg -font src-font]
+                                -bg $bg -fg $normal_fg -font global/fixed]
        set HighlightTextStyle [tixDisplayStyle text -refwindow $Hlist \
-                                   -bg $bg -fg $highlight_fg -font src-font]
+                                   -bg $bg -fg $highlight_fg -font global/fixed]
        set DisabledTextStyle [tixDisplayStyle text -refwindow $Hlist \
-                                  -bg $bg -fg $disabled_fg -font src-font]
+                                  -bg $bg -fg $disabled_fg -font global/fixed]
 
        if {[catch {gdb_cmd "show output-radix"} msg]} {
            set Radix 10
@@ -403,8 +403,8 @@ class VariableWin {
        if {$Editing == ""} {
            # Must create the frame
            set Editing [frame $Hlist.frame -bg $bg -bd 0 -relief flat]
-           set lbl [::label $Editing.lbl -fg $fg -bg $bg -font src-font]
-           set ent [entry $Editing.ent -bg $tixOption(bg) -font src-font]
+           set lbl [::label $Editing.lbl -fg $fg -bg $bg -font global/fixed]
+           set ent [entry $Editing.ent -bg $tixOption(bg) -font global/fixed]
            pack $lbl $ent -side left
        }
 
index 6734205..135b923 100644 (file)
@@ -1,5 +1,5 @@
 # Watch window for Insight.
-# Copyright 1997, 1998, 1999, 2001 Red Hat
+# Copyright 1997, 1998, 1999, 2001, 2002 Red Hat
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License (GPL) as published by
@@ -51,7 +51,7 @@ class WatchWin {
     set treeFrame  [frame $f.top]
     set entryFrame [frame $f.expr]
     VariableWin::build_win $treeFrame
-    set Entry [entry $entryFrame.ent -font src-font]
+    set Entry [entry $entryFrame.ent -font global/fixed]
     button $entryFrame.but -text "Add Watch" -command [code $this validateEntry]
     pack $f -fill both -expand yes
     grid $entryFrame.ent -row 0 -column 0 -sticky news -padx 2