This is the mail archive of the insight@sourceware.cygnus.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Insight Question


Michal,

Unfortunately, the answer here is "hack it in...".  We intend to
expand the preferences panels to contain more features of the
debugger, things like text & background colors on the aesthetic side,
and all the nifty settings in gdb on the functional side, but haven't
yet gotten around to it.

Here's how you would go about it.  The text pane background color is
set in gdb/gdbtcl2/srctextwin.itb in the build_win method.  Look at:

  set twinp [iwidgets::scrolledtext $pane1.st -textbackground white \
	       -hscrollmode dynamic -vscrollmode dynamic]

So if you just want to hard code the color, you can just change white
to something else...

If you want to go further, try adding a preference for this, and
another button to the Source preferences panel to set this.  This is
pretty easy to do.

First, you will have to add a preference to the gdbtk preference set.
You do this in prefs.tcl in the prefs_set_default proc, by adding
something like

  pref define gdb/src/text_bg              orange

except you probably don't want orange - but it is almost Halloween...

Then add another button to the Source Preferences panel.  Do this in
the build_win method of srcpref.itb.  You can pretty much cut & paste
the code from the other buttons.

Then change the srctextwin.itb code to:

  set twinp [iwidgets::scrolledtext $pane1.st \
               -textbackground [pref get gdb/src/text_bg] \
	       -hscrollmode dynamic -vscrollmode dynamic]

and you are done.  If you hack all this in, send me the diffs, and I
will happily incorporate them.

Hope this helps.

Jim

 > Hello,
 > 
 > How do I change the default background color of white to something less 
 > stressing to the eyes?
 > 
 > Thank you,
 > Michael Kang.
 > 

-- 
++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++
Jim Ingham                                              jingham@cygnus.com
Cygnus Solutions Inc.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]