hggtk/status: fix display error of multi-byte text and filenames
Looks like courier font can't handle multi-byte characters,
specifically Chinese (and many other Asian languages?),
which triggered this bugfix.
--- a/hggtk/gdialog.py Wed Apr 23 15:18:20 2008 +0100
+++ b/hggtk/gdialog.py Wed Apr 23 15:18:27 2008 +0100
@@ -173,9 +173,9 @@
def _parse_config(self):
# defaults
- self.fontcomment = 'courier 10'
- self.fontdiff = 'courier 10'
- self.fontlist = 'courier 9'
+ self.fontcomment = 'monospace 10'
+ self.fontdiff = 'monospace 10'
+ self.fontlist = 'monospace 9'
self.diffopts = ''
self.diffcmd = ''
self.diffbottom = ''
--- a/hggtk/status.py Wed Apr 23 15:18:20 2008 +0100
+++ b/hggtk/status.py Wed Apr 23 15:18:27 2008 +0100
@@ -473,7 +473,7 @@
difftext.seek(0)
iter = buffer.get_start_iter()
for line in difftext:
- line = util.fromlocal(line)
+ line = toutf(line)
if line.startswith('---') or line.startswith('+++'):
buffer.insert_with_tags_by_name(iter, line, 'header')
elif line.startswith('-'):