diff options
Diffstat (limited to 'gdb/gdbtk/library/srcbar.itcl')
-rw-r--r-- | gdb/gdbtk/library/srcbar.itcl | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/gdb/gdbtk/library/srcbar.itcl b/gdb/gdbtk/library/srcbar.itcl index 71ae814764f..7744fa18a6a 100644 --- a/gdb/gdbtk/library/srcbar.itcl +++ b/gdb/gdbtk/library/srcbar.itcl @@ -1,5 +1,5 @@ # SrcBar -# Copyright 2001, 2002 Red Hat, Inc. +# Copyright 2001, 2002, 2004 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 @@ -456,6 +456,25 @@ itcl::class SrcBar { $Menu add command Other "Source..." \ "ManagedWin::open SrcPref -transient" -underline 0 + + $Menu add command Color "Edit Color Schemes..." \ + "ManagedWin::open CSPref -transient" -underline 0 + + $Menu add separator + + set color_menu [$Menu add cascade use_cs Color "Use Color Scheme" 0] + for {set i 0} {$i < 16} {incr i} { + set dbg [recolor [pref get gdb/bg/$i] 80] + $color_menu add command -label $i -background [pref get gdb/bg/$i] \ + -activebackground $dbg -command "set_bg_colors $i" -underline 0 + } + + if {[pref get gdb/use_color_schemes] == "1"} { + set cs_state normal + } else { + set cs_state disabled + } + $Menu set_class_state "Color $cs_state" } # ------------------------------------------------------------------ @@ -850,6 +869,17 @@ itcl::class SrcBar { debug _load_src_images 1 _load_images 1 + + if {[pref get gdb/use_color_schemes] == "1"} { + set cs_state normal + } else { + set cs_state disabled + } + $Menu set_class_state "Color $cs_state" + for {set i 0} {$i < 16} {incr i} { + set dbg [recolor [pref get gdb/bg/$i] 80] + $color_menu entryconfigure $i -activebackground $dbg -background [pref get gdb/bg/$i] + } # FIXME: Must Check if we are Tracing and set the buttons accordingly. } @@ -1144,6 +1174,7 @@ Do you want to continue?" \ # The GdbMenuBar component private variable Menu + private variable color_menu # The GdbToolBar component private variable Tool |