Updates to allow for user names with non latin characters in Windows.

svn: r15939
This commit is contained in:
Peter Landgren
2010-09-30 10:02:41 +00:00
parent 8b7e7aed4e
commit c0f2ed96b2
26 changed files with 133 additions and 57 deletions
+1 -1
View File
@@ -106,7 +106,7 @@ from htmlrenderer import HtmlView
#
#-------------------------------------------------------------------------
#covert to unicode for better hadnling of path in Windows
GEOVIEW_SUBPATH = Utils.get_unicode_path(Utils.get_empty_tempdir('geoview'))
GEOVIEW_SUBPATH = Utils.get_empty_tempdir('geoview')
NB_MARKERS_PER_PAGE = 200
#-------------------------------------------------------------------------
+5 -1
View File
@@ -31,6 +31,7 @@ from gen.ggettext import sgettext as _
from gen.ggettext import ngettext
from cgi import escape
import math
import sys
#-------------------------------------------------------------------------
#
@@ -169,8 +170,11 @@ class PersonBoxWidget_cairo( gtk.DrawingArea, _PersonWidget_base):
self.bgcolor = (211/256.0, 215/256.0, 207/256.0)
self.bordercolor = (0,0,0)
self.image = image
image1 = image
if isinstance(image1, unicode):
image1 = image.encode(sys.getfilesystemencoding())
try:
self.img_surf = cairo.ImageSurface.create_from_png(image)
self.img_surf = cairo.ImageSurface.create_from_png(image1)
except:
self.image = False
self.connect("enter-notify-event", self.on_enter_cb) # enable mouse-over