git-gui: Correct bugs in font config handling.
commit7b64d0b7d62ec0eb6e8b37f0be2e62f2a719de16
authorShawn O. Pearce <spearce@spearce.org>
Sun, 12 Nov 2006 20:45:35 +0000 (12 15:45 -0500)
committerShawn O. Pearce <spearce@spearce.org>
Mon, 13 Nov 2006 05:10:37 +0000 (13 00:10 -0500)
treea0eaf9035e4b4e52b57323dd3358a575517777d0
parent4af2c384eaae62300765e205c705c7741dd7dd31
git-gui: Correct bugs in font config handling.

Apparently Tcl is being helpful on Windows during exec and is throwing a
\ in front of every { it finds in the string.  I'm guessing they think
the value might be read by another Tcl program?  Anyway, Git faithfully
stores the \{ sequence and sends it back that way to Tcl, at which point
Tcl parses the list wrong and starts to break it in the middle of any
element which contains spaces.  Therefore a list such as:

  -family {Times New Roman}

gets broken up into the pairs:

  {-family \{Times}
  {New Roman}

which is very incorrect.  So now we replace all { and } with "", at which
point Tcl doesn't throw \ in front of the " on the way out to Git yet it
reads it correctly as a list on the way back in.

I also found and fixed a bug in the way we restored the fonts when the
user presses Restore Defaults in the options dialog.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui