sync a few files in gramps40 and trunk
svn: r21603
This commit is contained in:
parent
b60dbf2782
commit
55e2863a0b
@ -43,6 +43,7 @@ else:
|
||||
#locale returns unicode in python 3
|
||||
to_uni = lambda x, y: x
|
||||
codeset = glocale.encoding
|
||||
|
||||
try:
|
||||
|
||||
month_to_int = {
|
||||
|
@ -36,6 +36,7 @@ import locale
|
||||
import sys
|
||||
import logging
|
||||
LOG = logging.getLogger(".")
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Gramps modules
|
||||
|
@ -47,6 +47,7 @@ import io
|
||||
from ..constfunc import STRTYPE
|
||||
from ..const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.get_translation().gettext
|
||||
|
||||
def safe_eval(exp):
|
||||
# restrict eval to empty environment
|
||||
return eval(exp, {})
|
||||
|
@ -277,4 +277,3 @@ def resize_to_jpeg_buffer(source, size, crop=None):
|
||||
except:
|
||||
pass
|
||||
return data
|
||||
|
||||
|
@ -56,6 +56,7 @@ from gi.repository import Gtk
|
||||
#-------------------------------------------------------------------------
|
||||
from gramps.gen.const import URL_MANUAL_PAGE, VERSION_DIR
|
||||
from gramps.gen.config import config
|
||||
from gramps.gen.constfunc import win
|
||||
from ..managedwindow import ManagedWindow
|
||||
from ..display import display_help, display_url
|
||||
from .grampletpane import (AVAILABLE_GRAMPLETS,
|
||||
@ -191,7 +192,10 @@ class GrampletBar(Gtk.Notebook):
|
||||
"""
|
||||
filename = self.configfile
|
||||
try:
|
||||
fp = open(filename, "w")
|
||||
if win() and not sys.version_info[0] < 3:
|
||||
fp = open(filename, "w", encoding='utf-8')
|
||||
else:
|
||||
fp = open(filename, "w")
|
||||
except IOError:
|
||||
print("Failed writing '%s'; gramplets not saved" % filename)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user