beremiz

PY2 specific fix: disable translation.
py2compat
22 months ago, Edouard Tisserant
b67a88003c0e
PY2 specific fix: disable translation.

SVGHMI build is broken when windows language use coma as a decimal point.
Didn't find the way to just change just decimal point locale setting with wxPython 3.x.
No way either to use XSLT format-number, since it produces only fixed decimal point numbers.
from __future__ import absolute_import
import wx
from controls.IDBrowser import IDBrowser
class IDManager(wx.Dialog):
def __init__(self, parent, ctr):
self.ctr = ctr
wx.Dialog.__init__(self,
name='IDManager', parent=parent,
title=_('URI Editor'),
style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER,
size=(800, 600))
# start IDBrowser in manager mode
self.browser = IDBrowser(self, ctr)
self.Bind(wx.EVT_CHAR_HOOK, self.OnEscapeKey)
def OnEscapeKey(self, event):
keycode = event.GetKeyCode()
if keycode == wx.WXK_ESCAPE:
self.EndModal(wx.ID_CANCEL)
else:
event.Skip()