Edouard@2337: from __future__ import absolute_import Edouard@2337: Edouard@2337: import wx Edouard@2337: from controls.IDBrowser import IDBrowser Edouard@2337: edouard@2492: Edouard@2337: class IDManager(wx.Dialog): Edouard@2337: def __init__(self, parent, ctr): Edouard@2337: self.ctr = ctr Edouard@2337: wx.Dialog.__init__(self, Edouard@2337: name='IDManager', parent=parent, Edouard@2337: title=_('URI Editor'), Edouard@2428: style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER, edouard@2492: size=(800, 600)) Edouard@2337: # start IDBrowser in manager mode Edouard@2337: self.browser = IDBrowser(self, ctr) Edouard@2428: self.Bind(wx.EVT_CHAR_HOOK, self.OnEscapeKey) Edouard@2428: Edouard@2428: def OnEscapeKey(self, event): Edouard@2428: keycode = event.GetKeyCode() Edouard@2428: if keycode == wx.WXK_ESCAPE: Edouard@2428: self.EndModal(wx.ID_CANCEL) Edouard@2428: else: Edouard@2428: event.Skip()